Skip to content

RuntimeError: Graph is finalized and cannot be modified. #2

@Swty13

Description

@Swty13

Hi Sambit,

I am trying to build my own multilingual universal sentence encoder model by using your tensorflow_hub_useT.ipynb.

I got following following error:
1.AttributeError: module 'tensorflow' has no attribute 'placeholder'
fixed by:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
But then I get following error
2. raise RuntimeError("Graph is finalized and cannot be modified.")
RuntimeError: Graph is finalized and cannot be modified.
I tried :-
tf.reset_default_graph()
tf.Graph().as_default()
But issue is not resolved.

Current Version:
tensorflow==2.3.1
tensorflow-hub==0.10.0
tensorflow-text==2.3.0

I guess there is some version issue here.Could you plz help me to mention what version should I used.
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions