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

UnboundLocalError: local variable 'DOA_batch_pred_cart' referenced before assignment #2

Open
albuca09 opened this issue Dec 24, 2024 · 1 comment

Comments

@albuca09
Copy link

Good evening!
How can I resolve the error below:

UnboundLocalError Traceback (most recent call last)
in <cell line: 86>()
88 sys.stdout.flush()
89
---> 90 learner.train_epoch(dataset_train, trajectories_per_batch, trajectories_per_gpu_call, lr=lr, epoch=epoch_idx)
91 loss_test, rmsae_test = learner.test_epoch(dataset_test, trajectories_per_gpu_call)
92 print('Test loss: {:.4f}, Test rmsae: {:.2f}deg'.format(loss_test, rmsae_test) )

/content/Cross3D/acousticTrackingLearners.py in train_epoch(self, dataset, trajectories_per_batch, trajectories_per_gpu_call, lr, epoch)
90 optimizer.zero_grad()
91
---> 92 # Liberar memória
93 mic_sig_batch, acoustic_scene_batch = None, None
94 x_batch, DOA_batch = None, None

UnboundLocalError: local variable 'DOA_batch_pred_cart' referenced before assignment

@DavidDiazGuerra
Copy link
Owner

Hello,

Did you make any changes to the code? Those line numbers don't seem to match the ones in the repository. I don't understand in which line the error happens since the one indicated the traceback doesn't use the variable DOA_batch_pred_cart and it's just a comment.

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

2 participants