This PR refactors the saver paths used in the model, because they did not make much sense before.
Now, when using a ResNet-descendant, the following flags are used as described:
pretrained_checkpoint: path of a file (!) that contains pre-trained weights, for example /Users/fp/.models/tiny_imagenet_alp05_2018_06_26.ckpt - only used to restore weights (if specified)
save_directory: path of a directory (!) in which the complete graph's variables will be tried to be restored and saved, for example /Users/fp/.models/checkpoints
Also, a new flag has been introduced, which is used to name the stored checkpoint files (which are saved to the save_directory directory): the name flag.
The code has been tested using a VQResNet model with one vq-layer, first only restoring the pretrained ALP-weights, then saving the complete model to a save_directory and then later restoring the complete graph, including the vq embedding space.
This PR refactors the saver paths used in the model, because they did not make much sense before.
Now, when using a
ResNet
-descendant, the following flags are used as described:pretrained_checkpoint
: path of a file (!) that contains pre-trained weights, for example/Users/fp/.models/tiny_imagenet_alp05_2018_06_26.ckpt
- only used to restore weights (if specified)save_directory
: path of a directory (!) in which the complete graph's variables will be tried to be restored and saved, for example/Users/fp/.models/checkpoints
Also, a new flag has been introduced, which is used to name the stored checkpoint files (which are saved to the
save_directory
directory): thename
flag.The code has been tested using a
VQResNet
model with one vq-layer, first only restoring the pretrained ALP-weights, then saving the complete model to asave_directory
and then later restoring the complete graph, including the vq embedding space.