You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I tried to run iunet using a test_mnist file.
But this error occurred. How can I solve this error?
RuntimeError Traceback (most recent call last)
in
3 x, y = padding(x.to(device)), y.to(device)
4 optimizer.zero_grad()
----> 5 output = model(x)
6 loss = loss_fn(output, y)
7 loss.backward()
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py in forward(self, input)
98 def forward(self, input):
99 for module in self:
--> 100 input = module(input)
101 return input
102
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/mnt/dongsoo/RSNA/Models/iUNET/iunets-master/iunets-master/iunets/networks.py in forward(self, x)
186 # RevNet L
187 for j in range(depth):
--> 188 x = self.module_L[i]j
189
190 # Downsampling L
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/usr/local/lib/python3.6/dist-packages/memcnn/models/revop.py in forward(self, *xin)
162 self.num_bwd_passes,
163 len(xin),
--> 164 *(xin + tuple([p for p in self._fn.parameters() if p.requires_grad])))
165 if not self.keep_input:
166 if not pytorch_version_one_and_above:
/usr/local/lib/python3.6/dist-packages/memcnn/models/revop.py in forward(ctx, fn, fn_inverse, keep_input, num_bwd_passes, num_inputs, *inputs_and_weights)
26 # Makes a detached copy which shares the storage
27 x = [element.detach() for element in inputs]
---> 28 outputs = ctx.fn(*x)
29
30 if not isinstance(outputs, tuple):
RuntimeError: OrderedDict mutated during iteration
The text was updated successfully, but these errors were encountered:
Hi! That's weird. To be honest I haven't run the test_mnist.py in a while. I'll give it another look in the next few days, but can't promise anything before the NeurIPS deadline, after which I wanted to work on the code anyway (more documentation, bugfixes etc).
Best,
Christian
Hello,
I tried to run iunet using a test_mnist file.
But this error occurred. How can I solve this error?
RuntimeError Traceback (most recent call last)
in
3 x, y = padding(x.to(device)), y.to(device)
4 optimizer.zero_grad()
----> 5 output = model(x)
6 loss = loss_fn(output, y)
7 loss.backward()
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py in forward(self, input)
98 def forward(self, input):
99 for module in self:
--> 100 input = module(input)
101 return input
102
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/mnt/dongsoo/RSNA/Models/iUNET/iunets-master/iunets-master/iunets/networks.py in forward(self, x)
186 # RevNet L
187 for j in range(depth):
--> 188 x = self.module_L[i]j
189
190 # Downsampling L
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
538 result = self._slow_forward(*input, **kwargs)
539 else:
--> 540 result = self.forward(*input, **kwargs)
541 for hook in self._forward_hooks.values():
542 hook_result = hook(self, input, result)
/usr/local/lib/python3.6/dist-packages/memcnn/models/revop.py in forward(self, *xin)
162 self.num_bwd_passes,
163 len(xin),
--> 164 *(xin + tuple([p for p in self._fn.parameters() if p.requires_grad])))
165 if not self.keep_input:
166 if not pytorch_version_one_and_above:
/usr/local/lib/python3.6/dist-packages/memcnn/models/revop.py in forward(ctx, fn, fn_inverse, keep_input, num_bwd_passes, num_inputs, *inputs_and_weights)
26 # Makes a detached copy which shares the storage
27 x = [element.detach() for element in inputs]
---> 28 outputs = ctx.fn(*x)
29
30 if not isinstance(outputs, tuple):
RuntimeError: OrderedDict mutated during iteration
The text was updated successfully, but these errors were encountered: