Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observation Normalization Problem #4

Open
im-Kitsch opened this issue May 4, 2022 · 0 comments
Open

Observation Normalization Problem #4

im-Kitsch opened this issue May 4, 2022 · 0 comments

Comments

@im-Kitsch
Copy link

Hi,

the normalization process used in your AWR implementation is not the same with original AWR paper.

Is there any reference or reason to implement so? It seems not right in compare to offical AWR code.

Best.

def experience(self, x):
"""Learn input values without computing the output values of them"""
if self.until is not None and self.count >= self.until:
return
count_x = x.shape[self.batch_axis]
if count_x == 0:
return
self.count += count_x
rate = count_x / self.count.float()
assert rate > 0
assert rate <= 1
var_x, mean_x = torch.var_mean(
x, axis=self.batch_axis, keepdims=True, unbiased=False
)
delta_mean = mean_x - self._mean
self._mean += rate * delta_mean
self._var += rate * (var_x - self._var + delta_mean * (mean_x - self._mean))
# clear cache
self._cached_std_inverse = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant