Keras, How to get the output of each layer?

后端 未结 10 1941
借酒劲吻你
借酒劲吻你 2020-11-22 07:34

I have trained a binary classification model with CNN, and here is my code

model = Sequential()
model.add(Convolution2D(nb_filters, kernel_size[0], kernel_si         


        
10条回答
  •  长情又很酷
    2020-11-22 07:53

    Well, other answers are very complete, but there is a very basic way to "see", not to "get" the shapes.

    Just do a model.summary(). It will print all layers and their output shapes. "None" values will indicate variable dimensions, and the first dimension will be the batch size.

提交回复
热议问题