question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RandZoom on batch

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
drbehcommented, Mar 25, 2022

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.

1reaction
wylicommented, Sep 13, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found