Sha256: 7a9a60957bb5436fc642c7c9e4f6a5deaea76dc0a626622a4ae0f18e13572a03

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 Bytes

Contents

TensorStream::OpMaker.define_operation :less do |op|
  op.what_it_does "Returns the truth value of (x < y) element-wise."

  op.parameter :input_a, "tensor X"
  op.parameter :input_b, "tensor Y"

  op.apply_data_type_coercion!
  op.supports_broadcasting!

  op.option :name, "Optional name", :nil

  op.define_gradient do |grad, node, _params|
    _min_or_max_grad(node.inputs, grad, ->(a, b) { ts.less(a, b) })
  end

  op.define_data_type do
    :boolean
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tensor_stream-1.0.9 lib/tensor_stream/ops/less.rb
tensor_stream-1.0.8 lib/tensor_stream/ops/less.rb
tensor_stream-1.0.7 lib/tensor_stream/ops/less.rb
tensor_stream-1.0.6 lib/tensor_stream/ops/less.rb