@@ -23,7 +23,7 @@ Static model
2323 nn = Dropout(keep = 0.8 )(nn)
2424 nn = Dense(n_units = 800 , act = tf.nn.relu)(nn)
2525 nn = Dropout(keep = 0.8 )(nn)
26- nn = Dense(n_units = 10 , act = tf.nn.relu )(nn)
26+ nn = Dense(n_units = 10 , act = None )(nn)
2727 M = Model(inputs = ni, outputs = nn, name = " mlp" ) # “name" is optional
2828 return M
2929
@@ -49,7 +49,7 @@ In this case, you need to manually input the output shape of the previous layer
4949 self .dropout2 = Dropout(keep = 0.8 )
5050 self .dense2 = Dense(n_units = 800 , act = tf.nn.relu, in_channels = 800 )
5151 self .dropout3 = Dropout(keep = 0.8 )
52- self .dense3 = Dense(n_units = 10 , act = tf.nn.relu , in_channels = 800 )
52+ self .dense3 = Dense(n_units = 10 , act = None , in_channels = 800 )
5353
5454 def forward (self , x , foo = False ):
5555 z = self .dropout1(x)
@@ -156,7 +156,7 @@ Print model information
156156 # (dropout_1): Dropout(keep=0.8, name='dropout_1')
157157 # (dense_1): Dense(n_units=800, relu, in_channels='800', name='dense_1')
158158 # (dropout_2): Dropout(keep=0.8, name='dropout_2')
159- # (dense_2): Dense(n_units=10, relu , in_channels='800', name='dense_2')
159+ # (dense_2): Dense(n_units=10, None , in_channels='800', name='dense_2')
160160 # )
161161
162162 import pprint
@@ -195,7 +195,7 @@ Print model information
195195 # 'name': 'dropout_3'},
196196 # 'class': 'Dropout',
197197 # 'prev_layer': ['dense_2_node_0']},
198- # {'args': {'act': 'relu' ,
198+ # {'args': {'act': None ,
199199 # 'layer_type': 'normal',
200200 # 'n_units': 10,
201201 # 'name': 'dense_3'},
0 commit comments