Skip to content

Instantly share code, notes, and snippets.

@joelouismarino
Created July 30, 2017 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelouismarino/d22a1677d7a76ec4ab074d44f8ceb921 to your computer and use it in GitHub Desktop.
Save joelouismarino/d22a1677d7a76ec4ab074d44f8ceb921 to your computer and use it in GitHub Desktop.
for layer_name in net.params.keys():
weights = np.copy(net.params[layer_name][0].data)
biases = np.copy(net.params[layer_name][1].data)
model_layer = googlenet.get_layer(name=layer_name)
model_layer.set_weights([weights, biases])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment