RandZoom on batch
See original GitHub issueIs your feature request related to a problem? Please describe.
RandZoom
uses Zoom
which uses torch.nn.functional.interpolate
under the hood to extract randomly zoomed images. Although torch.nn.functional.interpolate
is capable of being applied on batch x channels x [optional depth] x [optional height] x width, Zoom
and RandZoom
don’t.
Instead, they treat the channel dimension as spatial dimension. This is causing an issue since there is no error and warning if user apply it on a batched dataset.
This requires to distinguish between 3D multi-channel images vs 2D multi-channel batched images. Although an automatic logic would be hard to achieve, a simple flag can do the work.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to use random in BATCH script? - Stack Overflow
Using an expression like SET /A test=%RANDOM% * 100 / 32768 + 1 , you can change the range to anything you like...
Read more >Generate Random Numbers - Windows CMD - SS64
The Windows CMD shell contains a built-in variable called %RANDOM% that can be used to generate random numbers. ... The range of numbers...
Read more >Batch files - How To ... Generate Random Numbers
The most basic form will generate a random 32-bit integer: ... Assuming the script is saved as random.vbs, the batch code to use...
Read more >batch-file Tutorial => Random Numbers
Learn batch-file - Random Numbers. ... Using the dynamic variable %Random% , we can get a random integer from 0 to 32767. For...
Read more >How can I generate a random number between 1-10? : r/Batch
How can I generate a random number between 1-10?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m closing this since random zoom is implemented in cuCIM so the need is satisfied for now although the general discussion remains unresolved and can be discussed in the future if needed.
the concept of minibatch is part of the model optimization using stochastic gradient descent, anything that dealing with minibatches should be in the ‘monai.networks’ module of monai.
The price for mixing the concepts of batch and nonbatch is not just a simple flag, it requires a full set of dimensionality input validation, and potentially reduces the usability/code readability.