Sha256: f6113d81cccca035cc3a2d6e62ba5584a2e8fdb089674a41f5aff2c956627c1c
Contents?: true
Size: 570 Bytes
Versions: 9
Compression:
Stored size: 570 Bytes
Contents
module TensorStream module CheckOps def self.included(klass) klass.class_eval do register_op :assert_equal do |context, tensor, inputs| result = call_vector_op(tensor, :equal, inputs[0], inputs[1], context) { |t, u| t == u } result = result.is_a?(Array) ? result.flatten.uniq : [result] prefix = tensor.options[:message] || "" raise TensorStream::InvalidArgumentError, "#{prefix} #{tensor.inputs[0].name} != #{tensor.inputs[1].name}" if result != [true] nil end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems