Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Error while compiling on TPU #27

Open
gaphex opened this issue Jul 23, 2019 · 1 comment
Open

Error while compiling on TPU #27

gaphex opened this issue Jul 23, 2019 · 1 comment

Comments

@gaphex
Copy link

gaphex commented Jul 23, 2019

I am using tf 1.13 on Google Colab.
When compiling the model for TPU I got an issue:

training_model_tpu = tf.contrib.tpu.keras_to_tpu_model(
    training_model,
    strategy=tf.contrib.tpu.TPUDistributionStrategy(
        tf.contrib.cluster_resolver.TPUClusterResolver(TPU_ADDRESS)))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py in class_and_config_for_serialized_keras_object(config, module_objects, custom_objects, printable_module_name)
    164     cls = module_objects.get(class_name)
    165     if cls is None:
--> 166       raise ValueError('Unknown ' + printable_module_name + ': ' + class_name)
    167   return (cls, config['config'])
    168 

ValueError: Unknown layer: LayerNormalization

How do I compile a BERT-keras model for TPU?

@Separius
Copy link
Owner

Hi @gaphex
I didn't write the TPU code and don't have a clue on what's going on.
HighCWu wrote it so I'll mention him.
@HighCWu can you help us?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants