HiLab-git / SSL4MIS

Semi Supervised Learning for Medical Image Segmentation, a collection of literature reviews and code implementations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError

XmySz opened this issue · comments

The python environment I am using is 3.9.
when i run train_mean_teacher_3D, the following error occurred, does anyone know where is the problem?

Namespace(root_path='../data/BraTS2019', exp='BraTs2019_Mean_Teacher', model='unet_3D', max_iterations=30000, batch_size=4, deterministic=1, base_lr=0.01, patch_size=[96, 96, 96], seed=1337, labeled_bs=2, labeled_num=25, ema_decay=0.99, consistency_type='mse', consistency=0.1, consistency_rampup=200.0)
total 250 samples
12 iterations per epoch
0%| | 0/2501 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/home/sci/PycharmProjects/SSL4MIS/code/train_mean_teacher_3D.py", line 259, in
train(args, snapshot_path)
File "/home/sci/PycharmProjects/SSL4MIS/code/train_mean_teacher_3D.py", line 156, in train
loss.backward()
File "/home/sci/anaconda3/envs/ssl4mis/lib/python3.9/site-packages/torch/_tensor.py", line 396, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/sci/anaconda3/envs/ssl4mis/lib/python3.9/site-packages/torch/autograd/init.py", line 173, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: std::bad_alloc