Lines Matching +full:script +full:- +full:output
47 # Tests for JIT forward hooks and pre-hooks
93 module_scripted = torch.jit.script(module)
121 def foo(self, input: Tuple[str]) -> Tuple[str]:
133 torch.jit.script(m)
139 def prehook(self, input: Tuple[str]) -> Tuple[str]:
144 def prehook(self, input: Tuple[str]) -> Tuple[str]:
151 "Pre-hook '.+' on .+ has at least two different python "
154 torch.jit.script(m)
158 def hook(self, input: Tuple[str], output: str):
173 torch.jit.script(m)
180 def pre_hook(self, input: Tuple[str]) -> Tuple[str]:
183 def forward_hook(self, input: Tuple[str], output: str):
186 output = output + "_fh"
187 return output
192 m_scripted = torch.jit.script(m)
203 def pre_hook(self, input: Tuple[str]) -> Tuple[str]:
206 def forward_hook(self, input: Tuple[str], output: str):
208 return output + "_fh"
215 m_submod_forward_call_scripted = torch.jit.script(m_submod_forward_call)
216 m_submod_call_scripted = torch.jit.script(m_submod_call)
232 def pre_hook(self, input: Tuple[str]) -> Tuple[str]:
241 "This error occurred while scripting the forward pre-hook 'pre_hook'",
243 torch.jit.script(m)
247 def pre_hook_wrong_input1(self, input: Tuple[None]) -> Tuple[str]:
257 torch.jit.script(m)
259 def pre_hook_wrong_input2(self, input: Tuple[str], input2: str) -> Tuple[str]:
269 torch.jit.script(m)
271 def pre_hook_wrong_input3(self, input: int) -> Tuple[str]:
282 torch.jit.script(m)
284 def pre_hook_wrong_output(self, input: Tuple[str]) -> int:
294 torch.jit.script(m)
307 torch.jit.script(m)
309 def pre_hook_wrong_tuple_return(self, input: Tuple[Tuple[int]]) -> Tuple[int]:
321 torch.jit.script(m)
325 # def forward_hook(self, input: Tuple[str], output: str)
326 def forward_hook_wrong_input1(self, input: Tuple[str, str], output: str):
327 return output
337 torch.jit.script(m)
339 def forward_hook_wrong_input2(self, input: str, output: str):
340 return output
350 torch.jit.script(m)
352 def forward_hook_wrong_input3(self, input: Tuple[None], output: str):
353 return output
363 torch.jit.script(m)
365 def forward_hook_wrong_output(self, input: Tuple[str], output: Tuple[str]):
366 return output
373 "has the wrong type for the output argument. Received"
376 torch.jit.script(m)
378 def forward_hook_correct(self, input: Tuple[str], output: str):
379 return (output,)
382 self, input: Tuple[str], output: str
384 return output
392 "has the wrong type for the output argument. "
395 torch.jit.script(m)