keras-docs-zh icon indicating copy to clipboard operation
keras-docs-zh copied to clipboard

Order of stored weights.

Open JianmingTONG opened this issue 6 years ago • 0 comments

Hi, I wanna to extract the weights from VGG model in the keras library for further other usage. And I read the weights from the following script

from keras.applications.vgg16 import VGG16
model = VGG16()
weights = []
for layer in model.layers:
    weights.append(layer.get_weights())  # list of numpy array

And the shape of weights in CONV1 is tuple(3,3,3,64). Could you help me check the order of this tuple? Is it (width of filter, height of filter, channel of filter, number of kernel) or ( height of filter, width of filter, channel of filter, number of kernel)?

Thanks

JianmingTONG avatar Oct 24 '19 01:10 JianmingTONG