nextpyp / cet_pick

Cellular content mining and particle localization
https://nextpyp.app/milopyp/
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Quick Tutorial: "Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset." #4

Open bwmr opened 3 hours ago

bwmr commented 3 hours ago

Hi, I'm interesting in testing MiLoPYP. Currently, I'm trying to replicate the globular particle picking tutorial. However, when I run the first command as listed in the documentation

python simsiam_main.py simsiam2d3d --num_epochs 20 --exp_id test_sample --bbox 36 --dataset simsiam2d3d --arch simsiam2d3d_18 --lr 1e-3 --train_img_txt sample_train_explore_img.txt --batch_size 256 --val_intervals 20 --save_all --gauss 0.8 --dog 3,5

I receive the error message below. Training still starts, however. When checking the available architectures via python simsiam_main.py smsiam2d3d --help, the available architectures are ressmall_18 | unet_4 | unet_5.

Do I need additional model files for the simsiam2d3d_18 architecture, or is the quickstart protocol or help outdated?

Thanks and best regards, Benedikt

Skip loading parameter conv1.weight, required shapetorch.Size([64, 1, 3, 3]), loaded shapetorch.Size([64, 1, 7, 7]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.conv1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn1.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn1.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn1.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.conv2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn2.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn2.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.bn2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.downsample.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.downsample.1.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.downsample.1.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.downsample.1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.0.downsample.1.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.conv1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn1.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn1.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn1.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.conv2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn2.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn2.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Drop parameter layer4.1.bn2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Skip loading parameter fc.weight, required shapetorch.Size([128, 512]), loaded shapetorch.Size([1000, 512]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. Skip loading parameter fc.bias, required shapetorch.Size([128]), loaded shapetorch.Size([1000]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer1.0.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer1.0.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer1.1.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer1.1.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer2.0.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer2.0.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer2.0.downsample.1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer2.1.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer2.1.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer3.0.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer3.0.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer3.0.downsample.1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer3.1.bn1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param layer3.1.bn2.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.1.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.1.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.1.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.3.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.4.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.4.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.4.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.4.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.4.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.6.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.7.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.7.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param proj.7.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.1.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.1.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.1.running_mean.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.1.running_var.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.1.num_batches_tracked.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.3.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset. No param pred.3.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.

bwmr commented 2 hours ago

I tested giving --arch unet_5 and --arch ressmall_18 as parameters, and it also gives an error:

Traceback (most recent call last): File "simsiam_main.py", line 170, in main(opt) File "simsiam_main.py", line 118, in main log_dicttrain, , = trainer.train(epoch, train_loader) File "/home/Medalia/BWimmer/Scripts/cet_pick/cet_pick/trains/base_trainer.py", line 577, in train return self.run_epoch('train', epoch, data_loader) File "/home/Medalia/BWimmer/Scripts/cet_pick/cet_pick/trains/base_trainer.py", line 505, in run_epoch output, loss, loss_stats = model_with_loss(batch, epoch, phase) File "/home/Medalia/BWimmer/micromamba/envs/milopyp/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/home/Medalia/BWimmer/Scripts/cet_pick/cet_pick/trains/base_trainer.py", line 117, in forward outputs = self.model(batch['input'], batch['input_3d'], batch['input_aug'], batch['input_aug_3d']) File "/home/Medalia/BWimmer/micromamba/envs/milopyp/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, **kwargs) TypeError: forward() takes 2 positional arguments but 5 were given