Skip to content

Commit

Permalink
Fix mistakes (#6793)
Browse files Browse the repository at this point in the history
* Fix mistake

* Fix mistakes

* Fix mistake

* Fix mistake

* Fix mistake

* Update expand_dims.ts

* Update pad.ts

* Update concat.ts

* Update gather.ts

* Remove apostrophe

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Update graph_model.ts

* Fix mistakes

* Fix mistakes

* Fix mistake

* Fix mistake

* Fix mistakes

* Fix mistakes

* Fix mistake

* Fix mistakes

* Fix mistakes

* Fix mistakes

* Fix mistake

* Fix mistakes

* Fix mistake

* Fix mistake

* Fix mistake

* Update normalization.ts

* Fix mistake

* Fix mistakes

* Fix mistake

* Fix mistake

* Fix mistakes

* Fix mistake

* Fix mistakes

* Fix mistake

* Fix mistake

* Update exports_layers.ts

* Update clip_by_value.ts

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Update euclidean_norm.ts

* Fix mistake

* Fix mistake

* Update norm.ts

* Update euclidean_norm.ts

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Update non_max_suppression_with_score.ts

* Update non_max_suppression_with_score_async.ts

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Update sparse_fill_empty_rows.ts

* Update sparse_fill_empty_rows.ts

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistakes

* Update compute_weighted_loss.ts

* Update huber_loss.ts

* Fix mistake

* Fix mistake

* Fix mistake

* Fix mistake

* Update readers.ts

* Fix mistake

* Fix mistakes

* Fix mistakes

* Update globals.ts

* Fix mistakes

* Fix mistake

* Fix mistake

* Fix mistake

* Remove space

* Update readers.ts

* Update exports_layers.ts

Co-authored-by: Jen Person <[email protected]>
Co-authored-by: Ping Yu <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2022
1 parent 83d69c9 commit b6d6bf7
Show file tree
Hide file tree
Showing 71 changed files with 148 additions and 148 deletions.
4 changes: 2 additions & 2 deletions tfjs-converter/src/executor/graph_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export class GraphModel<ModelURL extends Url = string | io.IOHandler> implements
* Executes inference for the model for given input tensors.
* @param inputs tensor, tensor array or tensor map of the inputs for the
* model, keyed by the input node names.
* @param outputs output node name from the Tensorflow model, if no
* @param outputs output node name from the TensorFlow model, if no
* outputs are specified, the default outputs of the model would be used.
* You can inspect intermediate nodes of the model by adding them to the
* outputs array.
Expand All @@ -382,7 +382,7 @@ export class GraphModel<ModelURL extends Url = string | io.IOHandler> implements
* fashion, use this method when your model contains control flow ops.
* @param inputs tensor, tensor array or tensor map of the inputs for the
* model, keyed by the input node names.
* @param outputs output node name from the Tensorflow model, if no outputs
* @param outputs output node name from the TensorFlow model, if no outputs
* are specified, the default outputs of the model would be used. You can
* inspect intermediate nodes of the model by adding them to the outputs
* array.
Expand Down
4 changes: 2 additions & 2 deletions tfjs-converter/src/operations/custom_op/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {OpExecutor, OpMapper} from '../types';
const CUSTOM_OPS: {[key: string]: OpMapper} = {};

/**
* Register an Op for graph model executor. This allow you to register
* Register an Op for graph model executor. This allows you to register
* TensorFlow custom op or override existing op.
*
* Here is an example of registering a new MatMul Op.
Expand All @@ -33,7 +33,7 @@ const CUSTOM_OPS: {[key: string]: OpMapper} = {};
*
* tf.registerOp('MatMul', customMatmul);
* ```
* The inputs and attrs of the node object is based on the TensorFlow op
* The inputs and attrs of the node object are based on the TensorFlow op
* registry.
*
* @param name The Tensorflow Op name.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/browser_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const delayCallback: Function = (() => {
})();

/**
* Returns a promise that resolve when a requestAnimationFrame has completed.
* Returns a promise that resolves when a requestAnimationFrame has completed.
*
* On Node.js this uses setImmediate instead of requestAnimationFrame.
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export function registerBackend(
/**
* Gets the current backend. If no backends have been initialized, this will
* attempt to initialize the best backend. Will throw an error if the highest
* priority backend has async initialization, in which case, you should call
* priority backend has async initialization, in which case you should call
* 'await tf.ready()' before running other code.
*
* @doc {heading: 'Backends'}
Expand Down
8 changes: 4 additions & 4 deletions tfjs-core/src/gradients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function grads(f: (...args: Tensor[]) => Tensor): (
* returns a metric you want to show.
*
* The result is a rich object with the following properties:
* - grad: The gradient of `f(x)` w.r.t `x` (result of `tf.grad`).
* - grad: The gradient of `f(x)` w.r.t. `x` (result of `tf.grad`).
* - value: The value returned by `f(x)`.
*
* ```js
Expand Down Expand Up @@ -187,7 +187,7 @@ function valueAndGrad<I extends Tensor, O extends Tensor>(f: (x: I) => O): (
* returns a metric you want to show.
*
* The result is a rich object with the following properties:
* - grads: The gradients of `f()` w.r.t each input (result of `tf.grads`).
* - grads: The gradients of `f()` w.r.t. each input (result of `tf.grads`).
* - value: The value returned by `f(x)`.
*
* ```js
Expand Down Expand Up @@ -340,9 +340,9 @@ function variableGrads(f: () => Scalar, varList?: Variable[]):
* `f`. When called, `g` returns `f().value`. In backward mode, custom gradients
* with respect to each input of `f` are computed using `f().gradFunc`.
*
* The `save` function passsed to `f` should be used for saving tensors needed
* The `save` function passed to `f` should be used for saving tensors needed
* in the gradient. And the `saved` passed to the `gradFunc` is a
* `NamedTensorMap`, which contains those saved tensor.
* `NamedTensorMap`, which contains those saved tensors.
*
* ```js
* const customOp = tf.customGrad((x, save) => {
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/browser_files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export function browserDownloads(fileNamePrefix = 'model'): IOHandler {
* loading from files that contain Keras-style models (i.e., `tf.Model`s), for
* which an `Array` of `File`s is expected (in that order):
* - A JSON file containing the model topology and weight manifest.
* - Optionally, One or more binary files containing the binary weights.
* - Optionally, one or more binary files containing the binary weights.
* These files must have names that match the paths in the `weightsManifest`
* contained by the aforementioned JSON file, or errors will be thrown
* during loading. These weights files have the same format as the ones
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ IORouterRegistry.registerLoadRouter(httpRouter);
* https://gist.github.com/dsmilkov/1b6046fd6132d7408d5257b0976f7864
* implements a server based on [flask](https://github.com/pallets/flask) that
* can receive the request. Upon receiving the model artifacts via the requst,
* this particular server reconsistutes instances of [Keras
* this particular server reconstitutes instances of [Keras
* Models](https://keras.io/models/model/) in memory.
*
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/model_management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function listModels(): Promise<{[url: string]: ModelArtifactsInfo}> {
}

/**
* Remove a model specified by URL from a reigstered storage medium.
* Remove a model specified by URL from a registered storage medium.
*
* ```js
* // First create and save a model.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {op} from './operation';
* Reduces the input along the dimensions given in `axes`. Unless `keepDims`
* is true, the rank of the `tf.Tensor` is reduced by 1 for each entry in
* `axes`. If `keepDims` is true, the reduced dimensions are retained with
* length 1. If `axes` has no entries, all dimensions are reduced, and an
* length 1. If `axes` has no entries, all dimensions are reduced, and a
* `tf.Tensor` with a single element is returned.
*
* ```js
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {op} from './operation';
* Reduces the input along the dimensions given in `axes`. Unless `keepDims`
* is true, the rank of the `tf.Tensor` is reduced by 1 for each entry in
* `axes`. If `keepDims` is true, the reduced dimensions are retained with
* length 1. If `axes` has no entries, all dimensions are reduced, and an
* length 1. If `axes` has no entries, all dimensions are reduced, and a
* `tf.Tensor` with a single element is returned.
*
* ```js
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/batch_to_space_nd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import {op} from './operation';
* blockShape[M-1], batch / prod(blockShape), x.shape[1], ...,
* x.shape[N-1]]`
*
* 2. Permute dimensions of `reshaped`to produce `permuted` of shape `[batch /
* 2. Permute dimensions of `reshaped` to produce `permuted` of shape `[batch /
* prod(blockShape),x.shape[1], blockShape[0], ..., x.shape[M],
* blockShape[M-1],x.shape[M+1], ..., x.shape[N-1]]`
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/batchnorm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {reshape} from './reshape';
* Mean, variance, scale, and offset can be of two shapes:
* - The same shape as the input.
* - In the common case, the depth dimension is the last dimension of x, so
* the values would be an `tf.Tensor1D` of shape [depth].
* the values would be a `tf.Tensor1D` of shape [depth].
*
* Also available are stricter rank-specific methods with the same signature
* as this method that assert that parameters passed are of given rank
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/broadcast_to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {reshape} from './reshape';
* Broadcast an array to a compatible shape NumPy-style.
*
* The tensor's shape is compared to the broadcast shape from end to beginning.
* Ones are prepended to the tensor's shape until is has the same length as
* Ones are prepended to the tensor's shape until it has the same length as
* the broadcast shape. If input.shape[i]==shape[i], the (i+1)-th axis is
* already broadcast-compatible. If input.shape[i]==1 and shape[i]==N, then
* the input tensor is tiled N times along that axis (using tf.tile).
Expand Down
4 changes: 2 additions & 2 deletions tfjs-core/src/ops/clip_by_value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import {op} from './operation';
* x.clipByValue(-2, 3).print(); // or tf.clipByValue(x, -2, 3)
* ```
* @param x The input tensor.
* @param clipValueMin Lower-bound of range to be clipped to.
* @param clipValueMax Upper-bound of range to be clipped to.
* @param clipValueMin Lower bound of range to be clipped to.
* @param clipValueMax Upper bound of range to be clipped to.
*
* @doc {heading: 'Operations', subheading: 'Basic math'}
*/
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {op} from './operation';
* tf.concat([a, b], axis).print();
* ```
* @param tensors A list of tensors to concatenate.
* @param axis The axis to concate along. Defaults to 0 (the first dim).
* @param axis The axis to concatenate along. Defaults to 0 (the first dim).
*
* @doc {heading: 'Tensors', subheading: 'Slicing and Joining'}
*/
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/diag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {convertToTensor} from '../tensor_util_env';
import {op} from './operation';

/**
* Returns a diagonal tensor with a given diagonal values.
* Returns a diagonal tensor with given diagonal values.
*
* Given a diagonal, this operation returns a tensor with the diagonal and
* everything else padded with zeros.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/einsum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import {op} from './operation';
*
* - Does not support >2 input tensors.
* - Does not support duplicate axes for any given input tensor. E.g., equation
* 'ii->' is not suppoted.
* 'ii->' is not supported.
* - The `...` notation is not supported.
*
* @param equation a string describing the contraction, in the same format as
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/erf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {cast} from './cast';
import {op} from './operation';

/**
* Computes gause error function of the input `tf.Tensor` element-wise:
* Computes Gauss error function of the input `tf.Tensor` element-wise:
* `erf(x)`
*
* ```js
Expand Down
6 changes: 3 additions & 3 deletions tfjs-core/src/ops/euclidean_norm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {norm} from './norm';
import {op} from './operation';

/**
* Computes the euclidean norm of scalar, vectors, and matrices.
* Computes the Euclidean norm of scalar, vectors, and matrices.
*
* ```js
* const x = tf.tensor1d([1, 2, 3, 4]);
Expand All @@ -34,12 +34,12 @@ import {op} from './operation';
* @param axis Optional. If axis is null (the default), the input is
* considered a vector and a single vector norm is computed over the entire
* set of values in the Tensor, i.e. euclideanNorm(x) is equivalent
* to euclideanNorm(x.reshape([-1])). If axis is a integer, the input
* to euclideanNorm(x.reshape([-1])). If axis is an integer, the input
* is considered a batch of vectors, and axis determines the axis in x
* over which to compute vector norms. If axis is a 2-tuple of integer it is
* considered a batch of matrices and axis determines the axes in NDArray
* over which to compute a matrix norm.
* @param keepDims Optional. If true, the norm have the same dimensionality
* @param keepDims Optional. If true, the norm has the same dimensionality
* as the input.
*
* @doc {heading: 'Operations', subheading: 'Matrices'}
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/expand_dims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {op} from './operation';
* x.expandDims(axis).print();
* ```
*
* @param x The input tensor whose dimensions to be expanded.
* @param x The input tensor whose dimensions are to be expanded.
* @param axis The dimension index at which to insert shape of `1`. Defaults
* to 0 (the first dimension).
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/gather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {op} from './operation';
*
* x.gather(indices).print();
* ```
* @param x The input tensor whose slices to be gathered.
* @param x The input tensor whose slices are to be gathered.
* @param indices The indices of the values to extract.
* @param axis The axis over which to select values. Defaults to 0.
* @param batchDims Optional. The number of batch dimensions. It must be less
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/gather_nd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {op} from './operation';
* Gather slices from input tensor into a Tensor with shape specified by
* `indices`.
*
* `indices` is an K-dimensional integer tensor, best thought of as a
* `indices` is a K-dimensional integer tensor, best thought of as a
* (K-1)-dimensional tensor of indices into input, where each element defines a
* slice of input:
* output[\\(i_0, ..., i_{K-2}\\)] = input[indices[\\(i_0, ..., i_{K-2}\\)]]
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/image/crop_and_resize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {op} from '../operation';
* batch of images from which to take crops
* @param boxes 2d float32 tensor of shape `[numBoxes, 4]`. Each entry is
* `[y1, x1, y2, x2]`, where `(y1, x1)` and `(y2, x2)` are the normalized
* coordinates of the box in the boxInd[i]'th image in the batch
* coordinates of the box in the `boxInd[i]`th image in the batch
* @param boxInd 1d int32 tensor of shape `[numBoxes]` with values in range
* `[0, batch)` that specifies the image that the `i`-th box refers to.
* @param cropSize 1d int32 tensor of 2 elements `[cropHeigh, cropWidth]`
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/image/non_max_suppression_padded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {op} from '../operation';
* Defaults to 0.5 (50% box overlap).
* @param scoreThreshold A threshold for deciding when to remove boxes based
* on score. Defaults to -inf, which means any score is accepted.
* @param padToMaxOutputSize Defalts to false. If true, size of output
* @param padToMaxOutputSize Defaults to false. If true, size of output
* `selectedIndices` is padded to maxOutputSize.
* @return A map with the following properties:
* - selectedIndices: A 1D tensor with the selected box indices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {tensor1d} from '../tensor1d';
* Defaults to 0.5 (50% box overlap).
* @param scoreThreshold A threshold for deciding when to remove boxes based
* on score. Defaults to -inf, which means any score is accepted.
* @param padToMaxOutputSize Defalts to false. If true, size of output
* @param padToMaxOutputSize Defaults to false. If true, size of output
* `selectedIndices` is padded to maxOutputSize.
* @return A map with the following properties:
* - selectedIndices: A 1D tensor with the selected box indices.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/image/non_max_suppression_with_score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {op} from '../operation';
* Performs non maximum suppression of bounding boxes based on
* iou (intersection over union).
*
* This op also supports a Soft-NMS mode (c.f.
* This op also supports a Soft-NMS mode (cf.
* Bodla et al, https://arxiv.org/abs/1704.04503) where boxes reduce the score
* of other overlapping boxes, therefore favoring different regions of the image
* with high scores. To enable this Soft-NMS mode, set the `softNmsSigma`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {tensor1d} from '../tensor1d';
* Asynchronously performs non maximum suppression of bounding boxes based on
* iou (intersection over union).
*
* This op also supports a Soft-NMS mode (c.f.
* This op also supports a Soft-NMS mode (cf.
* Bodla et al, https://arxiv.org/abs/1704.04503) where boxes reduce the score
* of other overlapping boxes, therefore favoring different regions of the image
* with high scores. To enable this Soft-NMS mode, set the `softNmsSigma`
Expand Down
4 changes: 2 additions & 2 deletions tfjs-core/src/ops/image/resize_nearest_neighbor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import {reshape} from '../reshape';
* input by `(new_height - 1) / (height - 1)`, which exactly aligns the 4
* corners of images and resized images. If false, rescale by
* `new_height / height`. Treat similarly the width dimension.
* @param halfPixelCenters Defaults to `false`. Whether to assumes pixels are of
* half the actual dimensions, and yields more accurate resizes. This flag
* @param halfPixelCenters Defaults to `false`. Whether to assume pixels are of
* half the actual dimensions, and yield more accurate resizes. This flag
* would also make the floating point coordinates of the top left pixel
* 0.5, 0.5.
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/image/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {op} from '../operation';
*
* @param image 4d tensor of shape `[batch, imageHeight, imageWidth, depth]`.
* @param transforms Projective transform matrix/matrices. A tensor1d of length
* 8 or tensor of size N x 8. If one row of transforms is [a0, a1, a2, b0
* 8 or tensor of size N x 8. If one row of transforms is [a0, a1, a2, b0,
* b1, b2, c0, c1], then it maps the output point (x, y) to a transformed
* input point (x', y') = ((a0 x + a1 y + a2) / k, (b0 x + b1 y + b2) / k),
* where k = c0 x + c1 y + 1. The transforms are inverted compared to the
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/is_nan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {TensorLike} from '../types';
import {op} from './operation';

/**
* RReturns which elements of x are NaN.
* Returns which elements of x are NaN.
*
* ```js
* const x = tf.tensor1d([NaN, Infinity, -Infinity, 0, 1]);
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/linalg/band_part.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {zeros} from '../zeros';
* `[I, J, K, ..., M, N]`, then the output is a tensor with the same shape where
* `band[i, j, k, ..., m, n] = in_band(m, n) * input[i, j, k, ..., m, n]`.
* The indicator function
* `in_band(m, n) = (num_lower < 0 || (m-n) <= num_lower))`
* `in_band(m, n) = (num_lower < 0 || (m-n) <= num_lower)`
* `&& (num_upper < 0 || (n-m) <= num_upper)`
*
* ```js
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/linalg/gram_schmidt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {sum} from '../sum';
* const x = tf.tensor2d([[1, 2], [3, 4]]);
* let y = tf.linalg.gramSchmidt(x);
* y.print();
* console.log('Othogonalized:');
* console.log('Orthogonalized:');
* y.dot(y.transpose()).print(); // should be nearly the identity matrix.
* console.log('First row direction maintained:');
* const data = await y.array();
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/log_sum_exp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {sub} from './sub';
import {sum} from './sum';

/**
* Computes the log(sum(exp(elements across the reduction dimensions)).
* Computes the log(sum(exp(elements across the reduction dimensions))).
*
* Reduces the input along the dimensions given in `axis`. Unless `keepDims`
* is true, the rank of the array is reduced by 1 for each entry in `axis`.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/losses/compute_weighted_loss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {sum} from '../sum';
/**
* Computes the weighted loss between two tensors.
*
* @param losses Tensor of shape `[batch_size, d1, ... dN]`.
* @param losses Tensor of shape `[batch_size, d1, ..., dN]`.
* @param weights Tensor whose rank is either 0, or the same rank as
* `losses`, and must be broadcastable to `losses` (i.e., all
* dimensions must be either `1`, or the same as the corresponding
Expand Down
4 changes: 2 additions & 2 deletions tfjs-core/src/ops/losses/huber_loss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {sub} from '../sub';
import {computeWeightedLoss} from './compute_weighted_loss';

/**
* Computes the huber loss between two tensors.
* Computes the Huber loss between two tensors.
*
* @param labels The ground truth output tensor, same dimensions as
* 'predictions'.
Expand All @@ -41,7 +41,7 @@ import {computeWeightedLoss} from './compute_weighted_loss';
* `labels`, and must be broadcastable to `labels` (i.e., all dimensions
* must be either `1`, or the same as the corresponding `losses`
* dimension).
* @param delta Point where huber loss changes from quadratic to linear.
* @param delta Point where Huber loss changes from quadratic to linear.
* @param reduction Type of reduction to apply to loss. Should be of type
* `Reduction`.
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {op} from './operation';
* Reduces the input along the dimensions given in `axes`. Unless `keepDims`
* is true, the rank of the `tf.Tensor` is reduced by 1 for each entry in
* `axes`. If `keepDims` is true, the reduced dimensions are retained with
* length 1. If `axes` has no entries, all dimensions are reduced, and an
* length 1. If `axes` has no entries, all dimensions are reduced, and a
* `tf.Tensor` with a single element is returned.
*
* ```js
Expand Down
Loading

0 comments on commit b6d6bf7

Please sign in to comment.