pyspark/bigdl/nn/layer.py
def predict(self, features, batch_size = -1):
        """
        Model inference base on the given data.
        :param features: it can be a ndarray or list of ndarray for locally inference
                         or RDD[Sample] for running in distributed fashion
        :param batch_size: total batch size of prediction.
        :return: ndarray or RDD[Sample] depend on the the type of features.
        """
        if isinstance(features, RDD):
            return self.predict_distributed(features, batch_size)
        else:
            return self.predict_local(features, batch_size)
def predict(self, features, batch_size = -1):
        """
        Model inference base on the given data.
        :param features: it can be a ndarray or list of ndarray for locally inference
                         or RDD[Sample] for running in distributed fashion
        :param batch_size: total batch size of prediction.
        :return: ndarray or RDD[Sample] depend on the the type of features.
        """
        if isinstance(features, RDD):
            return self.predict_distributed(features, batch_size)
        else:
            return self.predict_local(features, batch_size)
Model inference base on the given data.
        :param features: it can be a ndarray or list of ndarray for locally inference
                         or RDD[Sample] for running in distributed fashion
        :param batch_size: total batch size of prediction.
        :return: ndarray or RDD[Sample] depend on the the type of features.