1 parent e2afbe9 commit 4ba511aCopy full SHA for 4ba511a
1 file changed
deepmd/pt_expt/utils/network.py
@@ -3,7 +3,6 @@
3
from typing import (
4
Any,
5
ClassVar,
6
- Self,
7
)
8
9
import numpy as np
@@ -27,7 +26,9 @@
27
26
28
29
class TorchArrayParam(torch.nn.Parameter):
30
- def __new__(cls, data: Any = None, requires_grad: bool = True) -> Self:
+ def __new__( # noqa: PYI034
+ cls, data: Any = None, requires_grad: bool = True
31
+ ) -> "TorchArrayParam":
32
return torch.nn.Parameter.__new__(cls, data, requires_grad)
33
34
def __array__(self, dtype: Any | None = None) -> np.ndarray:
0 commit comments