Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
Yu-Zhewen committed Jan 10, 2024
2 parents 51347eb + ce85a7b commit cd0bab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/segmentation/brats2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def onnx_exporter(self, onnx_path):
replace_dict = {}
for module in self.model.modules():
if isinstance(module, nn.GroupNorm):
replace_dict[module] = nn.BatchNorm3d(module.num_channels)
replace_dict[module] = nn.BatchNorm3d(module.num_channels).to(self.device)
self.replace_modules(replace_dict)
torch.onnx.export(self, random_input, onnx_path, verbose=False, keep_initializers_as_inputs=True)
model = onnx.load(onnx_path)
Expand Down

0 comments on commit cd0bab9

Please sign in to comment.