Skip to content

Commit 3305bab

Browse files
Address typos in tfjs-examples repo (#1303)
1 parent 84bdc4b commit 3305bab

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

addition-rnn-webworker/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h1>TensorFlow.js: Addition RNN in web worker</h1>
7070
like <span class=out-example>7</span>.
7171
</p>
7272
<p>
73-
This example generates its own training data programatically.
73+
This example generates its own training data programmatically.
7474
</p>
7575
</section>
7676

addition-rnn/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>TensorFlow.js: Addition RNN</h1>
6666
like <span class=out-example>7</span>.
6767
</p>
6868
<p>
69-
This example generates it's own training data programatically.
69+
This example generates it's own training data programmatically.
7070
</p>
7171
</section>
7272

cart-pole/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class PolicyNetwork {
207207

208208
// Get the probability of the leftward action.
209209
const leftProb = tf.sigmoid(logits);
210-
// Probabilites of the left and right actions.
210+
// Probabilities of the left and right actions.
211211
const leftRightProbs = tf.concat([leftProb, tf.sub(1, leftProb)], 1);
212212
const actions = tf.multinomial(leftRightProbs, 1, null, true);
213213
return [logits, actions];
@@ -269,7 +269,7 @@ export class SaveablePolicyNetwork extends PolicyNetwork {
269269
}
270270

271271
/**
272-
* Load the model fom IndexedDB.
272+
* Load the model from IndexedDB.
273273
*
274274
* @returns {SaveablePolicyNetwork} The instance of loaded
275275
* `SaveablePolicyNetwork`.

cart-pole/ui.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function onGameEnd(gameCount, totalGames) {
8787
}
8888

8989
/**
90-
* A function invokved at the end of a training iteration.
90+
* A function invoked at the end of a training iteration.
9191
*
9292
* @param {number} iterationCount A count of how many iterations has completed
9393
* so far in the current round of training.

chrome-extension/src/content.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function clickHandler(mouseEvent) {
164164
}
165165

166166
function loadImageAndSendDataBack(src, sendResponse) {
167-
// Load image (with crossOrigin set to anonymouse so that it can be used in a
167+
// Load image (with crossOrigin set to anonymous so that it can be used in a
168168
// canvas later).
169169
const img = new Image();
170170
img.crossOrigin = 'anonymous';

custom-layer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This example demonstrates how to write a custom layer for tfjs-layers.
55
We build a custom activation layer called 'Antirectifier' which outputs two
66
channels for each input, one with just the positive signal, and one with just
77
the negative signal. The example shows exercises the `call` and
8-
`computeOutputShape` overides of the `Layer`.
8+
`computeOutputShape` overrides of the `Layer`.
99

1010
[See this example
1111
live!](https://storage.googleapis.com/tfjs-examples/custom-layer/dist/index.html)

custom-layer/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h1>TensorFlow.js: Working with Custom Layers</h1>
5555
We build a custom activation layer called 'Antirectifier' which outputs two
5656
channels for each input, one with just the positive signal, and one with just
5757
the negative signal. The example shows exercises the <code>call</code> and
58-
<code>computeOutputShape</code> overides of the <code>Layer</code>.
58+
<code>computeOutputShape</code> overrides of the <code>Layer</code>.
5959
</p>
6060
</section>
6161

data-csv/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const SUNY_CSV_URL =
3939

4040
/**
4141
* Builds a CSV Dataset object using the URL specified in the UI. Then iterates
42-
* over all eleemnts in that dataset to count them. Updates the UI accordingly.
42+
* over all elements in that dataset to count them. Updates the UI accordingly.
4343
*/
4444
async function countRowsHandler() {
4545
const url = ui.getQueryElement().value;

data-generator/game.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const GAME_STATE = {
4141
// Constants defining the range of card values.
4242
min_card_value: 1,
4343
max_card_value: 13,
44-
// Controls how many cards per hand. Controlable from a UI element.
44+
// Controls how many cards per hand. Controllable from a UI element.
4545
num_cards_per_hand: 3
4646
};
4747

data-generator/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ <h3>TensorFlow.js: tfjs-data</h3>
123123
This demo is meant to illustrate how to train a model using a tf.data.Dataset
124124
constructed from a generator using <pre>tf.data.generator()</pre>.
125125
In this case, we will predict the likelihood of
126-
winning a game. The game itself is described below, and implmented in game.js.
127-
The game exports a function we will use as a "generator" function to create a
128-
dataset. We will then fit a model to this dataset using
126+
winning a game. The game itself is described below, and implemented in game.
127+
js.The game exports a function we will use as a "generator" function to
128+
create a dataset. We will then fit a model to this dataset using
129129
<pre>model.fitDataset()</pre>, with the goal of predicting
130130
the "win" state from features calculated from Player 1's hand. The output
131131
logit value will be larger for hands which the model considers more likely

electron/image_classifier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class ImageClassifier {
3939
* Perform classification on a batch of image tensors.
4040
*
4141
* @param {tf.Tensor} images Batch image tensor of shape
42-
* `[numExamples, height, width, channels]`. The values of `heigth`,
42+
* `[numExamples, height, width, channels]`. The values of `height`,
4343
* `width` and `channel` must match the underlying MobileNetV2 model
4444
* (default: 224, 224, 3).
4545
* @param {number} topK How many results with top probability / logit values

fashion-mnist-vae/model.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function vaeLoss(inputs, outputs) {
184184
const zLogVar = outputs[2];
185185

186186
// First we compute a 'reconstruction loss' terms. The goal of minimizing
187-
// tihs term is to make the model outputs match the input data.
187+
// this term is to make the model outputs match the input data.
188188
const reconstructionLoss =
189189
tf.losses.meanSquaredError(inputs, decoderOutput).mul(originalDim);
190190

fashion-mnist-vae/train.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import('./data.js').then(exports => {
6767
// instead of the more typical model.fit. We thus need to define an optimizer
6868
// and manage batching the data ourselves.
6969

70-
// Cteate the optimizer
70+
// Create the optimizer
7171
const optimizer = tf.train.adam();
7272

7373
// Group the data into batches.

0 commit comments

Comments
 (0)