This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import keras | |
| from keras.layers.convolutional import Conv2D, AtrousConvolution2D | |
| import torch | |
| import numpy as np | |
| def keras_to_pyt(km, pm=None): | |
| weight_dict = dict() | |
| for layer in km.layers: | |
| if (type(layer) is Conv2D) or (type(layer) is AtrousConvolution2D): |