tensorflow-model-analysis

TFX Pipeline Error While Executing TFMA: AttributeError: 'NoneType' object has no attribute 'ToBatchTensors'

本秂侑毒 提交于 2021-02-11 12:21:02
问题 Basically I only reused code from iris utils and iris pipeline with minor change on serving input: def _get_serve_tf_examples_fn(model, tf_transform_output): model.tft_layer = tf_transform_output.transform_features_layer() feature_spec = tf_transform_output.raw_feature_spec() print(feature_spec) feature_spec.pop(_LABEL_KEY) @tf.function def serve_tf_examples_fn(*args): parsed_features = {} for arg in args: parsed_features[arg.name.split(":")[0]] = arg print(parsed_features) transformed