Skip to content

Commit 0fa6911

Browse files
committed
add name
1 parent 5f435f4 commit 0fa6911

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/zenn/zenn.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# default input shape 224x224x3
88
model = tf.keras.applications.MobileNetV3Large()
99

10-
x = tf.TensorSpec(model.input_shape, tf.float32)
10+
x = tf.TensorSpec(model.input_shape, tf.float32, name="x")
1111
concrete_function = tf.function(lambda x: model(x)).get_concrete_function(x)
1212
# now all variables are converted to constants.
1313
# if this step is omitted, dumped graph does not include trained weights
@@ -23,6 +23,7 @@
2323

2424
frozen_model_pred = frozen_model(tf.cast(sample, tf.float32))[0]
2525
assert_almost_equal(original_pred.numpy(), frozen_model_pred.numpy())
26-
decoded = tf.keras.applications.mobilenet_v3.decode_predictions(original_pred.numpy())[0]
26+
decoded = tf.keras.applications.mobilenet_v3.decode_predictions(original_pred.numpy())[
27+
0
28+
]
2729
print(decoded)
28-

0 commit comments

Comments
 (0)