neuroailab / tfutils

Utilities for working with tensorflow
MIT License
25 stars 8 forks source link

Working dictionary saver #68

Closed anayebi closed 7 years ago

anayebi commented 7 years ago

Added functionality to restore a subset of variables from a checkpoint that has a different name from the variables that you want restored in the current model.

It just requires adding an extra dictionary argument to 'load_params', called 'load_param_dict' whose keys are the names of the variables from the checkpoint that you want to load, and the values are the names of the variables in the current model that you want to restore. .e.g.: 'load_param_dict': {'V1_saved/conv/weights':'V1_curr/conv/weights'}