nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
public void putShapeForVarName(String varName, long[] shape) {
        if (shape == null) {
            throw new ND4JIllegalStateException("Shape must not be null!");
        }

        if (variableNameToShape.containsKey(varName)) {
            throw new ND4JIllegalStateException("Shape for " + varName + " already exists!");
        }

        for (int i = 0; i < shape.length; i++) {
            if (shape[i] < 1) {
                addAsPlaceHolder(varName);
                placeHolderOriginalShapes.put(varName, shape);
                return;
            }
        }

        variableNameToShape.put(varName, shape);
    }
public void putShapeForVarName(String varName, long[] shape) {
        if (shape == null) {
            throw new ND4JIllegalStateException("Shape must not be null!");
        }

        if (variableNameToShape.containsKey(varName)) {
            throw new ND4JIllegalStateException("Shape for " + varName + " already exists!");
        }

        for (int i = 0; i < shape.length; i++) {
            if (shape[i] < 1) {
                addAsPlaceHolder(varName);
                placeHolderOriginalShapes.put(varName, shape);
                return;
            }
        }

        variableNameToShape.put(varName, shape);
    }
public void putShapeForVarName ( String varName , long [ ] shape ) { if ( shape == null ) { throw new ND4JIllegalStateException ( "Shape must not be null!" ) ; } if ( variableNameToShape . containsKey ( varName ) ) { throw new ND4JIllegalStateException ( "Shape for " + varName + " already exists!" ) ; } for ( int i = 0 ; i < shape . length ; i ++ ) { if ( shape [ i ] < 1 ) { addAsPlaceHolder ( varName ) ; placeHolderOriginalShapes . put ( varName , shape ) ; return ; } } variableNameToShape . put ( varName , shape ) ; }
Associate a vertex id with the given shape.

@param varName the vertex id to associate
@param shape   the shape to associate with
Associate a vertex id with the given shape .