Object

org.platanios.tensorflow.api.ops

Basic

Related Doc: package ops

Permalink

object Basic extends Basic

Linear Supertypes
Basic, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Basic
  2. Basic
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class BasicOps(output: Output) extends Product with Serializable

    Permalink
  2. case class ConstantPadding extends PaddingMode with Product with Serializable

    Permalink

    Constant padding mode.

    Constant padding mode.

    The op pads input with zeros according to the paddings you specify. paddings is an integer tensor with shape [n, 2], where n is the rank of input. For each dimension D of input, paddings(D, 0) indicates how many zeros to add before the contents of input in that dimension, and paddings(D, 1) indicates how many zeros to add after the contents of input in that dimension.

    The padded size of each dimension D of the output is equal to paddings(D, 0) + input.shape(D) + paddings(D, 1).

    For example:

    // 'input' = [[1, 2, 3], [4, 5, 6]]
    // 'paddings' = [[1, 1], [2, 2]]
    tf.pad(input, paddings, tf.ConstantPadding(0)) ==>
      [[0, 0, 0, 0, 0, 0, 0],
       [0, 0, 1, 2, 3, 0, 0],
       [0, 0, 4, 5, 6, 0, 0],
       [0, 0, 0, 0, 0, 0, 0]]
    Definition Classes
    Basic
  3. sealed trait PaddingMode extends AnyRef

    Permalink

    Padding mode.

    Padding mode.

    Definition Classes
    Basic

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object ReflectivePadding extends PaddingMode

    Permalink

    Reflective padding mode.

    Reflective padding mode.

    The op pads input with mirrored values according to the paddings you specify. paddings is an integer tensor with shape [n, 2], where n is the rank of input. For each dimension D of input, paddings(D, 0) indicates how many values to add before the contents of input in that dimension, and paddings(D, 1) indicates how many values to add after the contents of input in that dimension. Both paddings(D, 0) and paddings(D, 1) must be no greater than input.shape(D) - 1.

    The padded size of each dimension D of the output is equal to paddings(D, 0) + input.shape(D) + paddings(D, 1).

    For example:

    // 'input' = [[1, 2, 3], [4, 5, 6]]
    // 'paddings' = [[1, 1], [2, 2]]
    tf.pad(input, paddings, tf.ReflectivePadding) ==>
      [[6, 5, 4, 5, 6, 5, 4],
       [3, 2, 1, 2, 3, 2, 1],
       [6, 5, 4, 5, 6, 5, 4],
       [3, 2, 1, 2, 3, 2, 1]]
    Definition Classes
    Basic
  5. object SymmetricPadding extends PaddingMode

    Permalink

    Symmetric padding mode.

    Symmetric padding mode.

    The op pads input with mirrored values according to the paddings you specify. paddings is an integer tensor with shape [n, 2], where n is the rank of input. For each dimension D of input, paddings(D, 0) indicates how many values to add before the contents of input in that dimension, and paddings(D, 1) indicates how many values to add after the contents of input in that dimension. Both paddings(D, 0) and paddings(D, 1) must be no greater than input.shape(D).

    The padded size of each dimension D of the output is equal to paddings(D, 0) + input.shape(D) + paddings(D, 1).

    For example:

    // 'input' = [[1, 2, 3], [4, 5, 6]]
    // 'paddings' = [[1, 1], [2, 2]]
    tf.pad(input, paddings, tf.SymmetricPadding) ==>
      [[2, 1, 1, 2, 3, 3, 2],
       [2, 1, 1, 2, 3, 3, 2],
       [5, 4, 4, 5, 6, 6, 5],
       [5, 4, 4, 5, 6, 6, 5]]
    Definition Classes
    Basic
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def batchToSpace(input: Output, blockSize: Int, crops: Output, name: String = "BatchToSpace"): Output

    Permalink

    $OpDocBasicBatchToSpace

    $OpDocBasicBatchToSpace

    input

    4-dimensional input tensor with shape [batch, height, width, depth].

    blockSize

    Block size which must be greater than 1.

    crops

    2-dimensional INT32 or INT64 tensor containing non-negative integers with shape [2, 2].

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  8. def batchToSpaceND(input: Output, blockShape: Output, crops: Output, name: String = "BatchToSpaceND"): Output

    Permalink

    $OpDocBasicBatchToSpaceND

    $OpDocBasicBatchToSpaceND

    input

    N-dimensional tensor with shape inputShape = [batch] + spatialShape + remainingShape, where spatialShape has M dimensions.

    blockShape

    One-dimensional INT32 or INT64 tensor with shape [M] whose elements must all be >= 1.

    crops

    Two-dimensional INT32 or INT64 tensor with shape [M, 2] whose elements must all be non-negative. crops(i) = [cropStart, cropEnd] specifies the amount to crop from input dimension i + 1, which corresponds to spatial dimension i. It is required that cropStart(i) + cropEnd(i) <= blockShape(i) * inputShape(i + 1).

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
    Annotations
    @throws( ... )
  9. def booleanMask(input: Output, mask: Output, name: String = "BooleanMask"): Output

    Permalink

    $OpDocBasicBooleanMask

    $OpDocBasicBooleanMask

    input

    N-dimensional tensor.

    mask

    K-dimensional boolean tensor, where K <= N and K must be known statically.

    name

    Name for the created op output.

    returns

    Created op output.

    Definition Classes
    Basic
  10. def broadcastGradientArguments(shape0: Output, shape1: Output, name: String = "BroadcastGradientArguments"): (Output, Output)

    Permalink

    $OpDocBasicBroadcastGradientArguments

    $OpDocBasicBroadcastGradientArguments

    shape0

    First operand shape.

    shape1

    Second operand shape.

    name

    Name for the created op.

    returns

    Tuple containing two op outputs, each containing the reduction indices for the corresponding op.

    Definition Classes
    Basic
  11. def broadcastShapeDynamic(shape1: Output, shape2: Output, name: String = "BroadcastShape"): Output

    Permalink

    $OpDocBasicBroadcastShape

    $OpDocBasicBroadcastShape

    shape1

    One-dimensional integer tensor representing the shape of the first argument.

    shape2

    One-dimensional integer tensor representing the shape of the first argument.

    name

    Name for the created op.

    returns

    Created op output, which is a one-dimensional integer tensor representing the broadcasted shape.

    Definition Classes
    Basic
  12. def broadcastTo(tensor: Output, shape: Output, name: String = "BroadcastTo"): Output

    Permalink

    $OpDocBasicBroadcastTo

    $OpDocBasicBroadcastTo

    tensor

    Tensor to broadcast.

    shape

    Shape to broadcast the provided tensor to.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  13. def checkNumerics(input: Output, message: String = "", name: String = "CheckNumerics"): Output

    Permalink

    $OpDocBasicCheckNumerics

    $OpDocBasicCheckNumerics

    input

    Input tensor.

    message

    Prefix to print for the error message.

    name

    Name for the created op.

    returns

    Created op output, which has the same value as the input tensor.

    Definition Classes
    Basic
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def concatenate(inputs: Seq[Output], axis: Output = 0, name: String = "Concatenate"): Output

    Permalink

    $OpDocBasicConcatenate

    $OpDocBasicConcatenate

    inputs

    Input tensors to be concatenated.

    axis

    Dimension along which to concatenate the input tensors. As in Python, indexing for the axis is 0-based. Positive axes in the range of [0, rank(values)) refer to the axis-th dimension, and negative axes refer to the axis + rank(inputs)-th dimension.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  16. def constant(tensor: tensors.Tensor[types.DataType], dataType: types.DataType = null, shape: core.Shape = null, name: String = "Constant"): Output

    Permalink

    $OpDocBasicConstant

    $OpDocBasicConstant

    tensor

    Constant value.

    dataType

    Data type of the resulting tensor. If not provided, its value will be inferred from the type of value.

    shape

    Shape of the resulting tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
    Annotations
    @throws( ... )
    Exceptions thrown

    InvalidShapeException If shape != null, verifyShape == true, and the shape of values does not match the provided shape.

  17. def depthToSpace(input: Output, blockSize: Int, dataFormat: NN.CNNDataFormat = CNNDataFormat.default, name: String = "DepthToSpace"): Output

    Permalink

    $OpDocBasicDepthToSpace

    $OpDocBasicDepthToSpace

    input

    4-dimensional input tensor with shape [batch, height, width, depth].

    blockSize

    Block size which must be greater than 1.

    dataFormat

    Format of the input and output data.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  18. def editDistance(hypothesis: SparseOutput, truth: SparseOutput, normalize: Boolean = true, name: String = "EditDistance"): Output

    Permalink

    $OpDocBasicEditDistance

    $OpDocBasicEditDistance

    hypothesis

    Sparse tensor that contains the hypothesis sequences.

    truth

    Sparse tensor that contains the truth sequences.

    normalize

    Optional boolean value indicating whether to normalize the Levenshtein distance by the length of truth.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def expandDims(input: Output, axis: Output, name: String = "ExpandDims"): Output

    Permalink

    $OpDocBasicExpandDims

    $OpDocBasicExpandDims

    input

    Input tensor.

    axis

    Dimension index at which to expand the shape of input.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  22. def fill(dataType: types.DataType = null, shape: Output = null)(value: Output, name: String = "Fill"): Output

    Permalink

    $OpDocBasicFill

    $OpDocBasicFill

    dataType

    Optional data type for the created tensor.

    shape

    Shape of the output tensor.

    value

    Value to fill the output tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def gather(input: Output, indices: Output, axis: Output = 0, name: String = "Gather"): Output

    Permalink

    $OpDocBasicGather

    $OpDocBasicGather

    input

    Tensor from which to gather values.

    indices

    Tensor containing indices to gather.

    axis

    Tensor containing the axis along which to gather.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  25. def gatherND(input: Output, indices: Output, name: String = "GatherND"): Output

    Permalink

    $OpDocBasicGatherND

    $OpDocBasicGatherND

    input

    Tensor from which to gather values.

    indices

    Tensor containing indices to gather.

    name

    Name for the created op.

    returns

    Created op output that contains the values from input gathered from indices given by indices, with shape indices.shape(::-1) + input.shape(indices.shape(-1)::).

    Definition Classes
    Basic
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def guaranteeConstant(input: Output, name: String = "GuaranteeConstant"): Output

    Permalink

    $OpDocBasicGuaranteeConstant

    $OpDocBasicGuaranteeConstant

    input

    Input tensor to guarantee that is constant.

    name

    Name for the created op.

    returns

    Created op output which is equal to the input tensor.

    Definition Classes
    Basic
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def identity[T <: OutputLike](input: T, name: String = "Identity"): T

    Permalink

    $OpDocBasicIdentity

    $OpDocBasicIdentity

    input

    Input tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  30. def indexedSlicesMask(input: OutputIndexedSlices, maskIndices: Output, name: String = "IndexedSlicesMask"): OutputIndexedSlices

    Permalink

    $OpDocBasicIndexedSlicesMask

    $OpDocBasicIndexedSlicesMask

    input

    Input indexed slices.

    maskIndices

    One-dimensional tensor containing the indices of the elements to mask.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  31. def invertPermutation(input: Output, name: String = "InvertPermutation"): Output

    Permalink

    $OpDocBasicInvertPermutation

    $OpDocBasicInvertPermutation

    input

    One-dimensional INT32 or INT64 input tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. def listDiff(x: Output, y: Output, indicesDataType: types.DataType = INT32, name: String = "ListDiff"): (Output, Output)

    Permalink

    $OpDocBasicListDiff

    $OpDocBasicListDiff

    x

    One-dimensional tensor containing the values to keep.

    y

    One-dimensional tensor containing the values to remove.

    indicesDataType

    Data type to use for the output indices of this op. Must be INT32 or INT64.

    name

    Name for the created op.

    returns

    Tuple containing output and indices, from the method description.

    Definition Classes
    Basic
  34. def matrixTranspose(input: Output, conjugate: Boolean = false, name: String = "MatrixTranspose"): Output

    Permalink

    $OpDocBasicMatrixTranspose

    $OpDocBasicMatrixTranspose

    input

    Input tensor to transpose.

    conjugate

    If true, then the complex conjugate of the transpose result is returned.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  35. def meshGrid(inputs: Seq[Output], useCartesianIndexing: Boolean = true, name: String = "MeshGrid"): Seq[Output]

    Permalink

    $OpDocBasicMeshGrid

    $OpDocBasicMeshGrid

    inputs

    Sequence containing N input rank-1 tensors.

    useCartesianIndexing

    If true (the default value), the broadcasting instructions for the first two dimensions are swapped.

    name

    Name for the created op.

    returns

    Created op outputs, each with rank N.

    Definition Classes
    Basic
  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. def oneHot(indices: Output, depth: Output, onValue: Output = null, offValue: Output = null, axis: Int = 1, dataType: types.DataType = null, name: String = "OneHot"): Output

    Permalink

    $OpDocBasicOneHot

    $OpDocBasicOneHot

    indices

    Tensor containing the indices for the "on" values.

    depth

    Scalar tensor defining the depth of the one-hot dimension.

    onValue

    Scalar tensor defining the value to fill in the output ith value, when indices[j] = i. Defaults to the value 1 with type dataType.

    offValue

    Scalar tensor defining the value to fill in the output ith value, when indices[j] != i. Defaults to the value 0 with type dataType.

    axis

    Axis to fill. Defaults to -1, representing the last axis.

    dataType

    Data type of the output tensor. If not provided, the function will attempt to assume the data type of onValue or offValue, if one or both are passed in. If none of onValue, offValue, or dataType are provided, dataType will default to the FLOAT32 data type.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  40. def ones(dataType: types.DataType, shape: Output, name: String = "Ones"): Output

    Permalink

    $OpDocBasicOnes

    $OpDocBasicOnes

    dataType

    Tensor data type.

    shape

    Tensor shape.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  41. def onesLike(input: Output, dataType: types.DataType = null, optimize: Boolean = true, name: String = "OnesLike"): Output

    Permalink

    $OpDocBasicOnesLike

    $OpDocBasicOnesLike

    input

    Input tensor.

    dataType

    Data type of the output tensor.

    optimize

    Boolean flag indicating whether to optimize this op if the shape of input is known at graph creation time.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  42. def pad(input: Output, paddings: Output, mode: PaddingMode = ..., name: String = "Pad"): Output

    Permalink

    $OpDocBasicPad

    $OpDocBasicPad

    input

    Input tensor to be padded.

    paddings

    INT32 or INT64 tensor containing the paddings.

    mode

    Padding mode to use.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  43. def parallelStack(inputs: Array[Output], name: String = "ParallelStack"): Output

    Permalink

    $OpDocBasicParallelStack

    $OpDocBasicParallelStack

    inputs

    Input tensors to be stacked.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  44. def placeholder(dataType: types.DataType, shape: core.Shape = null, name: String = "Placeholder"): Output

    Permalink

    $OpDocBasicPlaceholder

    $OpDocBasicPlaceholder

    dataType

    Data type of the elements in the tensor that will be fed.

    shape

    Shape of the tensor that will be fed. The shape can be any partially-specified, or even completely unknown.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  45. def placeholderWithDefault(default: Output, shape: core.Shape, name: String = "PlaceholderWithDefault"): Output

    Permalink

    $OpDocBasicPlaceholderWithDefault

    $OpDocBasicPlaceholderWithDefault

    default

    Default value to pass through when no input is fed for this placeholder.

    shape

    Shape of the tensor that will be fed. The shape can be any partially-specified, or even completely unknown.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  46. def preventGradient(input: Output, message: String = "", name: String = "PreventGradient"): Output

    Permalink

    $OpDocBasicPreventGradient

    $OpDocBasicPreventGradient

    input

    Input tensor.

    message

    Message to print along with the error.

    name

    Name for the created op.

    returns

    Created op output, which has the same value as the input tensor.

    Definition Classes
    Basic
  47. def rank[T <: OutputLike](input: T, dataType: types.DataType = INT32, optimize: Boolean = true, name: String = "Rank"): Output

    Permalink

    $OpDocBasicRank

    $OpDocBasicRank

    input

    Tensor whose rank to return.

    dataType

    Optional data type to use for the output of this op.

    optimize

    Boolean flag indicating whether to optimize this op creation by using a constant op with the rank value that input has at graph creation time (instead of execution time), if known.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  48. def requiredSpaceToBatchPaddingsAndCrops(inputShape: Output, blockShape: Output, basePaddings: Output = null, name: String = "RequiredSpaceToBatchPaddings"): (Output, Output)

    Permalink

    $OpDocBasicRequiredSpaceToBatchPaddingsAndCrops

    $OpDocBasicRequiredSpaceToBatchPaddingsAndCrops

    inputShape

    INT32 tensor with shape [N].

    blockShape

    INT32 tensor with shape [N].

    basePaddings

    Optional INT32 tensor with shape [N, 2] that specifies the minimum amount of padding to use. All elements must be non-negative. Defaults to a tensor containing all zeros.

    name

    Created op name.

    returns

    Tuple containing the paddings and crops required.

    Definition Classes
    Basic
  49. def reshape(input: Output, shape: Output, name: String = "Reshape"): Output

    Permalink

    $OpDocBasicReshape

    $OpDocBasicReshape

    input

    Input tensor.

    shape

    Shape of the output tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  50. def reverse(input: Output, axes: Output, name: String = "Reverse"): Output

    Permalink

    $OpDocBasicReverse

    $OpDocBasicReverse

    input

    Input tensor to reverse. It must have rank at most 8.

    axes

    Dimensions of the input tensor to reverse. Has to be INT32 or INT64.

    name

    Name for the created op.

    returns

    Created op output which has the same shape as input.

    Definition Classes
    Basic
  51. def reverseSequence(input: Output, sequenceLengths: Output, sequenceAxis: Int, batchAxis: Int = 0, name: String = "ReverseSequence"): Output

    Permalink

    $OpDocBasicReverseSequence

    $OpDocBasicReverseSequence

    input

    Input tensor to reverse.

    sequenceLengths

    One-dimensional tensor with length input.shape(batchAxis) and max(sequenceLengths) <= input.shape(sequenceAxis).

    sequenceAxis

    Tensor dimension which is partially reversed.

    batchAxis

    Tensor dimension along which the reversal is performed.

    name

    Created op name.

    returns

    Created op output which has the same shape as input.

    Definition Classes
    Basic
  52. def scatterND(indices: Output, updates: Output, shape: Output, name: String = "ScatterND"): Output

    Permalink

    $OpDocBasicScatterND

    $OpDocBasicScatterND

    indices

    Indices tensor (must have INT32 or INT64 data type).

    updates

    Updates to scatter into the output tensor.

    shape

    One-dimensional INT32 or INT64 tensor specifying the shape of the output tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  53. def sequenceMask(lengths: Output, maxLength: Output = null, dataType: types.DataType = BOOLEAN, name: String = "SequenceMask"): Output

    Permalink

    $OpDocBasicSequenceMask

    $OpDocBasicSequenceMask

    lengths

    One-dimensional integer tensor containing the lengths to keep for each row. If maxLength is provided, then all values in lengths must be smaller than maxLength.

    maxLength

    Scalar integer tensor representing the maximum length of each row. Defaults to the maximum value in lengths.

    dataType

    Data type for the output tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
    Annotations
    @throws( ... )
    Exceptions thrown

    IllegalArgumentException If maxLength is not a scalar.

  54. def shape[T <: OutputLike](input: T, dataType: types.DataType = INT64, optimize: Boolean = true, name: String = "Shape"): Output

    Permalink

    $OpDocBasicShape

    $OpDocBasicShape

    input

    Tensor whose shape to return.

    dataType

    Optional data type to use for the output of this op.

    optimize

    Boolean flag indicating whether to optimize this op creation by using a constant op with the shape of that input at graph creation time (instead of execution time), if known.

    name

    Name for the created op.

    returns

    Created op output, which is one-dimensional.

    Definition Classes
    Basic
  55. def shapeN(inputs: Seq[Output], dataType: types.DataType = INT64, name: String = "ShapeN"): Seq[Output]

    Permalink

    $OpDocBasicShapeN

    $OpDocBasicShapeN

    inputs

    Tensors whose shapes to return.

    dataType

    Optional data type to use for the outputs of this op.

    name

    Name for the created op.

    returns

    Created op outputs, all of which are one-dimensional.

    Definition Classes
    Basic
  56. def size[T <: OutputLike](input: T, dataType: types.DataType = INT64, optimize: Boolean = true, name: String = "Size"): Output

    Permalink

    $OpDocBasicSize

    $OpDocBasicSize

    input

    Tensor whose size to return.

    dataType

    Optional data type to use for the output of this op.

    optimize

    Boolean flag indicating whether to optimize this op creation by using a constant op with the number of elements provided by the shape of that input at graph creation time (instead of execution time), if known.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  57. def slice(input: Output, begin: Output, size: Output, name: String = "Slice"): Output

    Permalink

    $OpDocBasicSlice

    $OpDocBasicSlice

    input

    Tensor to slice.

    begin

    Begin index tensor (must have data type of INT32 or INT64). begin(i) specifies the offset into the ith dimension of input to slice from.

    size

    Slice size tensor (must have data type of INT32 or INT64). size(i) specifies the number of elements of the ith dimension of input to slice. If size(i) == -1, then all the remaining elements in dimension i are included in the slice (i.e., this is equivalent to setting size(i) = input.shape(i) - begin(i)).

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  58. def spaceToBatch(input: Output, blockSize: Int, paddings: Output, name: String = "SpaceToBatch"): Output

    Permalink

    $OpDocBasicSpaceToBatch

    $OpDocBasicSpaceToBatch

    input

    4-dimensional input tensor with shape [batch, height, width, depth].

    blockSize

    Block size which must be greater than 1.

    paddings

    2-dimensional INT32 or INT64 tensor containing non-negative integers with shape [2, 2].

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  59. def spaceToBatchND(input: Output, blockShape: Output, paddings: Output, name: String = "SpaceToBatchND"): Output

    Permalink

    $OpDocBasicSpaceToBatchND

    $OpDocBasicSpaceToBatchND

    input

    N-dimensional tensor with shape inputShape = [batch] + spatialShape + remainingShape, where spatialShape has M dimensions.

    blockShape

    One-dimensional INT32 or INT64 tensor with shape [M] whose elements must all be >= 1.

    paddings

    Two-dimensional INT32 or INT64 tensor with shape [M, 2] whose elements must all be non-negative. paddings(i) = [padStart, padEnd] specifies the padding for input dimension i + 1, which corresponds to spatial dimension i. It is required that blockShape(i) divides inputShape(i + 1) + padStart + padEnd.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  60. def spaceToDepth(input: Output, blockSize: Int, dataFormat: NN.CNNDataFormat = CNNDataFormat.default, name: String = "SpaceToDepth"): Output

    Permalink

    $OpDocBasicSpaceToDepth

    $OpDocBasicSpaceToDepth

    input

    4-dimensional input tensor with shape [batch, height, width, depth].

    blockSize

    Block size which must be greater than 1.

    dataFormat

    Format of the input and output data.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  61. def sparsePlaceholder(dataType: types.DataType, shape: core.Shape = null, name: String = "SparsePlaceholder"): SparseOutput

    Permalink

    $OpDocBasicSparsePlaceholder

    $OpDocBasicSparsePlaceholder

    dataType

    Data type of the elements in the tensor that will be fed.

    shape

    Shape of the tensor that will be fed. The shape can be any partially-specified, or even completely unknown. This represents the shape of the dense tensor that corresponds to the sparse tensor that this placeholder refers to.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  62. def split(input: Output, splitSizes: Output, axis: Output = 0, name: String = "Split"): Seq[Output]

    Permalink

    $OpDocBasicSplit

    $OpDocBasicSplit

    input

    Input tensor to split.

    splitSizes

    Sizes for the splits to obtain.

    axis

    Dimension along which to split the input tensor.

    name

    Name for the created op.

    returns

    Created op outputs.

    Definition Classes
    Basic
  63. def splitEvenly(input: Output, numSplits: Int, axis: Output = 0, name: String = "Split"): Seq[Output]

    Permalink

    $OpDocBasicSplitEvenly

    $OpDocBasicSplitEvenly

    input

    Input tensor to split.

    numSplits

    Number of splits to obtain along the axis dimension.

    axis

    Dimension along which to split the input tensor.

    name

    Name for the created op.

    returns

    Created op outputs.

    Definition Classes
    Basic
  64. def squeeze(input: Output, axes: Seq[Int] = null, name: String = "Squeeze"): Output

    Permalink

    $OpDocBasicSqueeze

    $OpDocBasicSqueeze

    input

    Input tensor.

    axes

    Dimensions of size 1 to squeeze. If this argument is not provided, then all dimensions of size 1 will be squeezed.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  65. def stack(inputs: Seq[Output], axis: Int = 0, name: String = "Stack"): Output

    Permalink

    $OpDocBasicStack

    $OpDocBasicStack

    inputs

    Input tensors to be stacked.

    axis

    Dimension along which to stack the input tensors.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  66. def stopGradient(input: Output, name: String = "StopGradient"): Output

    Permalink

    $OpDocBasicStopGradient

    $OpDocBasicStopGradient

    input

    Input tensor.

    name

    Name for the created op.

    returns

    Created op output, which has the same value as the input tensor.

    Definition Classes
    Basic
  67. def stridedSlice(input: Output, begin: Output, end: Output, strides: Output = null, beginMask: Long = 0, endMask: Long = 0, ellipsisMask: Long = 0, newAxisMask: Long = 0, shrinkAxisMask: Long = 0, name: String = "StridedSlice"): Output

    Permalink

    $OpDocBasicStridedSlice

    $OpDocBasicStridedSlice

    input

    Tensor to slice.

    begin

    One-dimensional integer tensor. begin(i) specifies the begin offset into the ith range specification. The exact dimension this corresponds to will be determined by context. Out-of-bounds values will be silently clamped. If the ith bit of beginMask is 1, then begin(i) is ignored and the full range of the appropriate dimension is used instead. Negative values causes indexing to start from the highest element.

    end

    One-dimensional integer tensor. end(i) is like begin(i) with the exception that it determines the end offset into the ith range specification, and that endMask is used to determine full ranges.

    strides

    One-dimensional integer tensor. strides(i) specifies the increment in the ith range specification after extracting a given element. Negative indices will reverse the original order. Out-of-bounds values are clamped to [0, shape(i)) if slice(i) > 0 or [-1, shape(i) - 1] if slice(i) < 0.

    beginMask

    Integer value representing a bitmask where bit i being 1 means to ignore the begin value and instead use the largest interval possible. At runtime begin(i) will be replaced with [0, shape(i) - 1) if stride(i) > 0 or [-1, shape(i) - 1] if stride(i) < 0.

    endMask

    Integer value analogous to beginMask, but for specifying the end offset of the slice.

    ellipsisMask

    Integer value representing a bitmask where bit i being 1 means that the ith position is actually an ellipsis. At most one bit can be 1. If ellipsisMask == 0, then an implicit ellipsis mask with value 1 << (m + 1) is provided. This means that foo(3 :: 5) == foo(3 :: 5, ---). An ellipsis implicitly creates as many range specifications as necessary to fully specify the sliced range for every dimension. For example, for a 4-dimensional tensor foo the slice foo(2, ---, 5 :: 8) implies foo(2, ::, ::, 5 :: 8).

    newAxisMask

    Integer value representing a bitmask where bit i being 1 means that the ith range specification creates a new dimension with size 1. For example, foo(0 :: 4, NewAxis, 0 :: 2) will produce a tensor with shape [4, 1, 2].

    shrinkAxisMask

    Integer value representing a bitmask where bit i being 1 means that the ith range specification should shrink the dimensionality. begin and end must imply a slice of size 1 in the dimension. For example, in foo(0 :: 4, 3, 0 :: 2) would result in a tensor with shape [4, 2].

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  68. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  69. def tile(input: Output, multiples: Output, name: String = "Tile"): Output

    Permalink

    $OpDocBasicTile

    $OpDocBasicTile

    input

    Tensor to tile.

    multiples

    One-dimensional tensor containing the tiling multiples. Its length must be the same as the rank of input.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  70. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  71. def transpose(input: Output, permutation: Output = null, conjugate: Boolean = false, name: String = "Transpose"): Output

    Permalink

    $OpDocBasicTranspose

    $OpDocBasicTranspose

    input

    Input tensor to transpose.

    permutation

    Permutation of the input tensor dimensions.

    conjugate

    If true, then the complex conjugate of the transpose result is returned.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  72. def unique(input: Output, axis: Output, indicesDataType: types.DataType = INT32, name: String = "Unique"): (Output, Output)

    Permalink

    $OpDocBasicUnique

    $OpDocBasicUnique

    input

    Input tensor.

    axis

    Axis along which to compute the unique values.

    indicesDataType

    Data type of the returned indices. Must be INT32 or INT64.

    name

    Name for the created op.

    returns

    Tuple containing output and indices.

    Definition Classes
    Basic
  73. def uniqueWithCounts(input: Output, axis: Output = 0, indicesDataType: types.DataType = INT32, name: String = "UniqueWithCounts"): (Output, Output, Output)

    Permalink

    $OpDocBasicUniqueWithCounts

    $OpDocBasicUniqueWithCounts

    input

    Input tensor.

    axis

    Axis along which to count the unique elements.

    indicesDataType

    Data type of the returned indices. Must be INT32 or INT64.

    name

    Name for the created op.

    returns

    Tuple containing output, indices, and counts.

    Definition Classes
    Basic
  74. def unstack(input: Output, number: Int = 1, axis: Int = 0, name: String = "Unstack"): Seq[Output]

    Permalink

    $OpDocBasicUnstack

    $OpDocBasicUnstack

    input

    Rank R > 0 Tensor to be unstacked.

    number

    Number of tensors to unstack. If set to -1 (the default value), its value will be inferred.

    axis

    Dimension along which to unstack the input tensor.

    name

    Name for the created op.

    returns

    Created op outputs.

    Definition Classes
    Basic
    Annotations
    @throws( ... ) @throws( ... )
    Exceptions thrown

    IllegalArgumentException If number is not specified and its value cannot be inferred.

    IndexOutOfBoundsException If axis is not within the range [-R, R).

  75. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. def where(input: Output, name: String = "Where"): Output

    Permalink

    $OpDocBasicWhere

    $OpDocBasicWhere

    input

    Input boolean tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  79. def zeros(dataType: types.DataType, shape: Output, name: String = "Zeros"): Output

    Permalink

    $OpDocBasicZeros

    $OpDocBasicZeros

    dataType

    Tensor data type.

    shape

    Tensor shape.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic
  80. def zerosLike(input: Output, dataType: types.DataType = null, optimize: Boolean = true, name: String = "ZerosLike"): Output

    Permalink

    $OpDocBasicZerosLike

    $OpDocBasicZerosLike

    input

    Input tensor.

    dataType

    Data type of the output tensor.

    optimize

    Boolean flag indicating whether to optimize this op if the shape of input is known at graph creation time.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    Basic

Inherited from Basic

Inherited from AnyRef

Inherited from Any

BasicOps

Ungrouped