Vit operators
- Added Erf, Concat, Gather, ReduceMean, Reshape, Slice and transpose operators and their python bindings
- Modified Softmax operator by adding axis attribute to support import from ONNX
- Added RemoveDropout Recipe to remove dropout nodes from graphs
Merge request reports
Activity
assigned to @hrouis
added AddFeature LanguageC++ labels
added StatusWIP label
changed milestone to %v0.1.0
added 14 commits
-
44740599...80e80a4d - 13 commits from branch
eclipse/aidge:main
- 28aaf31f - Merge branch aidge_core:main into vit_operators
-
44740599...80e80a4d - 13 commits from branch
added 2 commits
added 10 commits
-
e244efba...3182ea4a - 9 commits from branch
eclipse/aidge:main
- 5052290b - Merge branch aidge_core:main into vit_operators
-
e244efba...3182ea4a - 9 commits from branch
mentioned in epic &2
added 8 commits
-
02fdf34a...3cd94d47 - 7 commits from branch
eclipse/aidge:main
- f0acf0de - Merge branch aidge_core:main into vit_operators
-
02fdf34a...3cd94d47 - 7 commits from branch
mentioned in merge request !46 (merged)
requested review from @pineapple
The introduction of
OperatorTensor
class !46 (merged) in the hierarchy has highly changed operators creation. I will try to update your MR accordingly.
20 20 def tearDown(self): 21 21 pass 22 22 23 def test_remove_dropout(self): 24 graph_view = aidge_core.sequential([ 25 aidge_core.GenericOperator("Conv", 1, 1, 1, "Conv0"); 26 aidge_core.GenericOperator("Dropout", 1, 1, 1, name="Dropout0") - Comment on lines +25 to +26
GenericOperator
constructor was changed from "nbDataIn, nbIn, nbOut" to "nbData, nbParam, nbOutput" for more clarity.Edited by Maxence Naud changed this line in version 17 of the diff
- include/aidge/operator/Slice.hpp 0 → 100644
66 return std::make_shared<Slice_Op>(*this); 67 } 68 69 void associateInput(const IOIndex_t inputIdx, std::shared_ptr<Data> data) override final { 70 assert(inputIdx < 4 && "Slice operator supports only 4 inputs"); 71 assert(strcmp(data->type(), Tensor::Type)==0 && "input data must be of Tensor type"); 72 mInputs[inputIdx] = std::dynamic_pointer_cast<Tensor>(data); 73 } 74 75 void computeOutputDims() override final { 76 if (!mInputs[0]->empty() && !mInputs[1]->empty() && !mInputs[2]->empty()&& !mInputs[3]->empty()) 77 { 78 DimSize_t nbAxes = mInputs[1]->dims()[0]; 79 const int* axes = static_cast<const int*>(mInputs[1]->getImpl()->rawPtr()); 80 const int* starts = static_cast<const int*>(mInputs[2]->getImpl()->rawPtr()); 81 const int* ends = static_cast<const int*>(mInputs[3]->getImpl()->rawPtr()); A solution is to make these parameters attributes of the sliceOp. Attribute declaration example : https://gitlab.eclipse.org/eclipse/aidge/aidge_core/-/blob/main/include/aidge/operator/Conv.hpp?ref_type=heads#L35-36
You can get the inputs nodes via the input_nodes parameter in order to retrieve those values. This may not work if the slice use non constant values...
For example for the conv op, we check the dims of the weights to get the out channel values. https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx/-/blob/master/aidge_onnx/node_import/onnx_converters/conv.py?ref_type=heads#L84
changed this line in version 11 of the diff