Class GraphVertex

    • Constructor Detail

      • GraphVertex

        public GraphVertex()
    • Method Detail

      • equals

        public abstract boolean equals​(Object o)
        Overrides:
        equals in class Object
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object
      • numParams

        public abstract long numParams​(boolean backprop)
      • minVertexInputs

        public abstract int minVertexInputs()
        Returns:
        The Smallest valid number of inputs to this vertex
      • maxVertexInputs

        public abstract int maxVertexInputs()
        Returns:
        The largest valid number of inputs to this vertex
      • instantiate

        public abstract GraphVertex instantiate​(ComputationGraph graph,
                                                String name,
                                                int idx,
                                                INDArray paramsView,
                                                boolean initializeParams,
                                                DataType networkDatatype)
        Create a GraphVertex instance, for the given computation graph, given the configuration instance.
        Parameters:
        graph - The computation graph that this GraphVertex is to be part of
        name - The name of the GraphVertex object
        idx - The index of the GraphVertex
        paramsView - A view of the full parameters array
        initializeParams - If true: initialize the parameters. If false: make no change to the values in the paramsView array
        networkDatatype -
        Returns:
        The implementation GraphVertex object (i.e., implementation, no the configuration)
      • getOutputType

        public abstract InputType getOutputType​(int layerIndex,
                                                InputType... vertexInputs)
                                         throws InvalidInputTypeException
        Determine the type of output for this GraphVertex, given the specified inputs. Given that a GraphVertex may do arbitrary processing or modifications of the inputs, the output types can be quite different to the input type(s).
        This is generally used to determine when to add preprocessors, as well as the input sizes etc for layers
        Parameters:
        layerIndex - The index of the layer (if appropriate/necessary).
        vertexInputs - The inputs to this vertex
        Returns:
        The type of output for this vertex
        Throws:
        InvalidInputTypeException - If the input type is invalid for this type of GraphVertex
      • getMemoryReport

        public abstract MemoryReport getMemoryReport​(InputType... inputTypes)
        This is a report of the estimated memory consumption for the given vertex
        Parameters:
        inputTypes - Input types to the vertex. Memory consumption is often a function of the input type
        Returns:
        Memory report for the vertex
      • setDataType

        public void setDataType​(DataType dataType)