if args.bn>0:
save_name = '{}_{}_s{}_{}_lr{}'.format(model_name, dataset_name, str(args.crop_scale), args.loss, args.lr)
else:
save_name = '{}_d{}{}_{}_{}{}_{}{}{}{}{}'.format(model_name, str(args.downsample), '_vp' if args.val_patch else '', dataset_name, args.crop_mode, '_cr'+str(args.crop_scale) if args.crop_mode!='one' else '', args.loss, '_v'+str(int(args.value_factor)) if args.value_factor!=1 else '', '_amp'+str(args.amp_k) if args.objective=='dmp+amp' else '', '_bg' if args.use_bg and 'bayes' in args.loss else '', '_lsn'+str(args.loss_n) if args.loss_n>1 else '')
1.上面这个出了错误
AttributeError: ‘Namespace’ object has no attribute ‘use_bg’
错误就是没有args.use_bg、直接设为空就好
2.torch中torchvision预训练模型默认下载在C:\Users\Server.cache\torch\checkpoints中
3.ModuleNotFoundError: No module named ‘modeling’
Because python will search in his system folders and in the current working directory. If you don’t run it in the repo, python doesn’t find this module.
好像找的是github的包,你给注释掉那些语句就行,应该用不到
好的话就看看他的论文吧
python gen_density_maps.py dataset=ShanghaiTech_part_B dataset.xhp_gt_dmaps_dir=./Test_Data/SH_partB_Density_map/test/gtdens
4.错误RuntimeError: An attempt has been made to start a new process before the current process…
是多线程导致的错误,要不将多线程的那段代码放在main函数中运行,或者将num_workers改为0(一般这样做,毕竟在windows中!)
5.最后这些都调试好了,问题出在这个网络用2070显卡跑显存不足!