Multiple refactors
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 (likeSlice
,Split
,Reshape
...).-
Fix #76 (closed).
-
-
Add a generic and consistant mechanism to handle optional inputs. -
Fix #126 (closed).
-
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.
-
Add 1D Conv and Pad implementations. -
Fix aidge#131
-
-
Remove initGrad()
, which is easily forgettable and use lazy initialization (with zeros initialization).