privacy
privacy copied to clipboard
ValueError: None values not supported.
大概确定了应该是网络模型中映入了预训练的bert模型,但不知道该怎么改。
network structure:
embedding = bert_model(input_id, attention_mask=input_mask, token_type_ids=input_atn)[0]
x = tf.keras.layers.GlobalAveragePooling1D()(embedding)
x = tf.keras.layers.Dropout(0.15)(x)
x = tf.keras.layers.Dense(3, activation='softmax')(x)
model = tf.keras.models.Model(inputs=[input_id, input_mask, input_atn], outputs=x)
Mostly because the bert embedding, but dont know how to fix it.
最后把embedding层全设成untrainable能跑了 Finally I set the embedding layer all not trainable and it works