MCPcopy Create free account
hub / github.com/BIT-MCS/DRL-eFresh / normalize

Method normalize

methods/model.py:358–361  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

356 self.var = torch.clamp(self.mean_diff / self.n, min=1e-2)
357
358 def normalize(self, inputs):
359 obs_mean = self.mean.unsqueeze(0).expand_as(inputs)
360 obs_std = torch.sqrt(self.var).unsqueeze(0).expand_as(inputs)
361 return torch.clamp((inputs - obs_mean) / obs_std, -5., 5.)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected