MCPcopy Index your code
hub / github.com/pytorch/pytorch / setUp

Method setUp

caffe2/python/brew_test.py:16–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14
15class BrewTest(unittest.TestCase):
16 def setUp(self):
17
18 def myhelper(model, val=-1):
19 return val
20
21 if not brew.has_helper(myhelper):
22 brew.Register(myhelper)
23 self.myhelper = myhelper
24
25 def myhelper2(model, val=-1):
26 return val
27
28 if not brew.has_helper(myhelper2):
29 brew.Register(myhelper2)
30 self.myhelper2 = myhelper2
31 self.model = ModelHelper(name="test_model")
32
33 def test_dropout(self):
34 p = 0.2

Callers

nothing calls this directly

Calls 3

ModelHelperClass · 0.90
has_helperMethod · 0.80
RegisterMethod · 0.45

Tested by

no test coverage detected