nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/DataSet.java
@Override
    public long getMemoryFootprint() {
        long reqMem = features.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += labels == null ? 0 : labels.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += featuresMask == null ? 0 : featuresMask.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += labelsMask == null ? 0 : labelsMask.lengthLong() * Nd4j.sizeOfDataType();

        return reqMem;
    }
@Override
    public long getMemoryFootprint() {
        long reqMem = features.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += labels == null ? 0 : labels.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += featuresMask == null ? 0 : featuresMask.lengthLong() * Nd4j.sizeOfDataType();
        reqMem += labelsMask == null ? 0 : labelsMask.lengthLong() * Nd4j.sizeOfDataType();

        return reqMem;
    }
@ Override public long getMemoryFootprint ( ) { long reqMem = features . lengthLong ( ) * Nd4j . sizeOfDataType ( ) ; reqMem += labels == null ? 0 : labels . lengthLong ( ) * Nd4j . sizeOfDataType ( ) ; reqMem += featuresMask == null ? 0 : featuresMask . lengthLong ( ) * Nd4j . sizeOfDataType ( ) ; reqMem += labelsMask == null ? 0 : labelsMask . lengthLong ( ) * Nd4j . sizeOfDataType ( ) ; return reqMem ; }
This method returns memory used by this DataSet

@return
This method returns memory used by this DataSet