You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting the below error:
Training: 0% 0/1 [00:00<?, ?it/s]INFO:root:Reading data from data/greetings-train.txt
INFO:root:Tokenizing 298 sentences
Traceback (most recent call last):
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train.py", line 117, in
main()
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train.py", line 106, in main
).run_loop()
^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 186, in run_loop
self.run_step(batch, cond)
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 206, in run_step
self.forward_backward(batch, cond)
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 268, in forward_backward
losses = compute_losses()
^^^^^^^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/modeling/diffusion/respace.py", line 99, in training_losses
return super().training_losses(self._wrap_model(model), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/modeling/diffusion/gaussian_diffusion.py", line 246, in training_losses
x_start_mean = model.model.module.get_embeds(input_ids)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1695, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'TransformerNetModel' object has no attribute 'module'
The text was updated successfully, but these errors were encountered:
I solved the problem, because you are running the model with the cpu, so you need to remove the "module" to solve the problem in the gaussian_diffusion.py. such as "x_start_mean = model.model.get_embeds(input_ids)". You won't have this problem if you're running on a gpu.
When I am trying to run this
bash scripts/run_train.sh greetings 1 False False False 1
I am getting the below error:
Training: 0% 0/1 [00:00<?, ?it/s]INFO:root:Reading data from data/greetings-train.txt
INFO:root:Tokenizing 298 sentences
Traceback (most recent call last):
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train.py", line 117, in
main()
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train.py", line 106, in main
).run_loop()
^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 186, in run_loop
self.run_step(batch, cond)
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 206, in run_step
self.forward_backward(batch, cond)
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/train_infer/train_loop.py", line 268, in forward_backward
losses = compute_losses()
^^^^^^^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/modeling/diffusion/respace.py", line 99, in training_losses
return super().training_losses(self._wrap_model(model), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/gdrive/MyDrive/minimal-text-diffusion/src/modeling/diffusion/gaussian_diffusion.py", line 246, in training_losses
x_start_mean = model.model.module.get_embeds(input_ids)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1695, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'TransformerNetModel' object has no attribute 'module'
The text was updated successfully, but these errors were encountered: