Closed ouceduxzk closed 8 years ago
You are correct- there is an issue here. If you downloaded the weights from the link in the readme file, they suit a sequential model, whereas my model is a graph (to allow a split net). You should run HelperScripts/CreateVggGraphWeights.py first to create a weights file suited for a graph. I will add this to the readme- thank you!
this HelperScripts/CreateVggGraphWeights.py runs with error
File "HelperScripts/CreateVggGraphWeights.py", line 150, in
I am running the FullNetGenerator to test the model loading, comes with such problem
Using gpu device 1: Tesla K80 (CNMeM is disabled, cuDNN 4007) Traceback (most recent call last): File "FullNetGenerator.py", line 40, in
fn = fng.create_full_net()
File "FullNetGenerator.py", line 12, in create_full_net
net = vgg_provider.get_vgg_partial_graph(weights_path=self.weights_path, with_output=False)
File "/home/zaikun/dl/statefarm/NNProject_DeepMask/VggDNetGraphProvider.py", line 60, in get_vgg_partial_graph
model = self.get_vgg_full_graph(weights_path, False)
File "/home/zaikun/dl/statefarm/NNProject_DeepMask/VggDNetGraphProvider.py", line 56, in get_vgg_full_graph
model.load_weights(weights_path)
File "/users/zaikun/anaconda2/lib/python2.7/site-packages/keras/legacy/models.py", line 775, in load_weights
super(Graph, self).load_weights(fname)
File "/users/zaikun/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 2309, in load_weights
str(len(flattened_layers)) + '.')
Exception: You are trying to load a weight file containing 37 layers into a model with 0.