What I tried so far:
- pre-train a model using unsupervised method in PyTorch, and save off the checkpoint file (using
torch.save(state, filename)) - convert the checkpoint file to onnx format (using
torch.onnx.export) - convert the onnx to tensorflow saved model (using
onnx-tf) - trying to load the variables in saved_model folder as checkpoint in my tensorflow training code (using
tf.train.init_from_checkpoint) for fine-tuning
But now I am getting stuck at step 4 because I notice that variables.index and variables.data@1 files are basically empty (probably because of this: https://github.com/onnx/onnx-tensorflow/issues/994)
Also, specifically, if I try to use tf.train.NewCheckpointReader to load the files and call ckpt_reader.get_variable_to_shape_map(), _CHECKPOINTABLE_OBJECT_GRAPH is empty
Any suggestions/experience are appreciated :-)