Skip to content

Commit 8d594e3

Browse files
Fix typos in the documentation strings of the tfjs-core directory (#8413)
1 parent 8206e95 commit 8d594e3

15 files changed

+17
-17
lines changed

tfjs-core/scripts/cloud_funcs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This directory contains the following Google Cloud Functions.
22

33
### `trigger_nightly`
4-
Programatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler at 3am EST every day (configurable via the Cloud Scheduler UI).
4+
Programmatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler at 3am EST every day (configurable via the Cloud Scheduler UI).
55
You can also trigger the function manually via the Cloud UI.
66

77
Command to re-deploy:
@@ -45,6 +45,6 @@ gcloud functions deploy sync_reactnative \
4545
The pipeline looks like this:
4646

4747
1) At 3am, Cloud Scheduler writes to `nightly` topic
48-
2) That triggers the `nightly` function, which starts a build programatically
48+
2) That triggers the `nightly` function, which starts a build programmatically
4949
3) That build runs and writes its status to `cloud-builds` topic
5050
4) That triggers the `send_email` function, which sends email and chat with the build status.

tfjs-core/src/backends/complex_util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function complexWithEvenIndex(complex: Float32Array):
8787
}
8888

8989
/**
90-
* Extracts odd indexed comple values in the given array.
90+
* Extracts odd indexed complete values in the given array.
9191
* @param complex The complex tensor values
9292
*/
9393
export function complexWithOddIndex(complex: Float32Array):

tfjs-core/src/backends/einsum_util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export function checkEinsumDimSizes(
167167
*
168168
* @param summedDims indices to the dimensions being summed over.
169169
* @param idDims A look up table for the dimensions present in each input
170-
* tensor. Each consituent array contains indices for the dimensions in the
170+
* tensor.Each constituent array contains indices for the dimensions in the
171171
* corresponding input tensor.
172172
*
173173
* @return A map with two fields:

tfjs-core/src/backends/non_max_suppression_impl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function intersectionOverUnion(boxes: TypedArray, i: number, j: number) {
188188

189189
// A Gaussian penalty function, this method always returns values in [0, 1].
190190
// The weight is a function of similarity, the more overlap two boxes are, the
191-
// smaller the weight is, meaning highly overlapping boxe will be significantly
191+
// smaller the weight is,meaning highly overlapping boxes will be significantly
192192
// penalized. On the other hand, a non-overlapping box will not be penalized.
193193
function suppressWeight(iouThreshold: number, scale: number, iou: number) {
194194
const weight = Math.exp(scale * iou * iou);

tfjs-core/src/engine.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export class Engine implements TensorTracker, DataMover {
313313
/**
314314
* Initializes a backend by looking up the backend name in the factory
315315
* registry and calling the factory method. Returns a boolean representing
316-
* whether the initialization of the backend suceeded. Throws an error if
316+
* whether the initialization of the backend succeeded. Throws an error if
317317
* there is no backend in the factory registry.
318318
*/
319319
private initializeBackend(backendName: string):

tfjs-core/src/engine_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ describe('Backend registration', () => {
243243
throw new Error('failed to create async2');
244244
}, 101 /* priority */);
245245

246-
// Await for the library to find the best backend that succesfully
246+
// Await for the library to find the best backend that successfully
247247
// initializes.
248248
await tf.ready();
249249
expect(tf.backend()).toEqual(testBackend);

tfjs-core/src/io/browser_files_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ describeWithFlags('browserDownloads', BROWSER_ENVS, () => {
259259
// Verify that the default file names are used.
260260
expect(jsonAnchor.download).toEqual('model.json');
261261
expect(jsonAnchor.clicked).toEqual(1);
262-
// The weight file should not have been downoaded.
262+
// The weight file should not have been downloaded.
263263
expect(weightDataAnchor.download).toEqual(undefined);
264264
expect(weightDataAnchor.clicked).toEqual(0);
265265

tfjs-core/src/io/composite_array_buffer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class CompositeArrayBuffer {
9191
start = end;
9292
}
9393

94-
// Set the byteLenghth
94+
// Set the byteLength
9595
if (this.shards.length === 0) {
9696
this.byteLength = 0;
9797
}

tfjs-core/src/io/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ IORouterRegistry.registerLoadRouter(httpRouter);
324324
* The following GitHub Gist
325325
* https://gist.github.com/dsmilkov/1b6046fd6132d7408d5257b0976f7864
326326
* implements a server based on [flask](https://github.com/pallets/flask) that
327-
* can receive the request. Upon receiving the model artifacts via the requst,
327+
* can receive the request. Upon receiving the model artifacts via the request,
328328
* this particular server reconstitutes instances of [Keras
329329
* Models](https://keras.io/models/model/) in memory.
330330
*

tfjs-core/src/io/indexed_db.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ IORouterRegistry.registerLoadRouter(indexedDBRouter);
255255
*
256256
* @param modelPath A unique identifier for the model to be saved. Must be a
257257
* non-empty string.
258-
* @returns An instance of `BrowserIndexedDB` (sublcass of `IOHandler`),
258+
* @returns An instance of `BrowserIndexedDB` (subclass of `IOHandler`),
259259
* which can be used with, e.g., `tf.Model.save`.
260260
*/
261261
export function browserIndexedDB(modelPath: string): IOHandler {

tfjs-core/src/jasmine_util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export interface TestFilter {
105105
* Tests that have the substrings specified by the include or startsWith
106106
* will be included in the test run, unless one of the substrings specified
107107
* by `excludes` appears in the name.
108-
* @param customInclude Function to programatically include a test.
108+
* @param customInclude Function to programmatically include a test.
109109
* If this function returns true, a test will immediately run. Otherwise,
110110
* `testFilters` is used for fine-grained filtering.
111111
*
@@ -124,7 +124,7 @@ export function setupTestFilters(
124124
* Filter method that returns boolean, if a given test should run or be
125125
* ignored based on its name. The exclude list has priority over the
126126
* include list. Thus, if a test matches both the exclude and the include
127-
* list, it will be exluded.
127+
* list, it will be excluded.
128128
*/
129129
// tslint:disable-next-line: no-any
130130
const specFilter = (spec: any) => {

tfjs-core/src/ops/depthwise_conv2d_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ describeWithFlags('depthwiseConv2d gradients', ALL_ENVS, () => {
12141214
[[[1, 1], [1, 1], [0, 0]], [[0, 1], [1, 1], [1, 1]]],
12151215
[[[1, 0], [1, 1], [0, 0]], [[0, 1], [1, 0], [0, 0]]]
12161216
]);
1217-
// result of convolution operatoin
1217+
// result of convolution operation
12181218
result = tf.tensor4d([
12191219
[
12201220
[[2, 8, 8, 7, 2, 2], [6, 3, 1, 1, 0, 0]],

tfjs-core/src/ops/ragged_tensor_to_tensor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import {op} from './operation';
7070
* "ROW_SPLITS": the row_splits tensor from the ragged tensor.
7171
* "VALUE_ROWIDS": the value_rowids tensor from the ragged tensor.
7272
* "FIRST_DIM_SIZE": if value_rowids is used for the first dimension, then
73-
* it is preceeded by "FIRST_DIM_SIZE". The tensors are in the order of
73+
* it is preceded by "FIRST_DIM_SIZE". The tensors are in the order of
7474
* the dimensions.
7575
* @return A Tensor. Has the same type as values.
7676
* @doc {heading: 'Operations', subheading: 'Ragged'}

tfjs-core/src/serialization.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export class SerializationMap {
225225
*
226226
* @param cls The class to be registered. It must have a public static member
227227
* called `className` defined and the value must be a non-empty string.
228-
* @param pkg The pakcage name that this class belongs to. This used to define
228+
* @param pkg The package name that this class belongs to. This used to define
229229
* the key in GlobalCustomObject. If not defined, it defaults to `Custom`.
230230
* @param name The name that user specified. It defaults to the actual name of
231231
* the class as specified by its static `className` property.

tfjs-core/src/tensor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ Object.defineProperty(Tensor, Symbol.hasInstance, {
518518

519519
export function getGlobalTensorClass() {
520520
// Use getGlobal so that we can augment the Tensor class across package
521-
// boundaries becase the node resolution alg may result in different modules
521+
// boundaries because the node resolution alg may result in different modules
522522
// being returned for this file depending on the path they are loaded from.
523523
return getGlobal('Tensor', () => {
524524
return Tensor;

0 commit comments

Comments
 (0)