Skip to content

Commit 4ba511a

Browse files
author
Han Wang
committed
fix bug
1 parent e2afbe9 commit 4ba511a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

deepmd/pt_expt/utils/network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from typing import (
44
Any,
55
ClassVar,
6-
Self,
76
)
87

98
import numpy as np
@@ -27,7 +26,9 @@
2726

2827

2928
class TorchArrayParam(torch.nn.Parameter):
30-
def __new__(cls, data: Any = None, requires_grad: bool = True) -> Self:
29+
def __new__( # noqa: PYI034
30+
cls, data: Any = None, requires_grad: bool = True
31+
) -> "TorchArrayParam":
3132
return torch.nn.Parameter.__new__(cls, data, requires_grad)
3233

3334
def __array__(self, dtype: Any | None = None) -> np.ndarray:

0 commit comments

Comments
 (0)