public SDVariable var(String name, long[] shape, WeightInitScheme weightInitScheme) {
        if (variableMap.containsKey(name) && variableMap.get(name).getArr() != null)
            return variableMap.get(name);


        if (name == null || name.length() < 1)
            throw new IllegalArgumentException("Name for variable must be defined");

        if (workspace == null)
            initWorkspace();


        SDVariable ret = SDVariable.builder()
                .sameDiff(this)
                .shape(shape).weightInitScheme(weightInitScheme)
                .varName(name)
                .build();


        addVariable(ret);
        variableMap.put(name, ret);
        return ret;

    }
public SDVariable var(String name, long[] shape, WeightInitScheme weightInitScheme) {
        if (variableMap.containsKey(name) && variableMap.get(name).getArr() != null)
            return variableMap.get(name);


        if (name == null || name.length() < 1)
            throw new IllegalArgumentException("Name for variable must be defined");

        if (workspace == null)
            initWorkspace();


        SDVariable ret = SDVariable.builder()
                .sameDiff(this)
                .shape(shape).weightInitScheme(weightInitScheme)
                .varName(name)
                .build();


        addVariable(ret);
        variableMap.put(name, ret);
        return ret;

    }
public SDVariable var ( String name , long [ ] shape , WeightInitScheme weightInitScheme ) { if ( variableMap . containsKey ( name ) && variableMap . get ( name ) . getArr ( ) != null ) return variableMap . get ( name ) ; if ( name == null || name . length ( ) < 1 ) throw new IllegalArgumentException ( "Name for variable must be defined" ) ; if ( workspace == null ) initWorkspace ( ) ; SDVariable ret = SDVariable . builder ( ) . sameDiff ( this ) . shape ( shape ) . weightInitScheme ( weightInitScheme ) . varName ( name ) . build ( ) ; addVariable ( ret ) ; variableMap . put ( name , ret ) ; return ret ; }
Variable initialization
with a specified {@link WeightInitScheme}

@param name             the opName of the variable
@param shape            the shape of the array to be created
@param weightInitScheme the weight init scheme
@return the created variable
Variable initialization with a specified { @link WeightInitScheme }