zzangjinsun / NLSPN_ECCV20

Park et al., Non-Local Spatial Propagation Network for Depth Completion, ECCV, 2020
MIT License
321 stars 55 forks source link

Got different result when test the same model for several times #54

Closed yudmoe closed 1 year ago

yudmoe commented 1 year ago

When I test my train model, I got different result from the training phase. For example, model got RMSE: 0.0932 in training, but when I test it after trianing phase, I got RMSE: 0.0940.

So I do some experiment about test for several times in a same model. When I test the code use

$ python main.py --dir_data PATH_TO_NYUv2 --data_name NYU --split_json ../data_json/nyu.json \ --patch_height 228 --patch_width 304 --gpus 0,1,2,3 --loss 1.0L1+1.0L2 --epochs 20 \ --batch_size 12 --max_depth 10.0 --num_sample 500 --save NAME_TO_SAVE

and run the test() function for 5 times to test the given NYUv2 model by

change the line 426 in main.py test(args)
to
for _ in range(5): test(args)

I got RMSE: 0.0922 0.0925 0.0924 0.0913 0.0917 for 5 times.

It's strange, the code net.eval() didn't work? Do you get the same result when test the same model? or it's just my env problem?

yudmoe commented 1 year ago

OH, I got it, the sparse depth img generated from get_sparse_depth() is different in several test time