Closed jiangxf0929 closed 1 year ago
Hi, which file did you run? Can you copy the complete error message?
hello, My test command is "python test_simple.py --load_weights_folder ./tmp/Mytrain/ --image_path ./data/mydata/image_02/data/", train command is "python train.py --data_path ./data --model_name mytrain --num_epochs 30 --batch_size 2 --mypretrain ./preweights/lite-mono-pretrain.pth --lr 0.0001 5e-6 31 0.0001 1e-5 31". Error message is "-> Loading model from ./tmp/Mytrain/
Loading pretrained encoder
Traceback (most recent call last):
File "test_simple.py", line 192, in
What version of PyTorch are you using? There seems to be a problem on the PyTorch side.
torch 1.12.1, Which version did you use in LiteMono?
I tested with PyTorch 1.7.1
and 1.12.1
.
Could you check if you are using the correct checkpoints? For testing you need to load this checkpoint (default: Lite-Mono) by setting --load_weights_folder
, and for training please load this file by setting --mypretrain
I have tested with your checkpoint (lite-mono_1024 and lite-mono_640), and it works. but when I use your pretrain.pth to train and test my data, the same error appears.
Ok, I find, my image size is not 640 \times 192 or 1024 \times 320
Glad you found the problem! If you want to train with different image sizes, you can modify the code.
Many thanks for your patience and help! 😊
Hi, when I train my dataset and load weights to test, I get the following error, what is the reason? AttributeError: 'LiteMono' object has no attribute 'dilation'