MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / get_device

Method get_device

tests/nonconfig_workflow.py:234–235  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 return "."
233
234 def get_device(self):
235 return torch.device("cuda" if torch.cuda.is_available() else "cpu")
236
237 def get_inferer(self):
238 return SlidingWindowInferer(roi_size=self.parser.roi_size, sw_batch_size=1, overlap=0)

Callers 3

forwardMethod · 0.80
fnMethod · 0.80

Calls

no outgoing calls

Tested by 1

fnMethod · 0.64