Multiple refactors
Compare changes
This MR addresses several design issues:
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
...).
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.
initGrad()
, which is easily forgettable and use lazy initialization (with zeros initialization).
Copyright © Eclipse Foundation, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Copyright Agent