Skip to content

Remove Operator reference to Tensor

Maxence Naud requested to merge OperatorTensor into main

Operators needed a rework of their structure as they are more and more related to Tensor rather than Data as they intend to be. This refactor was the right opportunity to also clean Operators with proper error messages, more casses handled, uniformized attributes and functions.

  • Change nbInputs()/nbDataInputs()/nbOutputs() to nbInputs()/nbData()/nbAttr()/nbOutputs()
  • Uniformize DataType name
  • Remove unused setInput() function in Node.hpp
  • #50 (closed) Add a new layer in operators hierarchy based on the type of data operators handle
    • Add an enum in OperatorTensor to check the type. Some Node and GraphView functions can depend on it
    • Gather operators common functions in Operatortensor
    • Uniformize mInputs/mOutputs member attributes in two vectors of shared_ptr
classDiagram
    class Other["..."]
    Operator <|-- OperatorTensor
    Operator <|-- OperatorStream
    Operator <|-- OperatorEvent
    OperatorTensor <|-- Conv
    OperatorTensor <|-- FC
    OperatorTensor <|-- Other
  • [Uniformize] #43 (closed) set ConvDepthWise and FC parameter sizes at initialization.

  • [Add] #16 prototype for compile() function. (From the early merge with !20 (merged))

  • [Add] Concat and Slice operators. (From the early merge with !20 (merged))

    They should be compared and merged with those from !47 (merged) .

  • remove input()/output() member functions

    Both accessed their Tensors by reference. However, inputs are initialized with nullptr, thus dereferencing them before assignement use to throw an error. It was replaced by setInput()

  • #44 (closed) Add setOutput() function.

    The goal was to change the pointer to output without having to modify each children connections to input. Such shallow copy requires a pointer to pointer structure that has not been approved. Hence outpuuts can only be changed with deep copy for now.

Edited by Maxence Naud

Merge request reports

Loading