nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastOp.java
public List<long[]> calculateOutputShape() {
        List<long[]> ret = new ArrayList<>();
        if (larg().getShape() != null && rarg().getShape() != null)
            ret.add(Shape.broadcastOutputShape(larg().getShape(), rarg().getShape()));
        else if(larg().getShape() != null)
            ret.add(larg().getShape());

        return ret;
    }
public List<long[]> calculateOutputShape() {
        List<long[]> ret = new ArrayList<>();
        if (larg().getShape() != null && rarg().getShape() != null)
            ret.add(Shape.broadcastOutputShape(larg().getShape(), rarg().getShape()));
        else if(larg().getShape() != null)
            ret.add(larg().getShape());

        return ret;
    }
Calculate the output shape for this op

@return