Why keras not returning the layer for me? -
here simple code:
from keras.models import sequential keras.layers import dense model = sequential() model.add(dense(32, input_shape=(784, )) model.add(dense(64)) model.add(dense(10)) l in model.layers: print(l.name) print(model.get_layer(l.name))
here output got:
dense_1 <keras.layers.core.dense object @ 0x0000000027cc2128> dense_2 none dense_3 none
which quite awkward, mean have 3 dense layers, names listed correctly, why model.get_layer()
function not returning other 2 dense layers instance me?
Comments
Post a Comment