MCPcopy Create free account

hub / github.com/tensorflow/tfjs / functions

Functions6,022 in github.com/tensorflow/tfjs

FunctionsliceAlongAxis
( array: Tensor, start: number, size: number, axis: number)
tfjs-layers/src/backend/tfjs_backend.ts:226
FunctionsliceInfo
( xShape: number[], begin: number[], end: number[], strides: number[], beginMask: number, endMask: num
tfjs-core/src/ops/slice_util.ts:421
Functionslice_
* Extracts a slice from a `tf.Tensor` starting at coordinates `begin` * and is of size `size`. * * Also available are stricter rank-specific method
tfjs-core/src/ops/slice.ts:62
FunctionsoftmaxCrossEntropy_
* Computes the softmax cross entropy loss between two tensors. * * If labelSmoothing is nonzero, smooth the labels towards 1/2: * * newOnehotLab
tfjs-core/src/ops/losses/softmax_cross_entropy.ts:125
Functionsoftmax_
* Computes the softmax normalized vector given the logits. * * ```js * const a = tf.tensor1d([1, 2, 3]); * * a.softmax().print(); // or tf.softm
tfjs-core/src/ops/softmax.ts:49
Functionsoftplus_
* Computes softplus of the input `tf.Tensor` element-wise: `log(exp(x) + 1)` * * ```js * const x = tf.tensor1d([0, 1, -1, .7]); * * x.softplus().
tfjs-core/src/ops/softplus.ts:39
FunctionspaceToBatchND
(args: { inputs: SpaceToBatchNDInputs, backend: WebGPUBackend, attrs: SpaceToBatchNDAttrs })
tfjs-backend-webgpu/src/kernels/SpaceToBatchND.ts:25
FunctionspaceToBatchND
(args: { inputs: SpaceToBatchNDInputs, backend: MathBackendWebGL, attrs: SpaceToBatchNDAttrs })
tfjs-backend-webgl/src/kernels/SpaceToBatchND.ts:26
FunctionspaceToBatchND
(args: { inputs: SpaceToBatchNDInputs, backend: BackendWasm, attrs: SpaceToBatchNDAttrs })
tfjs-backend-wasm/src/kernels/SpaceToBatchND.ts:26
FunctionspaceToBatchND_
* This operation divides "spatial" dimensions `[1, ..., M]` of the input into * a grid of blocks of shape `blockShape`, and interleaves these blocks
tfjs-core/src/ops/space_to_batch_nd.ts:77
FunctionsparseCategoricalAccuracy
( yTrue: Tensor, yPred: Tensor)
tfjs-layers/src/metrics.ts:92
FunctionsparseCategoricalAccuracy
( yTrue: Tensor, yPred: Tensor)
tfjs-layers/src/exports_metrics.ts:88
FunctionsparseCategoricalCrossentropy
( target: Tensor, output: Tensor, fromLogits = false)
tfjs-layers/src/losses.ts:136
FunctionsparseFillEmptyRows
(args: { inputs: SparseFillEmptyRowsInputs, backend: MathBackendCPU })
tfjs-backend-cpu/src/kernels/SparseFillEmptyRows.ts:24
FunctionsparseFillEmptyRows
(args: { inputs: SparseFillEmptyRowsInputs, backend: MathBackendWebGL })
tfjs-backend-webgl/src/kernels/SparseFillEmptyRows.ts:23
FunctionsparseFillEmptyRows
(args: { backend: BackendWasm, inputs: SparseFillEmptyRowsInputs, })
tfjs-backend-wasm/src/kernels/SparseFillEmptyRows.ts:50
FunctionsparseFillEmptyRows_
* The input SparseTensor is represented via the map of inputs {`indices`, * `values`, `denseShape`}. The output SparseTensor has the same `denseShape
tfjs-core/src/ops/sparse/sparse_fill_empty_rows.ts:82
FunctionsparseReshape
( args: {inputs: SparseReshapeInputs, backend: MathBackendCPU})
tfjs-backend-cpu/src/kernels/SparseReshape.ts:24
FunctionsparseReshape
( args: {inputs: SparseReshapeInputs, backend: MathBackendWebGL})
tfjs-backend-webgl/src/kernels/SparseReshape.ts:23
FunctionsparseReshape
(args: { backend: BackendWasm, inputs: SparseReshapeInputs, })
tfjs-backend-wasm/src/kernels/SparseReshape.ts:39
FunctionsparseReshape_
* This operation has the same semantics as reshape on the represented dense * tensor. The `inputIndices` are recomputed based on the requested `newSh
tfjs-core/src/ops/sparse/sparse_reshape.ts:60
FunctionsparseSegmentMean
( args: {inputs: SparseSegmentMeanInputs, backend: MathBackendCPU})
tfjs-backend-cpu/src/kernels/SparseSegmentMean.ts:24
FunctionsparseSegmentMean
( args: {inputs: SparseSegmentMeanInputs, backend: WebGPUBackend})
tfjs-backend-webgpu/src/kernels/SparseSegmentMean.ts:23
FunctionsparseSegmentMean
( args: {inputs: SparseSegmentMeanInputs, backend: MathBackendWebGL})
tfjs-backend-webgl/src/kernels/SparseSegmentMean.ts:23
FunctionsparseSegmentMean
(args: { backend: BackendWasm, inputs: SparseSegmentMeanInputs, })
tfjs-backend-wasm/src/kernels/SparseSegmentMean.ts:24
FunctionsparseSegmentMean_
* Computes the mean along sparse segments of a tensor. * * ```js * const c = tf.tensor2d([[1,2,3,4], [-1,-2,-3,-4], [6,7,8,9]]); * // Select two r
tfjs-core/src/ops/sparse/sparse_segment_mean.ts:59
FunctionsparseSegmentSum
( args: {inputs: SparseSegmentSumInputs, backend: MathBackendCPU})
tfjs-backend-cpu/src/kernels/SparseSegmentSum.ts:24
FunctionsparseSegmentSum
( args: {inputs: SparseSegmentSumInputs, backend: WebGPUBackend})
tfjs-backend-webgpu/src/kernels/SparseSegmentSum.ts:23
FunctionsparseSegmentSum
( args: {inputs: SparseSegmentSumInputs, backend: MathBackendWebGL})
tfjs-backend-webgl/src/kernels/SparseSegmentSum.ts:23
FunctionsparseSegmentSum
(args: { backend: BackendWasm, inputs: SparseSegmentSumInputs, })
tfjs-backend-wasm/src/kernels/SparseSegmentSum.ts:24
FunctionsparseSegmentSum_
* Computes the sum along sparse segments of a tensor. * * ```js * const c = tf.tensor2d([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]]); * // Select two ro
tfjs-core/src/ops/sparse/sparse_segment_sum.ts:59
FunctionsparseToDense
(args: { inputs: SparseToDenseInputs, backend: MathBackendCPU, attrs: SparseToDenseAttrs })
tfjs-backend-cpu/src/kernels/SparseToDense.ts:23
FunctionsparseToDense
(args: { inputs: SparseToDenseInputs, backend: WebGPUBackend, attrs: SparseToDenseAttrs })
tfjs-backend-webgpu/src/kernels/SparseToDense.ts:28
FunctionsparseToDense
(args: { inputs: SparseToDenseInputs, backend: MathBackendWebGL, attrs: SparseToDenseAttrs })
tfjs-backend-webgl/src/kernels/SparseToDense.ts:26
FunctionsparseToDense
(args: { backend: BackendWasm, inputs: SparseToDenseInputs, attrs: SparseToDenseAttrs })
tfjs-backend-wasm/src/kernels/SparseToDense.ts:46
FunctionsparseToDense_
* Converts a sparse representation into a dense tensor. * * Builds an array dense with shape outputShape such that: * * // If sparseIndices is sca
tfjs-core/src/ops/sparse_to_dense.ts:68
FunctionsparseTopKCategoricalAccuracy
( yTrue: Tensor, yPred: Tensor)
tfjs-layers/src/metrics.ts:108
FunctionspatialDropout1d
(args: SpatialDropout1DLayerConfig)
tfjs-layers/src/exports_layers.ts:569
FunctionspecFilter
(spec: any)
tfjs-core/src/jasmine_util.ts:130
Functionsplit
* Splits a string stream on a given separator. * * It is assumed that the incoming chunk boundaries have no semantic meaning, * so conceptual
tfjs-data/src/iterators/string_iterator.ts:40
Functionsplit
(arr: number[], size: number)
tfjs-converter/src/operations/executors/utils.ts:154
Methodsplit
* Split the values of a Tensor into the TensorArray. * @param length number[] with the lengths to use when splitting value along * its first
tfjs-converter/src/executor/tensor_array.ts:274
MethodsplitOutputCoords
()
tfjs-backend-webgpu/src/argminmax_webgpu.ts:78
FunctionsplitRealAndImagArrays
(complex: Float32Array)
tfjs-core/src/backends/complex_util.ts:62
FunctionsplitV
( args: {inputs: SplitVInputs, backend: MathBackendCPU, attrs: SplitVAttrs})
tfjs-backend-cpu/src/kernels/SplitV.ts:24
FunctionsplitV
( args: {inputs: SplitVInputs, backend: WebGPUBackend, attrs: SplitVAttrs})
tfjs-backend-webgpu/src/kernels/SplitV.ts:23
FunctionsplitV
( args: {inputs: SplitVInputs, backend: MathBackendWebGL, attrs: SplitVAttrs})
tfjs-backend-webgl/src/kernels/SplitV.ts:23
FunctionsplitV
( args: {inputs: SplitVInputs, attrs: SplitVAttrs, backend: BackendWasm})
tfjs-backend-wasm/src/kernels/SplitV.ts:25
Functionsplit_
* Splits a `tf.Tensor` into sub tensors. * * If `numOrSizeSplits` is a number, splits `x` along dimension `axis` * into `numOrSizeSplits` smaller t
tfjs-core/src/ops/split.ts:62
Functionsqrt_
* Computes square root of the input `tf.Tensor` element-wise: `y = sqrt(x)` * * ```js * const x = tf.tensor1d([1, 2, 4, -1]); * * x.sqrt().print(
tfjs-core/src/ops/sqrt.ts:39
Functionsquare_
* Computes square of `x` element-wise: `x ^ 2` * * ```js * const x = tf.tensor1d([1, 2, Math.sqrt(2), -1]); * * x.square().print(); // or tf.squ
tfjs-core/src/ops/square.ts:36
FunctionsquaredDifference_
* Returns (a - b) * (a - b) element-wise. * Supports broadcasting. * * ```js * const a = tf.tensor1d([1, 4, 3, 16]); * const b = tf.tensor1d([1,
tfjs-core/src/ops/squared_difference.ts:53
FunctionsquaredHinge
(yTrue: Tensor, yPred: Tensor)
tfjs-layers/src/losses.ts:69
Functionsqueeze_
* Removes dimensions of size 1 from the shape of a `tf.Tensor`. * * ```js * const x = tf.tensor([1, 2, 3, 4], [1, 1, 4]); * x.squeeze().print();
tfjs-core/src/ops/squeeze.ts:41
Methodstack
* Return a tensor that stacks a list of rank-R tf.Tensors into one rank-(R+1) * tf.Tensor. * @param elementShape shape of each tensor * @para
tfjs-converter/src/executor/tensor_list.ts:107
Functionstack_
* Stacks a list of rank-`R` `tf.Tensor`s into one rank-`(R+1)` `tf.Tensor`. * * ```js * const a = tf.tensor1d([1, 2]); * const b = tf.tensor1d([3,
tfjs-core/src/ops/stack.ts:44
FunctionstackedRNNCells
(args: StackedRNNCellsArgs)
tfjs-layers/src/exports_layers.ts:1520
FunctionstandardizeSampleWeights
( classWeight: ClassWeight|ClassWeight[]|ClassWeightMap, outputNames: string[])
tfjs-layers/src/engine/training_utils.ts:100
MethodstartTokenId
()
tfjs-layers/src/layers/nlp/models/gpt2/gpt2_tokenizer.ts:100
MethodstateSize
()
tfjs-layers/src/layers/recurrent.ts:1934
Functionstateful
* Determine whether the container is stateful. * * Porting Note: this is the equivalent of the stateful @property of * the Container class
tfjs-layers/src/engine/container.ts:1345
Functionstateful
()
tfjs-layers/src/engine/topology.ts:721
Methodstates
* Get the current state tensors of the RNN. * * If the state hasn't been set, return an array of `null`s of the correct * length.
tfjs-layers/src/layers/recurrent.ts:473
FunctionstaticRegexReplace
(args: { inputs: StaticRegexReplaceInputs, backend: MathBackendWebGL, attrs: StaticRegexReplaceAttrs, })
tfjs-backend-webgl/src/kernels/StaticRegexReplace.ts:22
FunctionstaticRegexReplace_
* Replace the match of a `pattern` in `input` with `rewrite`. * * ```js * const result = tf.string.staticRegexReplace( * ['format this
tfjs-core/src/ops/string/static_regex_replace.ts:45
Functionstep
( {inputs, attrs, backend}: {inputs: UnaryInputs, attrs: StepAttrs, backend: WebGPUBackend})
tfjs-backend-webgpu/src/kernels/Step.ts:24
Functionstep
( {inputs, attrs, backend}: {inputs: UnaryInputs, attrs: StepAttrs, backend: MathBackendWebGL})
tfjs-backend-webgl/src/kernels/Step.ts:23
Methodstep
(inputs: Tensor, states: Tensor[])
tfjs-layers/src/layers/wrappers.ts:190
Methodstep
(inputs: Tensor, states: Tensor[])
tfjs-layers/src/layers/recurrent.ts:736
Functionstep_
* Computes step of the input `tf.Tensor` element-wise: `x > 0 ? 1 : alpha` * * ```js * const x = tf.tensor1d([0, 2, -1, -3]); * * x.step(.5).prin
tfjs-core/src/ops/step.ts:41
Functionstft_
* Computes the Short-time Fourier Transform of signals * See: https://en.wikipedia.org/wiki/Short-time_Fourier_transform * * ```js * const input =
tfjs-core/src/ops/signal/stft.ts:43
Methodstop
()
tfjs-data/src/iterators/microphone_iterator.ts:199
MethodstopTraining
* Setter used for force stopping of LayersModel.fit() (i.e., training). * * Example: * * ```js * const model = tf.sequential(); * mo
tfjs-layers/src/models.ts:1076
MethodstopTraining
* Setter used for force stopping of LayersModel.fit() (i.e., training). * * Example: * * ```js * const input = tf.input({shape: [10]});
tfjs-layers/src/engine/training.ts:1897
FunctionstridedSlice
(args: { inputs: StridedSliceInputs, backend: WebGPUBackend, attrs: StridedSliceAttrs })
tfjs-backend-webgpu/src/kernels/StridedSlice.ts:27
FunctionstridedSlice
(args: { inputs: StridedSliceInputs, backend: MathBackendWebGL, attrs: StridedSliceAttrs })
tfjs-backend-webgl/src/kernels/StridedSlice.ts:27
FunctionstridedSlice
(args: { backend: BackendWasm, inputs: StridedSliceInputs, attrs: StridedSliceAttrs })
tfjs-backend-wasm/src/kernels/StridedSlice.ts:45
FunctionstridedSlice_
* Extracts a strided slice of a tensor. * * Roughly speaking, this op extracts a slice of size (end-begin)/stride from * the given input tensor (x)
tfjs-core/src/ops/strided_slice.ts:61
FunctionstringNGrams
(args: { inputs: StringNGramsInputs, backend: MathBackendCPU, attrs: StringNGramsAttrs })
tfjs-backend-cpu/src/kernels/StringNGrams.ts:24
FunctionstringNGrams
(args: { inputs: StringNGramsInputs, backend: WebGPUBackend, attrs: StringNGramsAttrs })
tfjs-backend-webgpu/src/kernels/StringNGrams.ts:23
FunctionstringNGrams
(args: { inputs: StringNGramsInputs, backend: MathBackendWebGL, attrs: StringNGramsAttrs })
tfjs-backend-webgl/src/kernels/StringNGrams.ts:23
FunctionstringNGrams
(args: { backend: BackendWasm, inputs: StringNGramsInputs, attrs: StringNGramsAttrs })
tfjs-backend-wasm/src/kernels/StringNGrams.ts:23
FunctionstringNGrams_
* Creates ngrams from ragged string data. * * This op accepts a ragged tensor with 1 ragged dimension containing only * strings and outputs a ragge
tfjs-core/src/ops/string/string_n_grams.ts:67
FunctionstringSplit
(args: { inputs: StringSplitInputs, backend: MathBackendCPU, attrs: StringSplitAttrs })
tfjs-backend-cpu/src/kernels/StringSplit.ts:24
FunctionstringSplit
(args: { inputs: StringSplitInputs, backend: MathBackendWebGL, attrs: StringSplitAttrs })
tfjs-backend-webgl/src/kernels/StringSplit.ts:23
FunctionstringSplit
(args: { backend: BackendWasm, inputs: StringSplitInputs, attrs: StringSplitAttrs })
tfjs-backend-wasm/src/kernels/StringSplit.ts:23
FunctionstringSplit_
* Split elements of `input` based on `delimiter` into a SparseTensor . * * Let N be the size of source (typically N will be the batch size). Split e
tfjs-core/src/ops/string/string_split.ts:58
FunctionstringToDType
(dtype: string)
tfjs-layers/src/utils/generic_utils.ts:323
FunctionstringToHashBucketFast
(args: { inputs: StringToHashBucketFastInputs, backend: MathBackendCPU, attrs: StringToHashBucketFastAtt
tfjs-backend-cpu/src/kernels/StringToHashBucketFast.ts:24
FunctionstringToHashBucketFast
(args: { inputs: StringToHashBucketFastInputs, backend: MathBackendWebGL, attrs: StringToHashBucketFastA
tfjs-backend-webgl/src/kernels/StringToHashBucketFast.ts:23
FunctionstringToHashBucketFast
(args: { backend: BackendWasm, inputs: StringToHashBucketFastInputs, attrs: StringToHashBucketFastAttrs
tfjs-backend-wasm/src/kernels/StringToHashBucketFast.ts:23
FunctionstringToHashBucketFast_
* Converts each string in the input Tensor to its hash mod by a number of * buckets. * * The hash function is deterministic on the content of the s
tfjs-core/src/ops/string/string_to_hash_bucket_fast.ts:46
Functionsub_
* Subtracts two `tf.Tensor`s element-wise, A - B. Supports broadcasting. * * ```js * const a = tf.tensor1d([10, 20, 30, 40]); * const b = tf.tenso
tfjs-core/src/ops/sub.ts:50
Functionsum
(args: {backend: BackendWasm, inputs: SumInputs, attrs: SumAttrs})
tfjs-backend-wasm/src/kernels/Sum.ts:37
Functionsum_
* Computes the sum of elements across dimensions of a `tf.Tensor`. * * Reduces the input along the dimensions given in `axes`. Unless `keepDims` *
tfjs-core/src/ops/sum.ts:58
Methodsummary
()
tfjs-data/src/dataset_test.ts:30
Methodsummary
()
tfjs-data/src/iterators/lazy_iterator_test.ts:32
Methodsummary
()
tfjs-data/src/iterators/lazy_iterator_test.ts:269
Methodsummary
()
tfjs-data/src/iterators/webcam_iterator.ts:63
Methodsummary
()
tfjs-data/src/iterators/microphone_iterator.ts:74
← previousnext →5,501–5,600 of 6,022, ranked by callers