Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

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

Open
zhduan wants to merge 2 commits into
tensorflow:masterfrom
zhduan:master
Open

passing parameters into Dense Layer instead of into tf.keras.Sequential.add#272
zhduan wants to merge 2 commits into
tensorflow:masterfrom
zhduan:master

Conversation

@zhduan

@zhduan zhduan commented Jun 24, 2021

Copy link
Copy Markdown

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.

@google-cla google-cla Bot added the cla: yes label Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1 participant