示例#1
0
 def __init__(self):
     super().__init__()
     warm.up(self, [2, 3, 224, 224])
示例#2
0
 def __init__(self, embedding_dim, hidden_dim, vocab_size, tagset_size):
     super().__init__()
     self.arg = (embedding_dim, hidden_dim, vocab_size, tagset_size)
     warm.up(self, torch.tensor([0, 1], dtype=torch.long))
示例#3
0
 def __init__(self):
     super().__init__()
     warm.up(self, [1, 1, 28, 28])
示例#4
0
 def __init__(self, *shape, **kw):
     super().__init__()
     self.kw = kw
     warm.up(self, *shape)
示例#5
0
def test_warm_up():
    m = nn.Identity()
    assert not warm.engine.is_ready(m), 'is_ready did not work correctly.'
    warm.up(m, [1, 2, 3])
    assert warm.engine.is_ready(m), 'warm.up did not work correctly.'
示例#6
0
 def __init__(self):
     super().__init__()
     warm.up(self, [2, 3, 32, 32])
示例#7
0
 def __init__(self, block=basic, stack_spec=((2, 64, 1), (2, 128, 2), (2, 256, 2), (2, 512, 2))):
     super().__init__()
     self.block = block
     self.stack_spec = stack_spec
     warm.up(self, [2, 3, 32, 32])