info on input shape and problem domain from models?

Skip to first unread message

Roberta Rocca

Nov 5, 2020, 9:46:56 AM11/5/20
to TensorFlow Hub

I am using the latest version of tensorflow hub, and wondering how one gets information on a model's expected input shape, as well as on what type of collection the model belongs to. For example, is there a way to get info on the expected image shape after having loaded a model in Python this way?

model = hub.load("")

or this way?

model = hub.KerasLayer("")

It seems that in neither case the model object stores info on what the expected shape is - both in terms of image height/width, and batch size. On the other hand, this info can be found through load_module_spec for older TF models, as far as I understand. Any insights?

One more question: is there a way to get information programmatically on which "problem domain" the model belongs to? It can be looked up on, but what if one needed to access that info from model object itself or via tensorflow_hub functions?


Reply all
Reply to author
0 new messages