Hello researcher!
I've been studying the ProtoNet example you provided recently, and I changed the dataset to ESC-50. However, I encountered some issues in the process. When I change the train_batch_size parameter to any number greater than 1, the program fails to run. Unlike in the MAML example, I haven't encountered this problem. I would like to ask about the meaning of the train_batch_size parameter and whether it's a mistake in my configuration. Below are my configuration files and the execution report.
config
base:
n_way: 5
k_shot: 1
q_queries: 1
distance: 'l2'
task_type: 'PROTO_VAR_Kaggle_5_second_'
cuda: 0
num_repeats: 1
out_dim: 128
models: ['Hybrid']
hyper:
initial_lr: 0.0005 #0.01 #0.005
The lowest lr that is ever hit
min_lr: 0.0001
Patience for val loss
patience: 100000
Factor of lr reduction-new_lr = lr*factor
factor: 0.1
Number of episodes to warm up for before using scheduler
scheduler_warm_up: 20
training:
epochs: 1000 #1500
episodes_per_epoch: 10
train_batch_size: 5 # 10/20/50
How many tasks we want at each step
val_tasks: 200
test_tasks: 10000
break_threshold: 1000
Episodes between validation steps
eval_spacing: 100
trans_batch: False
Number workers for the dataloaders
num_workers: 4
data:
variable: False
name: 'ESC' # Kaggle_18
norm: 'global'
type: 'spec' # rawtospec/spec/variable_spec
fixed: True
fixed_path: 'dataset_/splits/ESC_paper_splits.npy'
data_path: '/home/mitlab/kuo/ESC-50-master/ESC_spec'
Split percentages for train/val/test
split:
train: 0.7
val: 0.1
test: 0.2
Traceback (most recent call last):
File "BaseLooperProto.py", line 106, in
pre, post, loss, post_std = single_run_main(params=params,
File "/home/mitlab/kuo/Proto_Kaggle18/ProtoMain.py", line 155, in single_run_main
pre, post, loss, post_std = fit(
File "/home/mitlab/kuo/Proto_Kaggle18/fit_proto.py", line 103, in fit
val_loss, val_pre, val_post, val_post_std = validation_step(valLoader, learner,
File "/home/mitlab/kuo/Proto_Kaggle18/fit_proto.py", line 208, in validation_step_fixed
x, y = prep_batch(batch, params['training']['train_batch_size'])
File "/home/mitlab/kuo/Proto_Kaggle18/all_prep_batches.py", line 41, in prep_batch_fixed
x = x.reshape(meta_batch_size, (n_wayk_shot + n_wayq_queries),
RuntimeError: shape '[5, 10, 128, 157]' is invalid for input of size 200960