model predict DistributedImageFrame, return imageFrame with predicted tensor
model predict DistributedImageFrame, return imageFrame with predicted tensor
imageFrame that contains images
if outputLayer is not null, the output of layer that matches outputLayer will be used as predicted output
whether to share same memory for each batch predict results
key to store predicted result
Predictor for distributed data
NOTE: The
predictClass,predictandpredictImagewill call the relevant methods of objectPredictor. Why we do this? Because every these methods uses the ClassTagT. If we do these jobs in the methods of classPredictor, when we domapPartition, Spark will find all used values and do serialization. TheTis the argument of constructor, the serialization will package the wholePredictorclass, which contains themodel. It will send a duplicate model to the workers. So we should move these methods to objectPredictor.