diff --git a/guides/customizing_what_happens_in_fit.py b/guides/customizing_what_happens_in_fit.py
index b341098c4a..bff5f8d25e 100644
--- a/guides/customizing_what_happens_in_fit.py
+++ b/guides/customizing_what_happens_in_fit.py
@@ -158,7 +158,12 @@ def train_step(self, data):
# Just use `fit` as usual -- you can use callbacks, etc.
x = np.random.random((1000, 32))
y = np.random.random((1000, 1))
-model.fit(x, y, epochs=3)
+model.fit(x, y, epochs=1)
+
+"""
+Note that with this setup, you will need to manually call `reset_states()` on your
+metrics after each epoch, or between training and evaluation.
+"""
"""
## Supporting `sample_weight` & `class_weight`
diff --git a/templates/api/metrics/index.md b/templates/api/metrics/index.md
index 9b95050b0d..19167e0dbd 100644
--- a/templates/api/metrics/index.md
+++ b/templates/api/metrics/index.md
@@ -3,7 +3,7 @@
A metric is a function that is used to judge the performance of your model.
Metric functions are similar to loss functions, except that the results from evaluating a metric are not used when training the model.
-Note that you may use any loss functions as a metric function.
+Note that you may use any loss function as a metric.
## Available metrics
@@ -176,7 +176,7 @@ class BinaryTruePositives(tf.keras.metrics.Metric):
return self.true_positives
def reset_states(self):
- self.true_positive.assign(0)
+ self.true_positives.assign(0)
m = BinaryTruePositives()
m.update_state([0, 1, 1, 1], [0, 1, 0, 0])
diff --git a/theme/base.html b/theme/base.html
index d9013947d1..234c5425ef 100644
--- a/theme/base.html
+++ b/theme/base.html
@@ -34,7 +34,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-61785484-1', 'keras.io');
+ ga('create', 'UA-61785484-1', 'auto');
ga('send', 'pageview');
diff --git a/theme/css/docs.css b/theme/css/docs.css
index a4d311309a..32d7d74bad 100644
--- a/theme/css/docs.css
+++ b/theme/css/docs.css
@@ -1,6 +1,6 @@
body {
font-family: 'Open Sans', sans-serif;
- font-size: 0.93rem
+ font-size: 0.95rem
}
h1,
@@ -88,6 +88,14 @@ blockquote {
#dropdown-nav {
display: none;
}
+.nav-link {
+ font-size: 1rem;
+}
+.nav-sublink {
+ font-size: 0.9rem;
+ padding-top: 0.5rem;
+ padding-bottom: 0.5rem;
+}
@media screen and (max-width: 1342px) {
.k-nav {
width: 17rem;
@@ -100,6 +108,12 @@ blockquote {
}
}
@media screen and (max-width: 840px) {
+ body {
+ font-size: 1rem;
+ }
+ pre {
+ font-size: 100%;
+ }
.k-page {
width: 100%;
min-width: 375px;
@@ -139,6 +153,14 @@ blockquote {
padding: 2%;
padding-top: 1%;
}
+ .nav-link {
+ font-size: 1.1rem;
+ }
+ .nav-sublink {
+ font-size: 1rem;
+ padding-top: 0.6rem;
+ padding-bottom: 0.6rem;
+ }
}
.k-outline {
@@ -230,16 +252,12 @@ blockquote {
.nav-pills .nav-link {
border-radius: 0;
border-top: 1px solid #ddd;
- font-size: 1rem;
background-color: #f7f6f6;
color: #d00000;
}
.nav-pills .nav-sublink {
- font-size: 0.85rem;
padding-left: 1.5rem;
padding-right: 0.8rem;
- padding-top: 0.5rem;
- padding-bottom: 0.5rem;
background-color: white;
color: black;
text-decoration: none;
diff --git a/theme/css/monokai.css b/theme/css/monokai.css
index 541f372ff3..2c60dff4af 100644
--- a/theme/css/monokai.css
+++ b/theme/css/monokai.css
@@ -1,7 +1,6 @@
.codehilite {
padding: 1rem;
margin-bottom: 1rem;
- font-size: 0.9rem;
padding-bottom: 0.01rem;
}
.k-shell code{
diff --git a/theme/landing.html b/theme/landing.html
index e20048a4a6..85ce301e9c 100755
--- a/theme/landing.html
+++ b/theme/landing.html
@@ -19,6 +19,16 @@
+
+