File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed
pytorch_optimizer/optimizer Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -73,16 +73,6 @@ def forward(self, z: torch.Tensor) -> torch.Tensor:
7373 out = - torch .exp (torch .log (self .w_algorithm (z * self .i )) - z ** 2 ) + 1 # fmt: skip
7474 return torch .complex (out .real * sign_r , out .imag * sign_i )
7575
76- @staticmethod
77- def backward (z : torch .Tensor ) -> torch .Tensor :
78- r"""Compute the gradient of the error function of a complex number.
79-
80- As we know the analytical derivative of the error function, we can use it directly.
81-
82- :param z: torch.Tensor. A tensor of complex numbers.
83- """
84- return 2.0 / torch .sqrt (torch .tensor (torch .pi )) * torch .exp (- (z ** 2 )) # fmt: skip
85-
8676
8777class TRAC (BaseOptimizer ):
8878 r"""A Parameter-Free Optimizer for Lifelong Reinforcement Learning.
You can’t perform that action at this time.
0 commit comments