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

Errors when running models more than once. #321

Open
smilo7 opened this issue Jul 16, 2021 · 0 comments
Open

Errors when running models more than once. #321

smilo7 opened this issue Jul 16, 2021 · 0 comments
Labels
bug Something isn't working machine learning

Comments

@smilo7
Copy link
Collaborator

smilo7 commented Jul 16, 2021

Both errors occur when importing tensorflow JS then running a model.

To reproduce on https://sema.codes/tutorial/03-machine-learning/07-rl-gosling/

  1. Run live code (the code already in the window)
  2. Run step 1 then step 2 of the JS code.
  3. Run step 1 and then 2 of JS code again.

Errors then appear.

Error 1:

Eval exception on Learner:  Error: Variable with name dense_Dense1/kernel was already registered
    at e.t.makeVariable (VM5 tf.min.js:17)
    at qE (VM5 tf.min.js:17)
    at new e (VM5 tf.min.js:17)
    at t.n.addWeight (VM5 tf.min.js:17)
    at t.n.build (VM5 tf.min.js:17)
    at VM5 tf.min.js:17
    at AO (VM5 tf.min.js:17)
    at t.n.apply (VM5 tf.min.js:17)
    at t.n.add (VM5 tf.min.js:17)
    at Object.model.init (eval at gevalToConsole (6be94ec2-3b58-461d-9631-239a1a127aa7:366), <anonymous>:40:13)
gevalToConsole @ 6be94ec2-3b58-461d-9631-239a1a127aa7:371
onmessage @ 6be94ec2-3b58-461d-9631-239a1a127aa7:381

and

Error 2:

models.js:582 Uncaught (in promise) TypeError: Sequential model cannot be built: model is empty. Add some layers first.
    at t.n.build (VM5 tf.min.js:17)
    at t.n.predict (VM5 tf.min.js:17)
    at eval (eval at gevalToConsole (6be94ec2-3b58-461d-9631-239a1a127aa7:366), <anonymous>:67:22)
    at VM5 tf.min.js:17
    at e.t.scopedRun (VM5 tf.min.js:17)
    at e.t.tidy (VM5 tf.min.js:17)
    at Object.jI [as tidy] (VM5 tf.min.js:17)
    at Object.model.nextAction (eval at gevalToConsole (6be94ec2-3b58-461d-9631-239a1a127aa7:366), <anonymous>:66:16)
    at step (eval at gevalToConsole (6be94ec2-3b58-461d-9631-239a1a127aa7:366), <anonymous>:142:17)
    at input (eval at gevalToConsole (6be94ec2-3b58-461d-9631-239a1a127aa7:366), <anonymous>:193:31)

If live code is not run (skip step 1 of steps to reproduce) then then Error 1 is the only one to appear.

@smilo7 smilo7 added machine learning bug Something isn't working labels Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working machine learning
Projects
None yet
Development

No branches or pull requests

1 participant