Skip to content

Instantly share code, notes, and snippets.

@joelouismarino
Created July 30, 2017 04:13
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/4d62afde11e2a0f2abe8780663c5495c to your computer and use it in GitHub Desktop.
Save joelouismarino/4d62afde11e2a0f2abe8780663c5495c to your computer and use it in GitHub Desktop.
if 'conv' in layer_name or 'proj' in layer_name or (('1x1' in layer_name or '3x3' in layer_name or '5x5' in layer_name) and 'inception' in layer_name):
for i in range(weights.shape[0]): # go through each filter
for j in range(weights.shape[1]): # go through each channel
weights[i, j] = np.rot90(weights[i, j], 2) # rotate it (twice)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment