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

Error when increase batch size #7

Open
Phan-Trung-Thuan opened this issue May 13, 2024 · 0 comments
Open

Error when increase batch size #7

Phan-Trung-Thuan opened this issue May 13, 2024 · 0 comments

Comments

@Phan-Trung-Thuan
Copy link

Phan-Trung-Thuan commented May 13, 2024

Hello, when I increase batch size to 64 in utilities/argument_funcs.py, I got this error. Note that I'm running on kaggle gpu
Setting:

dataset_dir: ./dataset/
input_dir_music: ./dataset/vevo_chord/lab_v2_norm
input_dir_video: ./dataset/vevo_vis
output_dir: ./saved_models
weight_modulus: 1
print_modulus: 1

n_workers: 4
force_cpu: False
tensorboard: False

continue_weights: None
continue_epoch: None

lr: None
ce_smoothing: None
batch_size: 64
epochs: 100

rpr: True
max_sequence_midi: 2048
max_sequence_video: 300
max_sequence_chord: 300
n_layers: 6
num_heads: 8
d_model: 512

dim_feedforward: 1024
dropout: 0.1
is_video: True

Traceback (most recent call last):
File "/kaggle/working/Video2Music/train.py", line 283, in
main(vm, False)
File "/kaggle/working/Video2Music/train.py", line 193, in main
train_metric_dict = eval_model(model, train_loader,
File "/kaggle/working/Video2Music/utilities/run_model_vevo.py", line 266, in eval_model
y= model(x,
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/kaggle/working/Video2Music/model/video_music_transformer.py", line 77, in forward
feature_key_padded = torch.full((x.shape[0], x.shape[1], 1), feature_key.item())
ValueError: only one element tensors can be converted to Python scalars

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

1 participant