Open bksaini078 opened 3 years ago
change layer to x=tf.keras.layers.Dropout(0.2)(x) x= tf.keras.layers.Dense(64)(x) x=tf.keras.layers.Dense(32)(x) x=tf.keras.layers.Dense(2,activation='sigmoid')(x) output=tf.keras.layers.Dropout(0)(x)
Because if there's an Activation function on the last layer, there's a problem, so I'm going to add a Dropout layer that doesn't do anything on the last layer.
Thank you for your reply, I tried the proposed approach. Unfortunately, it is showing the same error message. Did you run the BERT model successfully on your end?
hey there @bksaini078, were you able to load the BERT from tensorflow-hub
? if so, would you mind showing how you did that? i'm unable to load the BERT model using hub.KerasLayer
(see #276)
While fine-tuning the transformers model i.e.
transformers.TFDistilBertModel.from_pretrained(pretrained_weights)
I got this error message. Can someone please help how to resolve this issue? Or, someone able to run the Transfomer BERT models in mac M1?Reference code: