MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / setUp

Method setUp

tests/optimizers/test_lr_finder.py:51–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49@unittest.skipUnless(has_pil, "requires PIL")
50class TestLRFinder(unittest.TestCase):
51 def setUp(self):
52 self.root_dir = MONAIEnvVars.data_dir()
53 if not self.root_dir:
54 self.root_dir = Path(__file__).parents[1] / "testing_data"
55
56 self.transforms = Compose(
57 [
58 LoadImaged(keys="image"),
59 EnsureChannelFirstd(keys="image", channel_dim="no_channel"),
60 ScaleIntensityd(keys="image"),
61 ToTensord(keys="image"),
62 ]
63 )
64
65 def test_lr_finder(self):
66 # 0.001 gives 54 examples

Callers

nothing calls this directly

Calls 6

ComposeClass · 0.90
LoadImagedClass · 0.90
EnsureChannelFirstdClass · 0.90
ScaleIntensitydClass · 0.90
ToTensordClass · 0.90
data_dirMethod · 0.80

Tested by

no test coverage detected