ranking icon indicating copy to clipboard operation
ranking copied to clipboard

passing parameters into Dense Layer instead of into tf.keras.Sequential.add

Open zhduan opened this issue 3 years ago • 0 comments

In create_tower function, the dictionary parameters should be passed into tf.keras.layers.Dense instead of into tf.keras.Sequential.add function. The only parameter tf.keras.Sequential.add takes is a LayerObject. The current code would result error like

TypeError: add() got an unexpected keyword argument 'kernel_regularizer'

when a key value pair like "kernel_regularizer": tf.keras.regularizers.l2 is passed.

zhduan avatar Jun 24 '21 23:06 zhduan