Skip to content
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

ValueError Exception on batch_seen variable #332

Open
buckleytoby opened this issue May 5, 2022 · 2 comments
Open

ValueError Exception on batch_seen variable #332

buckleytoby opened this issue May 5, 2022 · 2 comments

Comments

@buckleytoby
Copy link

Getting this error when trying to train on my own dataset:

ValueError: Exception encountered when calling layer "yolo_layer_2" (type YoloLayer).

in user code:

    File "C:\Users\toby-\Documents\GitHub\keras-yolo3\yolo.py", line 47, in call  *
        batch_seen = tf.Variable(0.)

    ValueError: tf.function only supports singleton tf.Variables created on the first call. Make sure the tf.Variable is only created once or created outside tf.function. See https://www.tensorflow.org/guide/function#creating_tfvariables for more information.       


Call arguments received:
  • x=['tf.Tensor(shape=(None, None, None, 3), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 231), dtype=float32)', 'tf.Tensor(shape=(None, None, None, 3, 77), dtype=float32)', 'tf.Tensor(shape=(None, 1, 1, 1, 28, 4), dtype=float32)']

Any ideas?

@TanvirTaaha
Copy link

Got the same error

@Sneh09
Copy link

Sneh09 commented Nov 18, 2022

Getting same error. Did you solve the error ?

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

No branches or pull requests

3 participants