mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add None return type to init (#132335)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132335 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
30d7f0b15a
commit
72d2dba992
@ -408,7 +408,7 @@ class Module:
|
||||
import torch.nn.functional as F
|
||||
|
||||
class Model(nn.Module):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.conv1 = nn.Conv2d(1, 20, 5)
|
||||
self.conv2 = nn.Conv2d(20, 20, 5)
|
||||
|
Reference in New Issue
Block a user