Skip to content

Commit 8206e95

Browse files
Fix typos in the documentation strings of the tfjs-node directory (#8412)
1 parent 15c00f8 commit 8206e95

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

tfjs-node/WINDOWS_TROUBLESHOOTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The tfjs-node package uses the [node-gyp](https://github.com/nodejs/node-gyp) pa
77

88
This can happen for a variety of reasons. First, to inspect what is missing either `cd node_modules/@tensorflow/tfjs-node` or clone the [tensorflow/tfjs repo](https://github.com/tensorflow/tfjs).
99

10-
After `cd`'ing or cloning, run the following command (you might need node-gyp installed globablly `npm install -g node-gyp`):
10+
After `cd`'ing or cloning, run the following command (you might need node-gyp installed globally `npm install -g node-gyp`):
1111

1212
```sh
1313
node-gyp configure --verbose
@@ -22,9 +22,9 @@ gyp verb check python checking for Python executable "python2" in the PATH
2222
gyp verb `which` failed Error: not found: python2
2323
```
2424
25-
This means that node-gyp expects a 'python2' exe somewhere in `%PATH%`. Try running this command from an Admin (elevated privilaged prompt):
25+
This means that node-gyp expects a 'python2' exe somewhere in `%PATH%`. Try running this command from an Admin (elevated privileged prompt):
2626
27-
You can try running this from an Adminstrative prompt:
27+
You can try running this from an Administrative prompt:
2828
2929
```sh
3030
$ npm --add-python-to-path='true' --debug install --global windows-build-tools

tfjs-node/binding/tfjs_backend.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ TFE_TensorHandle *CreateTFE_TensorHandleFromTypedArray(napi_env env,
135135
if (dtype == TF_INT64) {
136136
// Currently, int64-type Tensors are represented as Int32Arrays.
137137
// To represent a int64-type Tensor of `n` elements, an Int32Array of
138-
// length `2 * n` is requried. This is why the length-match checking
138+
// length `2 * n` is required. This is why the length-match checking
139139
// logic is special-cased for int64.
140140
if (array_length != num_elements * 2) {
141141
NAPI_THROW_ERROR(
@@ -379,7 +379,7 @@ void CopyTFE_TensorHandleDataToResourceArray(
379379

380380
TF_AutoStatus status;
381381

382-
// Create a JS string to stash the resouce handle into.
382+
// Create a JS string to stash the resource handle into.
383383
napi_status nstatus;
384384
size_t byte_length = TF_TensorByteSize(tensor.tensor);
385385
nstatus = napi_create_array_with_length(env, byte_length, result);

tfjs-node/binding/tfjs_backend.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TFJSBackend {
3636
static TFJSBackend *Create(napi_env env);
3737

3838
// Creates a new Tensor with given shape and data and returns an ID that
39-
// refernces the new Tensor.
39+
// references the new Tensor.
4040
// - shape_value (number[])
4141
// - dtype_value (number)
4242
// - array_value (TypedArray|Array)

tfjs-node/scripts/make-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ fs.writeFile('src/version.ts', versionCode, err => {
3333
if (err) {
3434
throw new Error(`Could not save version file ${version}: ${err}`);
3535
}
36-
console.log(`Version file for version ${version} saved sucessfully.`);
36+
console.log(`Version file for version ${version} saved successfully.`);
3737
});

tfjs-node/src/callbacks.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class ProgbarLogger extends CustomCallback {
4646
private readonly RENDER_THROTTLE_MS = 50;
4747

4848
/**
49-
* Construtor of LoggingCallback.
49+
* Constructor of LoggingCallback.
5050
*/
5151
constructor() {
5252
super({
@@ -150,7 +150,7 @@ const BASE_NUM_DIGITS = 2;
150150
const MAX_NUM_DECIMAL_PLACES = 4;
151151

152152
/**
153-
* Get a succint string representation of a number.
153+
* Get a succinct string representation of a number.
154154
*
155155
* Uses decimal notation if the number isn't too small.
156156
* Otherwise, use engineering notation.

tfjs-node/src/io/file_system_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ describe('File system IOHandler', () => {
445445
const history2 =
446446
await model2.fit(xs, ys, {epochs: 2, shuffle: false, verbose: 0});
447447
// The final loss value from training the model twice, 2 epochs
448-
// at a time, should be equal to the final loss of trainig the
448+
// at a time, should be equal to the final loss of training the
449449
// model only once with 4 epochs.
450450
expect(history2.history.loss[1]).toBeCloseTo(18.603);
451451
});

0 commit comments

Comments
 (0)