ageron / ageron/handson-ml2

Chapter 12, exercise 12 - mistake in the denominator

Open
#173 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
30k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

Hi.
Thank you very much for writing an excellent book, and maintaining the notebooks.
In exercise 12 of chapter 12, in the call method, I believe the return statement should state

`return self.alpha * (X - mean) / (tf.sqrt(variance) + self.eps) + self.beta`

in order to match alpha.*(X-mu)/(sigma + eps) + beta.
The current implementation is:

```
def call(self, X):
mean, variance = tf.nn.moments(X, axes=-1, keepdims=True)
return self.alpha * (X - mean) / (tf.sqrt(variance + self.eps)) + self.beta
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.