Skip to content

Multiple refactors

Olivier BICHLER requested to merge nobias into dev

This MR addresses several design issues:

  • Remove NoBias attribute from Conv and FC, as it is better replaced by an input check, as for other operators with optional inputs (like Slice, Split, Reshape...).

  • Add a generic and consistant mechanism to handle optional inputs.

I propose to replace the nbData and nbParam members of an Operator with a list of input category that can be one of the following:

enum class InputCategory {
    Data,
    Param,
    OptionalData,
    OptionalParam
};

This would add more flexibility and more clarity in the specification of the operator/node inputs. The input category would not have to follow a specific order.

The call to the OperatorTensor constructor would change, for the convolution, from:

OperatorTensor(Type, 1, 2, 1)

to

OperatorTensor(Type, {Data, Param, OptionalParam}, 1)

Note: I used input "category" instead of "type" to avoid confusion with operator type and data type.

Edited by Olivier BICHLER

Merge request reports