Open
Description
Describe the bug
Using the "gemma2_2b_en" Gemma pre-trained model in a neural network results in ValueError: Cannot get result() since the metric has not yet been built.
during training.
To Reproduce
Stripped down example here: https://colab.research.google.com/drive/1r8XkaQBeUxP5fp9i1QLaikFIdbhcrKMw?usp=sharing
Expected behavior
It should be possible to use a Gemma pre-trained model as a neural network layer in a binary classifier and successfully train the model.
Additional context
This use of Gemma to generate embeddings for binary classification is based on this starting point by @jeffcarp.
Would you like to help us fix it?
No