MCPcopy Index your code
hub / github.com/OpenDriveLab/TCP / flatten

Method flatten

roach/models/ppo_buffer.py:188–193  ·  view source on GitHub ↗
(arr: np.ndarray)

Source from the content-addressed store, hash-verified

186
187 @staticmethod
188 def flatten(arr: np.ndarray) -> np.ndarray:
189 shape = arr.shape
190 # if len(shape) < 3:
191 # return arr.swapaxes(0, 1).reshape(shape[0] * shape[1])
192 # else:
193 return arr.reshape(shape[0] * shape[1], *shape[2:])
194
195 def render(self):
196 assert self.full, ''

Callers 8

getMethod · 0.95
_forward_implMethod · 0.80
forwardMethod · 0.80
evaluate_actionsMethod · 0.80
evaluate_valuesMethod · 0.80
forwardMethod · 0.80
forward_valueMethod · 0.80
trainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected