-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LookupError: No gradient defined for operation 'module_apply_tokens/bert/encoder/transformer/group_0_11/layer_11/inner_group_0/ffn_1/intermediate/output/dense/einsum/Ein$um' (op type: Einsum) #94
Comments
I faced the same issue with Hub2, work around is to use Hub1. |
FYI, Rachnas means using version 1 of the base model rather than 2. If someone finds a way to use version 2 please tell us the secret! |
Thank you for the advice Rachnas. It worked in Hub1. However, still wondering how to work using Hub2 :) |
astrongstorm, Rachnas have you guys been able to get reasonable results from any training? Even when I repeat the same example in they have provided I get pretty bad results. |
You need to specify vocab or spam_model_file (related to sentencepiece tokenization model) in the command line. add command-line arguments Note: only work for hub1. |
I am yet to get results. |
run_classifier_with_tfhub.py I got poor results too: INFO:tensorflow:***** Eval results ***** |
For this problem, I believe we are talking about the v2, there are some problems on tensor lookup on Hub2, right? |
facing same issue using version 2, but it works fine with version 1 by defined spam_model_file in command line |
I'm getting bad results on both version 1 and 2. Better results on 1 in comparison to 2 though. In my prior experiences with other models I found that Lamb was very sensitive to the parameters. I'm thinking of trying Adam to see if that is the problem. Has anyone tried using Adam instead of Lamb and see if they get better results? |
I am also having the same issue. |
The training problem is still not solved even after using Hub1 ( version 1 of ALBERT ) . It gives the following error - |
Have you solve the problem on v2? Could you share how to make it work? |
The issue with hub v2 modules is not fixed yet (v1 is good) |
The "no gradient defined for operation Einsum" was found to be caused by using an old version of TF. The full investigation is here. I've modified requirements.txt to explicitly request TF 1.15. Please run pip install -r requirements.txt and verify that you are running TF 1.15. If you still see the problem, let me know by posting to this thread. BTW, I merged the TF-hub functionality into I tested this with TF1.15 using the v2 hub modules and it seems to be working at HEAD.
|
I am still seeing the same issue with TF 1.15. using the "run_classifier" command mentioned above. v1 module works fine. LookupError: No gradient defined for operation 'module_apply_tokens/bert/encoder/transformer/group_0_11/layer_11/inner_group_0/ffn_1/intermediate/output/dense/einsum/Einsum' (op type: Einsum) |
with tensorflow version 1.15 we are still facing the same error |
Ah, now I'm able to reproduce it. There appears to be an issue with the way that the V2 modules were generated. I'm looking into it with the TF team and will get back with an answer soon hopefully. |
It looks like V2 modules were generated with a different version of TF, which contains native ops not present in TF 1.X releases. We will have to regenerate and re-release them with TF 1.15. Apologies for the inconvenience. I'll update this thread when the new modules are uploaded. |
We have regenerated the hub modules using TF1.15. |
I am facing the same issue with the traditional BERt on Colab. TF --> '1.15.0' Code for loading BERt
Exception thrown
|
Does the hub module have multiple tags? If so, did you tried any other? I faced a similar error with a different hub module. It turns out I was using the incorrect tag. |
I am using run_classifier_with_tfhub with --albert_hub_module_handle=https://tfhub.dev/google/albert_base/2.
I am getting error like "LookupError: No gradient defined for operation 'module_apply_tokens/bert/encoder/transformer/group_0_11/layer_11/inner_group_0/ffn_1/intermediate/output/dense/einsum/Ein$um' (op type: Einsum)"
The argument is:
python3 -m run_classifier_with_tfhub --data_dir=../../DataSet/CoLA/ --t
ask_name=cola --output_dir=testing_ttt --vocab_file=vocab.txt --albert_hub_module_handle=https://tfhub.dev/google/albert_base/2 --do_train=True --do_eval=True --max_seq
_length=128 --train_batch_size=32 --learning_rate=2e-05 --num_train_epochs=3.0
I am using tensorflow==1.15.0
The text was updated successfully, but these errors were encountered: