How do I list certain variables in the checkpoint?

前端 未结 3 1306
时光说笑
时光说笑 2021-02-06 02:21

I am working with autoencoders. My checkpoint contains the complete state of the network (i.e. the encoder, decoder, optimizer, etc). I want to fool around with the encodings. T

3条回答
  •  灰色年华
    2021-02-06 02:56

    There's list_variables method in checkpoint_utils.py which lets you see all saved variables.

    However, for your use-case, it may be easier to restore with a Saver. If you know the names of the variables when you saved the checkpoint, you can create a new saver, and tell it to initialize those names into new Variable objects (possibly with different names). This is used in CIFAR example to select a restore a subset of variables. See Choosing which Variables to Save and Restore in the Howto

提交回复
热议问题