3

I have a trained model of my own (trained in tf 1.14) that I use it for pre-training another model. So, it is not one of the well known models such as ResNet/etc that you can find in tf.keras.applications.

I want to switch my work to tf 2.0 but cannot find any link to provide me with details on how to load tf 1.14 checkpoints and graph in tf2.

Is it at all possible to transfer-learn in tensorflow 2 using the model information from tf 1?

n_esk
  • 31
  • 1

1 Answers1

0

It should be possible if you:

  • save the weights from the tf 1.14 model (old_model.save_weights(path))
  • build the same model in 2.0 (just the layer layout) (new_model = build_and_compile_model())
  • load the 1.14 weights into the 2.0 model (new_model.load_weights(path/to/old_model_weights))

I hope this helps

Flo
  • 51
  • 8