コード例 #1
0
 def forward(
         self,
         input: Tensor) -> Generator[stash, None, Tensor]:  # type: ignore
     yield stash('skip', input)
     return input
コード例 #2
0
ファイル: block.py プロジェクト: animeshtrivedi/surf-ml
 def forward(self, tensor: Tensor) -> Tensor:  # type: ignore
     yield stash('identity', tensor)
     return tensor
コード例 #3
0
 def forward(self, x):
     yield stash('hello', x)
     return self.conv(x)
コード例 #4
0
ファイル: test_stash_pop.py プロジェクト: zmxdream/torchgpipe
 def forward(self, input):
     yield stash('foo', input)
     return input * 2
コード例 #5
0
 def forward(self, input):
     foo = yield stash('foo')
     return input + foo
コード例 #6
0
 def forward(self, input):
     yield stash('bar', input)
     return input
コード例 #7
0
 def forward(self, input):
     yield stash('skip', input)
     return input
コード例 #8
0
 def forward(self, input):
     yield stash('none', None)
     return input
コード例 #9
0
 def forward(self, input):
     yield stash('1to3', input)
     output = self.conv(input)
     return output
コード例 #10
0
 def forward(self, tensor):
     yield stash('identity', tensor)
     return tensor
コード例 #11
0
ファイル: unet_pipe.py プロジェクト: yaritzabg/MONAI
 def forward(self, input: torch.Tensor):
     yield stash("skip", input)
     return input  # noqa  using yield together with return