pytorch开发经验问题总结-更新ing

问题一:

[W pthreadpool-cpp.cc:90] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)
[W pthreadpool-cpp.cc:90] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)
[W pthreadpool-cpp.cc:90] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)
[W pthreadpool-cpp.cc:90] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)

parser.add_argument(’–num_workers’,default=1,type=int)

https://discuss.pytorch.org/t/dataloader-when-num-worker-0-there-is-bug/25643/37

问题二:

    raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
torch.nn.modules.module.ModuleAttributeError: 'AnchorGenerator' object has no attribute '_cache'

原因是pytorch版本问题,训练模型和测试的版本不一致

问题三:

torch.cuda.synchronize()
model_time = time.time()

使用该操作等待GPU全部执行结束,再执行model_time = time.time()

问题四:
@torch.no_grad()
def evaluate(model, data_loader, device):

修饰符

问题五:
调整学习率
pytorch开发经验问题总结-更新ing_第1张图片

你可能感兴趣的:(Deep,Learning)