作者你好,这是我遇到的问题
Traceback (most recent call last):
File "train_net.py", line 54, in
main()
File "train_net.py", line 50, in main
train(cfg, network)
File "train_net.py", line 25, in train
trainer.train(epoch, train_loader, optimizer, recorder)
File "/home/dayu/snake/lib/train/trainers/trainer.py", line 38, in train
output, loss, loss_stats, image_stats = self.network(batch)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, *kwargs)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 148, in forward
inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 159, in scatter
return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 35, in scatter_kwargs
inputs = scatter(inputs, target_gpus, dim) if inputs else []
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 28, in scatter
return scatter_map(inputs)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 15, in scatter_map
return list(zip(map(scatter_map, obj)))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 19, in scatter_map
return list(map(type(obj), zip(map(scatter_map, obj.items()))))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 15, in scatter_map
return list(zip(map(scatter_map, obj)))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 13, in scatter_map
return Scatter.apply(target_gpus, None, dim, obj)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/_functions.py", line 96, in forward
output.record_stream(main_stream)
RuntimeError: invalid device pointer: %p0
作者你好,这是我遇到的问题 Traceback (most recent call last): File "train_net.py", line 54, in
main()
File "train_net.py", line 50, in main
train(cfg, network)
File "train_net.py", line 25, in train
trainer.train(epoch, train_loader, optimizer, recorder)
File "/home/dayu/snake/lib/train/trainers/trainer.py", line 38, in train
output, loss, loss_stats, image_stats = self.network(batch)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, *kwargs)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 148, in forward
inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 159, in scatter
return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 35, in scatter_kwargs
inputs = scatter(inputs, target_gpus, dim) if inputs else []
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 28, in scatter
return scatter_map(inputs)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 15, in scatter_map
return list(zip(map(scatter_map, obj)))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 19, in scatter_map
return list(map(type(obj), zip(map(scatter_map, obj.items()))))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 15, in scatter_map
return list(zip(map(scatter_map, obj)))
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 13, in scatter_map
return Scatter.apply(target_gpus, None, dim, obj)
File "/home/dayu/anaconda3/envs/snake/lib/python3.7/site-packages/torch/nn/parallel/_functions.py", line 96, in forward
output.record_stream(main_stream)
RuntimeError: invalid device pointer: %p0