Interface MultiDataSet

    • Method Detail

      • numFeatureArrays

        int numFeatureArrays()
        Number of arrays of features/input data in the MultiDataSet
      • numLabelsArrays

        int numLabelsArrays()
        Number of arrays of label/output data in the MultiDataSet
      • getFeatures

        INDArray[] getFeatures()
        Get all of the input features, as an array of INDArrays
      • getFeatures

        INDArray getFeatures​(int index)
        Get a single feature/input array
      • setFeatures

        void setFeatures​(INDArray[] features)
        Set all of the features arrays for the MultiDataSet
      • setFeatures

        void setFeatures​(int idx,
                         INDArray features)
        Set a single features array (by index) for the MultiDataSet
      • getLabels

        INDArray[] getLabels()
        Get all of the labels, as an array of INDArrays
      • getLabels

        INDArray getLabels​(int index)
        Get a single label/output array
      • setLabels

        void setLabels​(INDArray[] labels)
        Set all of the labels arrays for the MultiDataSet
      • setLabels

        void setLabels​(int idx,
                       INDArray labels)
        Set a single labels array (by index) for the MultiDataSet
      • hasMaskArrays

        boolean hasMaskArrays()
        Whether there are any mask arrays (features or labels) present for this MultiDataSet
      • getFeaturesMaskArrays

        INDArray[] getFeaturesMaskArrays()
        Get the feature mask arrays. May return null if no feature mask arrays are present; otherwise, any entry in the array may be null if no mask array is present for that particular feature
      • getFeaturesMaskArray

        INDArray getFeaturesMaskArray​(int index)
        Get the specified feature mask array. Returns null if no feature mask is present for that particular feature/input
      • setFeaturesMaskArrays

        void setFeaturesMaskArrays​(INDArray[] maskArrays)
        Set the feature mask arrays
      • setFeaturesMaskArray

        void setFeaturesMaskArray​(int idx,
                                  INDArray maskArray)
        Set a single feature mask array by index
      • getLabelsMaskArrays

        INDArray[] getLabelsMaskArrays()
        Get the labels mask arrays. May return null if no labels mask arrays are present; otherwise, any entry in the array may be null if no mask array is present for that particular label
      • getLabelsMaskArray

        INDArray getLabelsMaskArray​(int index)
        Get the specified label mask array. Returns null if no label mask is present for that particular feature/input
      • setLabelsMaskArray

        void setLabelsMaskArray​(INDArray[] labels)
        Set the labels mask arrays
      • setLabelsMaskArray

        void setLabelsMaskArray​(int idx,
                                INDArray labelsMaskArray)
        Set a single labels mask array by index
      • load

        void load​(InputStream from)
           throws IOException
        Load the contents of this MultiDataSet from the specified stream. Stream will be closed after loading.
        Throws:
        IOException
      • load

        void load​(File from)
           throws IOException
        Load the contents of this MultiDataSet from the specified file
        Throws:
        IOException
      • asList

        List<MultiDataSet> asList()
        SplitV the MultiDataSet into a list of individual examples.
        Returns:
        List of MultiDataSets, each with 1 example
      • copy

        MultiDataSet copy()
        Clone the dataset
        Returns:
        a clone of the dataset
      • setExampleMetaData

        void setExampleMetaData​(List<? extends Serializable> exampleMetaData)
        Set the metadata for this MultiDataSet
        By convention: the metadata can be any serializable object, one per example in the MultiDataSet
        Parameters:
        exampleMetaData - Example metadata to set
      • getExampleMetaData

        <T extends SerializableList<T> getExampleMetaData​(Class<T> metaDataType)
        Get the example metadata, or null if no metadata has been set
        Note: this method results in an unchecked cast - care should be taken when using this!
        Type Parameters:
        T - Type of metadata
        Parameters:
        metaDataType - Class of the metadata (used for opType information)
        Returns:
        List of metadata objects
      • getExampleMetaData

        List<Serializable> getExampleMetaData()
        Get the example metadata, or null if no metadata has been set
        Returns:
        List of metadata instances
      • getMemoryFootprint

        long getMemoryFootprint()
        This method returns memory amount occupied by this MultiDataSet.
        Returns:
        value in bytes
      • migrate

        void migrate()
        This method migrates this MultiDataSet into current Workspace (if any)
      • detach

        void detach()
        This method detaches this MultiDataSet from current Workspace (if any)
      • isEmpty

        boolean isEmpty()
        Returns:
        True if the MultiDataSet is empty (all features/labels arrays are empty)
      • shuffle

        void shuffle()
        Shuffle the order of the examples in the MultiDataSet. Note that this generally won't make any difference in practice unless the MultiDataSet is later split.