本文簡要介紹python語言中 torch.package.PackageExporter.register_intern_hook
的用法。
用法:
register_intern_hook(hook)
一個句柄,可用於通過調用
handle.remove()
來刪除添加的鉤子。torch.utils.hooks.RemovableHandle
在導出器上注冊一個實習生掛鉤。
每次模塊與
intern()
模式匹配時都會調用該鉤子。它應該具有以下簽名:hook(exporter: PackageExporter, module_name: str) -> None
Hooks 將按照注冊的順序被調用。
返回:
返回類型:
相關用法
- Python PyTorch PackageExporter.register_extern_hook用法及代碼示例
- Python PyTorch PackageExporter.register_mock_hook用法及代碼示例
- Python PyTorch PackageExporter.close用法及代碼示例
- Python PyTorch PackageImporter.id用法及代碼示例
- Python PyTorch ParagraphAggregator用法及代碼示例
- Python PyTorch ParallelReadConcat用法及代碼示例
- Python PyTorch ParameterList用法及代碼示例
- Python PyTorch PairwiseDistance用法及代碼示例
- Python PyTorch ParquetDataFrameLoader用法及代碼示例
- Python PyTorch ParameterDict用法及代碼示例
- Python PyTorch Pareto用法及代碼示例
- Python PyTorch Proxy用法及代碼示例
- Python PyTorch PoissonNLLLoss用法及代碼示例
- Python PyTorch PixelShuffle用法及代碼示例
- Python PyTorch Pipe用法及代碼示例
- Python PyTorch PooledEmbeddingsAllToAll用法及代碼示例
- Python PyTorch Poisson用法及代碼示例
- Python PyTorch Perceptron用法及代碼示例
- Python PyTorch PixelUnshuffle用法及代碼示例
- Python PyTorch PitchShift用法及代碼示例
- Python PyTorch PooledEmbeddingsReduceScatter用法及代碼示例
- Python PyTorch PReLU用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.package.PackageExporter.register_intern_hook。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。