I trasnform the 1-channel images to the 3-channel ,why did this happen on my laptop?
The error prompt is as follows:
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "", line 1, in
Traceback (most recent call last):
File "", line 1, in
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 105, in spawn_main
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 105, in spawn_main
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 105, in spawn_main
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 114, in _main
exitcode = _main(fd)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 114, in _main
exitcode = _main(fd) exitcode = _main(fd)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 225, in prepare
prepare(preparation_data)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 225, in prepare
prepare(preparation_data)
_fixup_main_from_path(data['init_main_from_path'])
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 114, in _main
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 225, in prepare
prepare(preparation_data)
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 225, in prepare
run_name="mp_main")
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 263, in run_path
run_name="mp_main")
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 263, in run_path
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
_fixup_main_from_path(data['init_main_from_path'])
run_name="mp_main")
File "D:\Anaconda3\envs\pytorchs\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 263, in run_path
run_name="mp_main")
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname) pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 96, in _run_module_code
pkg_name=pkg_name, script_name=fname)pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 96, in _run_module_code
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 96, in _run_module_code
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 85, in _run_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 85, in _run_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 85, in _run_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\envs\pytorchs\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)exec(code, run_globals)
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\pytorch_run.py", line 105, in
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\pytorch_run.py", line 105, in
exec(code, run_globals)
exec(code, run_globals)
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\pytorch_run.py", line 105, in
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\pytorch_run.py", line 105, in
torchsummary.summary(model_test, input_size=(3, 128, 128)) #三通道torchsummary.summary(model_test, input_size=(3, 128, 128)) #三通道torchsummary.summary(model_test, input_size=(3, 128, 128)) #三通道
torchsummary.summary(model_test, input_size=(3, 128, 128)) #三通道
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
model(*x)
model(*x)model(*x)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
result = self.forward(*input, **kwargs)
result = self.forward(*input, **kwargs) File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 116, in forward
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 116, in forward
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 116, in forward
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
model(*x)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 116, in forward
d2 = self.Up_conv2(d2)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
d2 = self.Up_conv2(d2)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
d2 = self.Up_conv2(d2)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
d2 = self.Up_conv2(d2)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 25, in forward
x = self.conv(x)
result = self.forward(*input, **kwargs) File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 25, in forward
result = self.forward(*input, **kwargs)result = self.forward(*input, **kwargs)
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 25, in forward
File "G:\pytorchfenge\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Unet-Segmentation-Pytorch-Nest-of-Unets-master\Models.py", line 25, in forward
result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
x = self.conv(x)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
x = self.conv(x)x = self.conv(x)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
result = self.forward(*input, **kwargs)
result = self.forward(*input, **kwargs) File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)
input = module(input)input = module(input)input = module(input)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\conv.py", line 338, in forward
result = self.forward(*input, **kwargs) result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\batchnorm.py", line 83, in forward
result = self.forward(*input, **kwargs)
self.padding, self.dilation, self.groups)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\conv.py", line 338, in forward
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\modules\conv.py", line 338, in forward
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 326.08 MiB already allocated; 4.47 MiB free; 7.92 MiB cached)
self.padding, self.dilation, self.groups)
self.padding, self.dilation, self.groups)
RuntimeErrorRuntimeError: : CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 326.08 MiB already allocated; 4.47 MiB free; 7.92 MiB cached)CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 326.08 MiB already allocated; 4.47 MiB free; 7.92 MiB cached)
exponential_average_factor, self.eps)
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\nn\functional.py", line 1697, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 350.08 MiB already allocated; 0 bytes free; 11.92 MiB cached)
Traceback (most recent call last):
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\utils\data\dataloader.py", line 511, in _try_get_batch
data = self.data_queue.get(timeout=timeout)
File "D:\Anaconda3\envs\pytorchs\lib\queue.py", line 172, in get
raise Empty
queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/pytorchfenge/Unet-Segmentation-Pytorch-Nest-of-Unets-master/Unet-Segmentation-Pytorch-Nest-of-Unets-master/pytorch_run.py", line 256, in
for x, y in train_loader:
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\utils\data\dataloader.py", line 576, in next
idx, batch = self._get_batch()
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\utils\data\dataloader.py", line 543, in _get_batch
success, data = self._try_get_batch()
File "D:\Anaconda3\envs\pytorchs\lib\site-packages\torch\utils\data\dataloader.py", line 519, in _try_get_batch
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str))
RuntimeError: DataLoader worker (pid(s) 14356, 9092, 1384, 1152) exited unexpectedly