if self._predictions is not None:
self._clear_prediction_queue()
print(preds)
return self.input_pipeline.label_encoder.inverse_transform(np.asarray(preds))
def predict_proba(self, X):
After Change
self.target_est = self.get_estimator("target")
preds = None
if features is not None:
target_est = self.get_estimator("target")
target_fn = self.input_pipeline.get_target_input_fn(features)
preds = target_est.predict(
input_fn=target_fn, predict_keys=mode, hooks=[self.predict_hooks.target_hook])
preds = [pred[mode] if mode else pred for pred in preds]