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

AttributeError: 'Tensor' object has no attribute 'assign' #25

Open
pathakrohit08 opened this issue Mar 4, 2019 · 5 comments
Open

AttributeError: 'Tensor' object has no attribute 'assign' #25

pathakrohit08 opened this issue Mar 4, 2019 · 5 comments

Comments

@pathakrohit08
Copy link

pathakrohit08 commented Mar 4, 2019

I installed all the packages as mentioned in your requirements.txt. I am having error in model.fit_generator
line 687, in train_model workers=6,epochs=1) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/engine/training.py", line 2080, in fit_generator self._make_train_function() File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/engine/training.py", line 990, in _make_train_function loss=self.total_loss) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/optimizers.py", line 257, in get_updates self.updates.append(K.update(a, new_a)) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 963, in update return tf.assign(x, new_x) File "/home/rohit/home/Development/Test/03042019/project1_env/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 284, in assign return ref.assign(value, name=name)

@miguelwon
Copy link

Same here. Were you able to overcome the error?

@kermitt2
Copy link
Owner

It's likely an issue with the compiled embeddings. If you

  1. remove the embeddings db by the command:

rm -rf data/db/EMBEDDINGS_NAME

  1. double check the path to the embeddings path you are using in embedding-registry.json

  2. and restart

does it work after compiling the embeddings?

I will implement some further consistency check on the embeddings DB, embeddings path, and some automated internet download of the embeddings, which should prevent these kind of issues.

@de-code
Copy link
Contributor

de-code commented Apr 30, 2020

I got that error when list_classes was empty

@lfoppiano
Copy link
Collaborator

I think this issue is obsolete and can be closed

@kermitt2
Copy link
Owner

I don't remember when, but I added a check on the validity of a compiled embeddings db, so that problem should be solved.

But I don't know if the error is really related to this.

Nothing was done about testing empty list_classes I think.

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

5 participants