Class InplaceParallelInference

    • Constructor Detail

      • InplaceParallelInference

        public InplaceParallelInference()
    • Method Detail

      • updateModel

        public void updateModel​(@NonNull
                                @NonNull org.deeplearning4j.nn.api.Model model)
        Description copied from class: ParallelInference
        This method allows to update Model used for inference in runtime, without queue reset
        Overrides:
        updateModel in class ParallelInference
      • getCurrentModelsFromWorkers

        protected org.deeplearning4j.nn.api.Model[] getCurrentModelsFromWorkers()
        Description copied from class: ParallelInference
        This method returns Models used in workers at this moment PLEASE NOTE: This method is NOT thread safe, and should NOT be used anywhere but tests
        Overrides:
        getCurrentModelsFromWorkers in class ParallelInference
        Returns:
      • output

        public org.nd4j.linalg.api.ndarray.INDArray[] output​(org.nd4j.linalg.api.ndarray.INDArray[] input,
                                                             org.nd4j.linalg.api.ndarray.INDArray[] inputMasks)
        Description copied from class: ParallelInference
        Generate predictions/outputs from the network, optionally using input masks for predictions
        Overrides:
        output in class ParallelInference
        Parameters:
        input - Input to the network
        inputMasks - Input masks for the network. May be null.
        Returns:
        Output from the network
      • output

        public <T> T output​(@NonNull
                            @NonNull org.deeplearning4j.nn.api.ModelAdapter<T> adapter,
                            org.nd4j.linalg.api.ndarray.INDArray[] input,
                            org.nd4j.linalg.api.ndarray.INDArray[] inputMasks,
                            org.nd4j.linalg.api.ndarray.INDArray[] labelsMasks)
        This method does forward pass and returns output provided by OutputAdapter
        Type Parameters:
        T -
        Parameters:
        adapter -
        input -
        inputMasks -
        Returns: