def distributed_predict(self, inputs, sc): data_type = inputs.map(lambda x: x.__class__.__name__).first() input_is_table = False if data_type == "list": input_is_table = True jinputs = inputs.map(lambda x: Layer.check_input(x)[0]) output = callZooFunc(self.bigdl_type, "inferenceModelDistriPredict", self.value, sc, jinputs, input_is_table) return output.map(lambda x: KerasNet.convert_output(x))
def predict(self, inputs): """ Do prediction on inputs. :param inputs: A numpy array or a list of numpy arrays or JTensor or a list of JTensors. """ jinputs, input_is_table = Layer.check_input(inputs) output = callZooFunc(self.bigdl_type, "inferenceModelPredict", self.value, jinputs, input_is_table) return KerasNet.convert_output(output)