We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f435f4 commit 0fa6911Copy full SHA for 0fa6911
examples/zenn/zenn.py
@@ -7,7 +7,7 @@
7
# default input shape 224x224x3
8
model = tf.keras.applications.MobileNetV3Large()
9
10
-x = tf.TensorSpec(model.input_shape, tf.float32)
+x = tf.TensorSpec(model.input_shape, tf.float32, name="x")
11
concrete_function = tf.function(lambda x: model(x)).get_concrete_function(x)
12
# now all variables are converted to constants.
13
# if this step is omitted, dumped graph does not include trained weights
@@ -23,6 +23,7 @@
23
24
frozen_model_pred = frozen_model(tf.cast(sample, tf.float32))[0]
25
assert_almost_equal(original_pred.numpy(), frozen_model_pred.numpy())
26
-decoded = tf.keras.applications.mobilenet_v3.decode_predictions(original_pred.numpy())[0]
+decoded = tf.keras.applications.mobilenet_v3.decode_predictions(original_pred.numpy())[
27
+ 0
28
+]
29
print(decoded)
-
0 commit comments