File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 77# default input shape 224x224x3
88model = 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" )
1111concrete_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
2323
2424frozen_model_pred = frozen_model (tf .cast (sample , tf .float32 ))[0 ]
2525assert_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+ ]
2729print (decoded )
28-
You can’t perform that action at this time.
0 commit comments