Skip to content

Commit cf03482

Browse files
authored
Type annotations (#264)
This is a port of the work by: Krzysztof Choromanski, Mark Rowland, Vikas Sindhwani, Richard E. Turner, Adrian Weller: "Structured Evolution with Compact Architectures for Scalable Policy Optimization", https://arxiv.org/abs/1804.02395
1 parent 4ed8a52 commit cf03482

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler_opt/es/gradient_ascent_optimization_algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def run_step(self, current_input: npt.NDArray[np.float32],
5959
raise NotImplementedError("Abstract method")
6060

6161
@abc.abstractmethod
62-
def get_state(self) -> List[np.float32]:
62+
def get_state(self) -> List[float]:
6363
"""Returns the state of the optimizer.
6464
6565
Returns the state of the optimizer.
@@ -116,7 +116,7 @@ def run_step(self, current_input: npt.NDArray[np.float32],
116116

117117
return current_input + step
118118

119-
def get_state(self) -> List[np.float32]:
119+
def get_state(self) -> List[float]:
120120
return self.moving_average.tolist()
121121

122122
def set_state(self, state: npt.NDArray[np.float32]) -> None:

0 commit comments

Comments
 (0)