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

Latent var only experiments error #17

Closed
han1222 opened this issue Apr 21, 2022 · 2 comments
Closed

Latent var only experiments error #17

han1222 opened this issue Apr 21, 2022 · 2 comments

Comments

@han1222
Copy link

han1222 commented Apr 21, 2022

I want to train model with Latent var only mode.

from issue #13 I changed train config but i got this Exception

Do you know what the problem is ?

======
Loading NuScenes tables for version v1.0-trainval...
23 category,
8 attribute,
4 visibility,
64386 instance,
12 sensor,
10200 calibrated_sensor,
2631083 ego_pose,
68 log,
850 scene,
34149 sample,
2631083 sample_data,
1166187 sample_annotation,
4 map,
Done loading in 20.600 seconds.

Reverse indexing ...
Done reverse indexing in 5.2 seconds.

Epoch (1/100)
Traceback (most recent call last):
File "train.py", line 38, in
trainer.train(num_epochs=int(args.num_epochs), output_dir=args.output_dir)
File "/media/han/289e8c3e-12db-47da-8b89-15b58bef567d/home/han/prediction_256/PGP/train_eval/trainer.py", line 109, in train
train_epoch_metrics = self.run_epoch('train', self.tr_dl)
File "/media/han/289e8c3e-12db-47da-8b89-15b58bef567d/home/han/prediction_256/PGP/train_eval/trainer.py", line 153, in run_epoch
predictions = self.model(data['inputs'])
File "/home/han/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/media/han/289e8c3e-12db-47da-8b89-15b58bef567d/home/han/prediction_256/PGP/models/model.py", line 35, in forward
outputs = self.decoder(agg_encoding)
File "/home/han/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/media/han/289e8c3e-12db-47da-8b89-15b58bef567d/home/han/prediction_256/PGP/models/decoders/lvm.py", line 57, in forward
raise Exception('Expected ' + str(self.num_samples) + 'encodings for each train/val data')
Exception: Expected 1000encodings for each train/val data

Thank you in advance.

@nachiket92
Copy link
Owner

My bad, there's one more change needed in the training config file for the latent var only experiments.

In decoder_args, agg_type should be 'combined'.

This is because without the graph traversals to selectively aggregate node encodings along sampled routes, the aggregator returns a single encoding of the entire scene.

@han1222
Copy link
Author

han1222 commented Apr 22, 2022

I also remove 'pi_bc' in 'tr_metric' , 'val_metrics' and then It works

Thank you for your prompt response.

@han1222 han1222 closed this as completed Apr 22, 2022
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