Object

org.platanios.tensorflow.api.ops

NN

Related Doc: package ops

Permalink

object NN extends NN

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

Type Members

  1. sealed trait CNNDataFormat extends AnyRef

    Permalink
    Definition Classes
    NN
  2. sealed trait ConvPaddingMode extends AnyRef

    Permalink

    Padding mode.

  3. case class NNOps(output: Output) extends Product with Serializable

    Permalink

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 CNNDataFormat

    Permalink
    Definition Classes
    NN
  5. object ConvPaddingMode

    Permalink
  6. object NCWFormat extends CNNDataFormat with Product with Serializable

    Permalink
    Definition Classes
    NN
  7. object NWCFormat extends CNNDataFormat with Product with Serializable

    Permalink
    Definition Classes
    NN
  8. object SameConvPadding extends ConvPaddingMode with Product with Serializable

    Permalink
    Definition Classes
    NN
  9. object ValidConvPadding extends ConvPaddingMode with Product with Serializable

    Permalink
    Definition Classes
    NN
  10. def addBias(value: Output, bias: Output, cNNDataFormat: CNNDataFormat = CNNDataFormat.default, name: String = "AddBias"): Output

    Permalink

    $OpDocNNAddBias

    $OpDocNNAddBias

    value

    Value tensor.

    bias

    Bias tensor that must be one-dimensional (i.e., it must have rank 1).

    cNNDataFormat

    Data format of the input and output tensors. With the default format NWCFormat, the bias tensor will be added to the last dimension of the value tensor. Alternatively, the format could be NCWFormat, and the bias tensor would be added to the third-to-last dimension.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def batchNormalization(x: Output, mean: Output, variance: Output, offset: Option[Output] = None, scale: Option[Output] = None, epsilon: Output, name: String = "BatchNormalization"): Output

    Permalink

    $OpDocNNBatchNormalization

    $OpDocNNBatchNormalization

    x

    Input tensor of arbitrary dimensionality.

    mean

    Mean tensor.

    variance

    Variance tensor.

    offset

    Optional offset tensor, often denoted beta in equations.

    scale

    Optional scale tensor, often denoted gamma in equations.

    epsilon

    Small floating point number added to the variance to avoid division by zero.

    name

    Name for the created ops.

    returns

    Batch-normalized tensor x.

    Definition Classes
    NN
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def conv2D(input: Output, filter: Output, stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, dilations: (Int, Int, Int, Int) = (1, 1, 1, 1), useCuDNNOnGPU: Boolean = true, name: String = "Conv2D"): Output

    Permalink

    $OpDocNNConv2D

    $OpDocNNConv2D

    input

    4-D tensor whose dimension order is interpreted according to the value of dataFormat.

    filter

    4-D tensor with shape [filterHeight, filterWidth, inChannels, outChannels].

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    dilations

    The dilation factor for each dimension of input. If set to k > 1, there will be k - 1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of dataFormat. Dilations in the batch and depth dimensions must be set to 1.

    useCuDNNOnGPU

    Boolean value indicating whether or not to use CuDNN for the created op, if its placed on a GPU, as opposed to the TensorFlow implementation.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  15. def conv2DBackpropFilter(input: Output, filterSizes: Output, outputGradient: Output, stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, dilations: (Int, Int, Int, Int) = (1, 1, 1, 1), useCuDNNOnGPU: Boolean = true, name: String = "Conv2DBackpropFilter"): Output

    Permalink

    $OpDocNNConv2DBackpropFilter

    $OpDocNNConv2DBackpropFilter

    input

    4-D tensor whose dimension order is interpreted according to the value of dataFormat.

    filterSizes

    Integer vector representing the shape of the original filter, which is a 4-D tensor.

    outputGradient

    4-D tensor containing the gradients w.r.t. the output of the convolution and whose shape depends on the value of dataFormat.

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    dilations

    The dilation factor for each dimension of input. If set to k > 1, there will be k - 1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of dataFormat. Dilations in the batch and depth dimensions must be set to 1.

    useCuDNNOnGPU

    Boolean value indicating whether or not to use CuDNN for the created op, if its placed on a GPU, as opposed to the TensorFlow implementation.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  16. def conv2DBackpropInput(inputSizes: Output, filter: Output, outputGradient: Output, stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, dilations: (Int, Int, Int, Int) = (1, 1, 1, 1), useCuDNNOnGPU: Boolean = true, name: String = "Conv2DBackpropInput"): Output

    Permalink

    $OpDocNNConv2DBackpropInput

    $OpDocNNConv2DBackpropInput

    inputSizes

    Integer vector representing the shape of the original input, which is a 4-D tensor.

    filter

    4-D tensor with shape [filterHeight, filterWidth, inChannels, outChannels].

    outputGradient

    4-D tensor containing the gradients w.r.t. the output of the convolution and whose shape depends on the value of dataFormat.

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    dilations

    The dilation factor for each dimension of input. If set to k > 1, there will be k - 1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of dataFormat. Dilations in the batch and depth dimensions must be set to 1.

    useCuDNNOnGPU

    Boolean value indicating whether or not to use CuDNN for the created op, if its placed on a GPU, as opposed to the TensorFlow implementation.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  17. def crelu(input: Output, axis: Output = 1, name: String = "CReLU"): Output

    Permalink

    $OpDocNNCrelu

    $OpDocNNCrelu

    input

    Input tensor.

    axis

    Along along which the output values are concatenated along.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  18. def dropout(input: Output, keepProbability: Float, scaleOutput: Boolean = true, noiseShape: Output = null, seed: Option[Int] = None, name: String = "Dropout"): Output

    Permalink

    $OpDocNNDropout

    $OpDocNNDropout

    input

    Input tensor.

    keepProbability

    Probability (i.e., number in the interval (0, 1]) that each element is kept.

    scaleOutput

    If true, the outputs will be divided by the keep probability.

    noiseShape

    INT32 rank-1 tensor representing the shape for the randomly generated keep/drop flags.

    seed

    Optional random seed, used to generate a random seed pair for the random number generator, when combined with the graph-level seed.

    name

    Name for the created op.

    returns

    Created op output that has the same shape as input.

    Definition Classes
    NN
  19. def dynamicDropout(input: Output, keepProbability: Output, scaleOutput: Boolean = true, noiseShape: Output = null, seed: Option[Int] = None, name: String = "Dropout"): Output

    Permalink

    $OpDocNNDropout

    $OpDocNNDropout

    input

    Input tensor.

    keepProbability

    Probability (i.e., scalar in the interval (0, 1]) that each element is kept.

    scaleOutput

    If true, the outputs will be divided by the keep probability.

    noiseShape

    INT32 rank-1 tensor representing the shape for the randomly generated keep/drop flags.

    seed

    Optional random seed, used to generate a random seed pair for the random number generator, when combined with the graph-level seed.

    name

    Name for the created op.

    returns

    Created op output that has the same shape as input.

    Definition Classes
    NN
  20. def elu[T](x: T, name: String = "ELU")(implicit arg0: OutputOps[T]): T

    Permalink

    $OpDocNNElu

    $OpDocNNElu

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  21. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def fusedBatchNormalization(x: Output, scale: Output, offset: Output, mean: Option[Output] = None, variance: Option[Output] = None, epsilon: Float = 0.001f, dataFormat: CNNDataFormat = NWCFormat, isTraining: Boolean = true, name: String = "FusedBatchNormalization"): (Output, Output, Output)

    Permalink

    $OpDocNNFusedBatchNormalization

    $OpDocNNFusedBatchNormalization

    x

    Input tensor with 4 dimensions.

    scale

    Vector used for scaling.

    offset

    Vector used as an added offset.

    mean

    Optional population mean vector, used for inference only.

    variance

    Optional population variance vector, used for inference only.

    epsilon

    Small floating point number added to the variance to avoid division by zero.

    dataFormat

    Data format for x.

    isTraining

    Boolean value indicating whether the operation is used for training or inference.

    name

    Name for the created ops.

    returns

    Batch normalized tensor x, along with the a batch mean vector, and a batch variance vector.

    Definition Classes
    NN
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  27. def inTopK(predictions: Output, targets: Output, k: Output, name: String = "InTopK"): Output

    Permalink

    $OpDocNNInTopK

    $OpDocNNInTopK

    predictions

    FLOAT32 tensor containing the predictions.

    targets

    INT32 or INT64 tensor containing the targets.

    k

    Scalar INT32 or INT64 tensor containing the number of top elements to look at.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. def l2Loss(input: Output, name: String = "L2Loss"): Output

    Permalink

    $OpDocNNL2Loss

    $OpDocNNL2Loss

    input

    FLOAT16, FLOAT32, or FLOAT64 input tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  30. def l2Normalize(x: Output, axes: Output, epsilon: Float = 1e-12f, name: String = "L2Normalize"): Output

    Permalink

    $OpDocNNL2Normalize

    $OpDocNNL2Normalize

    x

    Input tensor.

    axes

    Tensor containing the axes along which to normalize.

    epsilon

    Lower bound value for the norm. The created op will use sqrt(epsilon) as the divisor, if norm < sqrt(epsilon).

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  31. def linear(x: Output, weights: Output, bias: Output = null, name: String = "Linear"): Output

    Permalink

    $OpDocNNLinear

    $OpDocNNLinear

    x

    Input tensor.

    weights

    Weights tensor.

    bias

    Bias tensor.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  32. def localResponseNormalization(input: Output, depthRadius: Int = 5, bias: Float = 1.0f, alpha: Float = 1.0f, beta: Float = 0.5f, name: String = "LocalResponseNormalization"): Output

    Permalink

    $OpDocNNLocalResponseNormalization

    $OpDocNNLocalResponseNormalization

    input

    Input tensor with data type FLOAT16, BFLOAT16, or FLOAT32.

    depthRadius

    Half-width of the 1-D normalization window.

    bias

    Offset (usually positive to avoid dividing by 0).

    alpha

    Scale factor (usually positive).

    beta

    Exponent.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  33. def logPoissonLoss(logPredictions: Output, targets: Output, computeFullLoss: Boolean = false, name: String = "LogPoissonLoss"): Output

    Permalink

    $OpDocNNLogPoissonLoss

    $OpDocNNLogPoissonLoss

    logPredictions

    Tensor containing the log-predictions.

    targets

    Tensor with the same shape as logPredictions, containing the target values.

    computeFullLoss

    If true, Stirling's Approximation is used to approximate the full loss. Defaults to false, meaning that the constant term is ignored.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  34. def logSoftmax(logits: Output, axis: Int = 1, name: String = "LogSoftmax"): Output

    Permalink

    $OpDocNNLogSoftmax

    $OpDocNNLogSoftmax

    logits

    Tensor containing the logits with data type FLOAT16, FLOAT32, or FLOAT64.

    axis

    Axis along which to perform the log-softmax. Defaults to -1 denoting the last axis.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  35. def lrn(input: Output, depthRadius: Int = 5, bias: Float = 1.0f, alpha: Float = 1.0f, beta: Float = 0.5f, name: String = "LRN"): Output

    Permalink

    $OpDocNNLocalResponseNormalization

    $OpDocNNLocalResponseNormalization

    input

    Input tensor with data type FLOAT16, BFLOAT16, or FLOAT32.

    depthRadius

    Half-width of the 1-D normalization window.

    bias

    Offset (usually positive to avoid dividing by 0).

    alpha

    Scale factor (usually positive).

    beta

    Exponent.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  36. def maxPool(input: Output, windowSize: Seq[Long], stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, name: String = "MaxPool"): Output

    Permalink

    $OpDocNNMaxPool

    $OpDocNNMaxPool

    input

    4-D tensor whose dimension order is interpreted according to the value of dataFormat.

    windowSize

    The size of the pooling window for each dimension of the input tensor.

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  37. def maxPoolGrad(originalInput: Output, originalOutput: Output, outputGradient: Output, windowSize: Seq[Long], stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, name: String = "MaxPoolGrad"): Output

    Permalink

    $OpDocNNMaxPoolGrad

    $OpDocNNMaxPoolGrad

    originalInput

    Original input tensor.

    originalOutput

    Original output tensor.

    outputGradient

    4-D tensor containing the gradients w.r.t. the output of the max pooling and whose shape depends on the value of dataFormat.

    windowSize

    The size of the pooling window for each dimension of the input tensor.

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  38. def maxPoolGradGrad(originalInput: Output, originalOutput: Output, outputGradient: Output, windowSize: Seq[Long], stride1: Long, stride2: Long, padding: ConvPaddingMode, dataFormat: CNNDataFormat = CNNDataFormat.default, name: String = "MaxPoolGradGrad"): Output

    Permalink

    $OpDocNNMaxPoolGradGrad

    $OpDocNNMaxPoolGradGrad

    originalInput

    Original input tensor.

    originalOutput

    Original output tensor.

    outputGradient

    4-D tensor containing the gradients w.r.t. the output of the max pooling and whose shape depends on the value of dataFormat.

    windowSize

    The size of the pooling window for each dimension of the input tensor.

    stride1

    Stride of the sliding window along the second dimension of input.

    stride2

    Stride of the sliding window along the third dimension of input.

    padding

    Padding mode to use.

    dataFormat

    Format of the input and output data.

    name

    Name for the created op.

    returns

    Created op output, which is a 4-D tensor whose dimension order depends on the value of dataFormat.

    Definition Classes
    NN
  39. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  42. def relu(input: Output, alpha: Float = 0.0f, name: String = "ReLU"): Output

    Permalink

    $OpDocNNRelu

    $OpDocNNRelu

    input

    Input tensor.

    alpha

    Slope of the negative section, also known as leakage parameter. If other than 0.0f, the negative part will be equal to alpha * x instead of 0. Defaults to 0.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  43. def relu6[T](x: T, name: String = "ReLU6")(implicit arg0: OutputOps[T]): T

    Permalink

    $OpDocNNRelu6

    $OpDocNNRelu6

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  44. def selu[T](x: T, name: String = "SELU")(implicit arg0: OutputOps[T]): T

    Permalink

    $OpDocNNSelu

    $OpDocNNSelu

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  45. def sequenceLoss(logits: Output, labels: Output, weights: Output = null, averageAcrossTimeSteps: Boolean = true, averageAcrossBatch: Boolean = true, lossFn: (Output, Output) ⇒ Output = sparseSoftmaxCrossEntropy(_, _), name: String = "SequenceLoss"): Output

    Permalink

    $OpDocNNSequenceLoss

    $OpDocNNSequenceLoss

    logits

    Tensor of shape [batchSize, sequenceLength, numClasses] containing unscaled log probabilities.

    labels

    Tensor of shape [batchSize, sequenceLength] containing the true label at each time step.

    weights

    Optionally, a tensor of shape [batchSize, sequenceLength] containing weights to use for each prediction. When using weights as masking, set all valid time steps to 1 and all padded time steps to 0 (e.g., a mask returned by tf.sequenceMask).

    averageAcrossTimeSteps

    If true, the loss is summed across the sequence dimension and divided by the total label weight across all time steps.

    averageAcrossBatch

    If true, the loss is summed across the batch dimension and divided by the batch size.

    lossFn

    Loss function to use that takes the predicted logits and the true labels as inputs and returns the loss value. Defaults to sparseSoftmaxCrossEntropy.

    name

    Name prefix to use for the created ops.

    returns

    Created op output.

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

    InvalidShapeException If any of logits, labels, or weights has invalid shape.

  46. def sigmoidCrossEntropy(logits: Output, labels: Output, weights: Output = null, name: String = "SigmoidCrossEntropy"): Output

    Permalink

    $OpDocNNSigmoidCrossEntropy

    $OpDocNNSigmoidCrossEntropy

    logits

    Tensor of shape [D0, D1, ..., Dr-1, numClasses] and data type FLOAT16, FLOAT32, or FLOAT64, containing unscaled log probabilities.

    labels

    Tensor of shape [D0, D1, ..., Dr-1, numClasses] and data type FLOAT16, FLOAT32, or FLOAT64, where each row must be a valid probability distribution.

    weights

    Optionally, a coefficient to use for the positive examples.

    name

    Name for the created op.

    returns

    Created op output, with rank one less than that of logits and the same data type as logits, containing the sigmoid cross entropy loss.

    Definition Classes
    NN
  47. def softmax(logits: Output, axis: Int = 1, name: String = "Softmax"): Output

    Permalink

    $OpDocNNSoftmax

    $OpDocNNSoftmax

    logits

    Tensor containing the logits with data type FLOAT16, FLOAT32, or FLOAT64.

    axis

    Axis along which to perform the softmax. Defaults to -1 denoting the last axis.

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  48. def softmaxCrossEntropy(logits: Output, labels: Output, axis: Int = 1, name: String = "SoftmaxCrossEntropy"): Output

    Permalink

    $OpDocNNSoftmaxCrossEntropy

    $OpDocNNSoftmaxCrossEntropy

    logits

    Tensor of shape [D0, D1, ..., Dr-1, numClasses] and data type FLOAT16, FLOAT32, or FLOAT64, containing unscaled log probabilities.

    labels

    Tensor of shape [D0, D1, ..., Dr-1, numClasses] and data type FLOAT16, FLOAT32, or FLOAT64, where each row must be a valid probability distribution.

    axis

    The class axis, along which the softmax is computed. Defaults to -1, which is the last axis.

    name

    Name for the created op.

    returns

    Created op output, with rank one less than that of logits and the same data type as logits, containing the softmax cross entropy loss.

    Definition Classes
    NN
  49. def softplus[T](x: T, name: String = "Softplus")(implicit arg0: OutputOps[T]): T

    Permalink

    $OpDocNNSoftplus

    $OpDocNNSoftplus

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  50. def softsign[T](x: T, name: String = "Softsign")(implicit arg0: OutputOps[T]): T

    Permalink

    $OpDocNNSoftsign

    $OpDocNNSoftsign

    name

    Name for the created op.

    returns

    Created op output.

    Definition Classes
    NN
  51. def sparseSoftmaxCrossEntropy(logits: Output, labels: Output, axis: Int = 1, name: String = "SparseSoftmaxCrossEntropy"): Output

    Permalink

    $OpDocNNSparseSoftmaxCrossEntropy

    $OpDocNNSparseSoftmaxCrossEntropy

    logits

    Tensor of shape [D0, D1, ..., Dr-1, numClasses] (where r is the rank of labels and of the result) and data type FLOAT16, FLOAT32, or FLOAT64, containing unscaled log probabilities.

    labels

    Tensor of shape [D0, D1, ..., Dr-1] (where r is the rank of labels and of the result) and data type INT32 or INT64. Each entry in labels must be an index in [0, numClasses). Other values will raise an exception when this op is run on a CPU, and return NaN values for the corresponding loss and gradient rows when this op is run on a GPU.

    axis

    The class axis, along which the softmax is computed. Defaults to -1, which is the last axis.

    name

    Name for the created op.

    returns

    Created op output, with the same shape as labels and the same data type as logits, containing the softmax cross entropy loss.

    Definition Classes
    NN
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. def topK(input: Output, k: Output = 1, sorted: Boolean = true, name: String = "TopK"): (Output, Output)

    Permalink

    $OpDocNNTopK

    $OpDocNNTopK

    input

    Input tensor whose last axis has size at least k.

    k

    Scalar INT32 tensor containing the number of top elements to look for along the last axis of input.

    sorted

    If true, the resulting k elements will be sorted by their values in descending order.

    name

    Name for the created op.

    returns

    Tuple containing the created op outputs: (i) values: the k largest elements along each last dimensional slice, and (ii) indices: the indices of values within the last axis of input.

    Definition Classes
    NN
  55. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from NN

Inherited from AnyRef

Inherited from Any

NNOps

Ungrouped