I'm trying to use the Fashionpedia model checkpoints for their clothing attribute detection models. I'm using tensorflow 2.10.0 and I'm only familiar with using sequential models in tensorflow and have never used a tf Session. As I understand the only way I can restore the model in this format is by using a session and importing the meta graph. I have the following code:
tf.compat.v1.disable_eager_execution()
model_path = r'C:\Users\tbrad\AppData\Local\Programs\Python\Python37\Fashionpedia\fashionpedia_model_checkpoints\fashionpedia-r101-fpn\\'
sess = tf.compat.v1.Session()
saver = tf.compat.v1.train.import_meta_graph(os.path.join(model_path,'model.ckpt.meta'))
saver.restore(sess,os.path.join(model_path,'model.ckpt'))
And it gives the following error: Detected at node 'input0' defined at (most recent call last): Node: 'input0' No OpKernel was registered to support Op 'TPUReplicatedInput' used by {{node input0}} with these attrs: [is_mirrored_variable=false, index=0, T=DT_INT32, N=32, is_packed=false] Registered devices: [CPU, GPU] Registered kernels: <no registered kernels>
I have very little understanding of TPUs. Could anyone explain what is actually causing this error? Also is there anyway to extract the information from these files to create a tensorflow model object to use instead of having to import the meta graph and use a session?