public void setGradientForVariableName ( String variableName , SDVariable variable ) { Preconditions . checkState ( variables . containsKey ( variableName ) , "No variable exists with name \"%s\"" , variableName ) ; if ( variable == null ) { throw new ND4JIllegalStateException ( "Unable to set null gradient for variable name " + variableName ) ; } variables . get ( variableName ) . setGradient ( variable ) ; }
Assign a SDVariable to represent the gradient of the SDVariable with the specified name