Class: Kumi::IR::DF::Ops::AxisBroadcast
- Inherits:
-
Node
- Object
- Base::Instruction
- Node
- Kumi::IR::DF::Ops::AxisBroadcast
- Defined in:
- lib/kumi/ir/df/ops/axis_broadcast.rb
Instance Attribute Summary
Attributes inherited from Base::Instruction
#attributes, #axes, #dtype, #effects, #inputs, #metadata, #opcode, #result
Instance Method Summary collapse
- #from_axes ⇒ Object
-
#initialize(value:, from_axes:, to_axes:, **kwargs) ⇒ AxisBroadcast
constructor
A new instance of AxisBroadcast.
- #to_axes ⇒ Object
- #value ⇒ Object
Methods inherited from Node
Methods inherited from Base::Instruction
#control_effect?, #defs, #effectful?, #io_effect?, #memory_effect?, #normalized_attributes, #printer_attributes, #printer_axes, #printer_dtype, #produces?, #stamp, #state_effect?, #to_h, #to_print_string, #uses, #validate!, #value_signature, #with_metadata
Constructor Details
#initialize(value:, from_axes:, to_axes:, **kwargs) ⇒ AxisBroadcast
Returns a new instance of AxisBroadcast.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kumi/ir/df/ops/axis_broadcast.rb', line 10 def initialize(value:, from_axes:, to_axes:, **kwargs) super( inputs: [value], attributes: { from_axes: Array(from_axes).map(&:to_sym), to_axes: Array(to_axes).map(&:to_sym) }, **kwargs ) end |
Instance Method Details
#from_axes ⇒ Object
22 |
# File 'lib/kumi/ir/df/ops/axis_broadcast.rb', line 22 def from_axes = attributes[:from_axes] |
#to_axes ⇒ Object
23 |
# File 'lib/kumi/ir/df/ops/axis_broadcast.rb', line 23 def to_axes = attributes[:to_axes] |
#value ⇒ Object
21 |
# File 'lib/kumi/ir/df/ops/axis_broadcast.rb', line 21 def value = inputs.first |