automl icon indicating copy to clipboard operation
automl copied to clipboard

`image_size` is not used from the utility function

Open sayakpaul opened this issue 3 years ago • 0 comments

Referring to: https://colab.research.google.com/github/google/automl/blob/master/efficientnetv2/tfhub.ipynb.

get_hub_url_and_isize() already returns the image size corresponding to a given model variant. But the following code is not using it:

hub_url, image_size = get_hub_url_and_isize(model_name, ckpt_type, hub_type)
tf.keras.backend.clear_session()
m = hub.KerasLayer(hub_url, trainable=False)
m.build([None, 224, 224, 3])  # Batch input shape.

A better way might be to actually use image_size:

m.build([None, image_size, image_size, 3])

sayakpaul avatar Jan 01 '22 04:01 sayakpaul