Skip to content
Discussion options

You must be logged in to vote

Yes, the SlidingWindowInferer provides options of sw_device and device. to address the memory issue I think you can do something like:

  • set inputs.to('cpu')
  • set model.to('cuda')
  • then run the sliding window with SlidingWindowInferer(..., sw_device='cuda', device='cpu', ...)

so that only the model(window_data) part runs on cuda device, the rest is with cpu.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@phcerdan
Comment options

@Nic-Ma
Comment options

Answer selected by neuronflow
Comment options

You must be logged in to vote
1 reply
@wyli
Comment options

wyli Dec 16, 2021
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants