Structure a Keras Tensorboard graph

前端 未结 1 491
抹茶落季
抹茶落季 2021-02-09 10:41

When I create a simple Keras Model

model = Sequential()
model.add(Dense(10, activation=\'tanh\', input_dim=1))
model.add(Dense(1, activation=\'linear\'))
model.c         


        
相关标签:
1条回答
  • 2021-02-09 11:11

    You can create a name scope to group layers in your model using with K.name_scope('name_scope').

    Example:

    with K.name_scope('CustomLayer'):
      # add first layer in new scope
      x = GlobalAveragePooling2D()(x)
      # add a second fully connected layer
      x = Dense(1024, activation='relu')(x)
    

    Thanks to https://github.com/fchollet/keras/pull/4233#issuecomment-316954784

    0 讨论(0)
提交回复
热议问题