ry / tensorflow-resnet

ResNet model in TensorFlow
MIT License
1.66k stars 625 forks source link

Saving Resnet graph code #4

Closed mmuneebs closed 8 years ago

mmuneebs commented 8 years ago

Awesome work, looking forward to this. We get the graph saved as a metagraph but we can't really change much there easily after importing it. I was looking for a way to have the actual graph making code and then just restoring the weights by restoring the checkpoint file without the need for metagraph file. The reason is that I want to restore all weights to the full graph initially but then experiment with the graph by taking outputs at different layers of the resnet, which is only possible if I have the actual graph in code and I know the name of each layer. Do you think there's a way to get this code, ignoring other metadata like hyperparams. I think the info on this is there in convert.py and resnet.py but it's not clear enough to manually extract the desired code.

mmuneebs commented 8 years ago

OK so I did get the checkpoint to restore with the resnet.py code, but I think there's one more issue if we use it for distributed training. Since the number of workers are also saved to ckpt file resulting in this issue: Error running multiple workers on one machine which has multiple GPUs Is there a workaround for this besides setting the same worker setup in conversion script each time?