Skip to content

Error when increase batch size #7

@Phan-Trung-Thuan

Description

@Phan-Trung-Thuan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions