docs: public boolean variableHasGradient(String varName){
          Preconditions.checkState(variables.containsKey(varName), "No variable with name \"%s\" exists", varName);
          SDVariable v = getVariable(varName);
          if(!v.dataType().isFPType() || v.isConstant())
              return false;
  
          return getGradForVariable(varName) != null;
      }