pyspark/bigdl/nn/keras/topology.py
def predict(self, x, distributed=True):
        """
        Use a model to do prediction.

        # Arguments
        x: Input data. A Numpy array or RDD of Sample.
        distributed: Boolean. Whether to do prediction in distributed mode or local mode.
                     Default is True. In local mode, x must be a Numpy array.
        """
        if is_distributed:
            if isinstance(x, np.ndarray):
                features = to_sample_rdd(x, np.zeros([x.shape[0]]))
            elif isinstance(x, RDD):
                features = x
            else:
                raise TypeError("Unsupported prediction data type: %s" % type(x))
            return self.predict_distributed(features)
        else:
            if isinstance(x, np.ndarray):
                return self.predict_local(x)
            else:
                raise TypeError("Unsupported prediction data type: %s" % type(x))
def predict(self, x, distributed=True):
        if is_distributed:
            if isinstance(x, np.ndarray):
                features = to_sample_rdd(x, np.zeros([x.shape[0]]))
            elif isinstance(x, RDD):
                features = x
            else:
                raise TypeError("Unsupported prediction data type: %s" % type(x))
            return self.predict_distributed(features)
        else:
            if isinstance(x, np.ndarray):
                return self.predict_local(x)
            else:
                raise TypeError("Unsupported prediction data type: %s" % type(x))
def predict ( self , x , distributed = True ) : if is_distributed : if isinstance ( x , np . ndarray ) : features = to_sample_rdd ( x , np . zeros ( [ x . shape [ 0 ] ] ) ) elif isinstance ( x , RDD ) : features = x else : raise TypeError ( "Unsupported prediction data type: %s" % type ( x ) ) return self . predict_distributed ( features ) else : if isinstance ( x , np . ndarray ) : return self . predict_local ( x ) else : raise TypeError ( "Unsupported prediction data type: %s" % type ( x ) )
Use a model to do prediction.

        # Arguments
        x: Input data. A Numpy array or RDD of Sample.
        distributed: Boolean. Whether to do prediction in distributed mode or local mode.
                     Default is True. In local mode, x must be a Numpy array.
Use a model to do prediction .