export_outputs['classes'] =
export_output_lib.ClassificationOutput(classes=classes)
- tpu.outside_compilation(host_call, logits)
+ tpu.outside_compilation(host_call, [logits])
...
```
input_receiver_fn_map[mode]}
export_tags = [tag_constants.SERVING, tag_constants.TPU]
mode = _REWRITE_FOR_INFERENCE_MODE
- try:
+ if self._export_to_tpu:
(super(TPUEstimator, self).
_add_meta_graph_for_mode(builder,
input_receiver_fn_map,
save_variables=False,
mode=mode,
export_tags=export_tags))
- except Exception as error: # pylint: disable=broad-except
- logging.warning('Saving meta graph for TPU failed: {}.'
- .format(str(error)))
def _call_model_fn(self, features, labels, mode, config):
if mode == _REWRITE_FOR_INFERENCE_MODE: