Commits on Source (5)
-
Michal Szczepanski authored6a2e2fb5
-
Maxence Naud authored
fix tensorImpl See merge request !160
8119458c -
Define a Tensor with undefined dims by explicitly setting mSize to 0. Provide undefined() method which must be used instead of empty() to test whether a Tensor as associated dimensions and can be used for forwarding dimensions downward. This disambiguates from defined scalar Tensor which actually have empty dimensions, but size of 1. Note that as soon as a Tensor with undefined dimensions is resized, it's dimensions are permanently defined (though may still change). This change solves issues in operators forwardDims() when input values are scalar, i.e. !undefined() and empty().
cb0748a7 -
Activate previously commented tests on scalars for elementwise operators: Test_[Div|Mul|Sub|Pow]_Op.cpp. Add scalar test for Test_MatMul_Op.cpp. Add negative scalar tests for Test_[Concat|Transpose]Impl.cpp. Update implementations forward/forwardDims of operators Concat|Transpose|MatMul to assert on unexpected scalar inputs.
845af882 -
Maxence Naud authored
[Tensor] Disambiguate undefined Tensor dimensions from Scalar Tensor See merge request !162
b9f2c952
Showing
- include/aidge/backend/cpu/data/TensorImpl.hpp 6 additions, 2 deletionsinclude/aidge/backend/cpu/data/TensorImpl.hpp
- include/aidge/data/Tensor.hpp 25 additions, 8 deletionsinclude/aidge/data/Tensor.hpp
- include/aidge/operator/Identity.hpp 1 addition, 1 deletioninclude/aidge/operator/Identity.hpp
- python_binding/data/pybind_Tensor.cpp 1 addition, 0 deletionspython_binding/data/pybind_Tensor.cpp
- src/backend/OperatorImpl.cpp 3 additions, 3 deletionssrc/backend/OperatorImpl.cpp
- src/data/Tensor.cpp 2 additions, 3 deletionssrc/data/Tensor.cpp
- src/graph/GraphView.cpp 4 additions, 4 deletionssrc/graph/GraphView.cpp
- src/operator/Concat.cpp 1 addition, 7 deletionssrc/operator/Concat.cpp
- src/operator/Gather.cpp 1 addition, 1 deletionsrc/operator/Gather.cpp
- src/operator/MatMul.cpp 3 additions, 0 deletionssrc/operator/MatMul.cpp
- src/operator/Memorize.cpp 3 additions, 3 deletionssrc/operator/Memorize.cpp
- src/operator/OperatorTensor.cpp 3 additions, 3 deletionssrc/operator/OperatorTensor.cpp
- src/operator/Reshape.cpp 1 addition, 1 deletionsrc/operator/Reshape.cpp
- src/operator/Resize.cpp 7 additions, 7 deletionssrc/operator/Resize.cpp
- src/operator/Slice.cpp 4 additions, 4 deletionssrc/operator/Slice.cpp
- src/operator/Split.cpp 1 addition, 1 deletionsrc/operator/Split.cpp
- src/operator/Transpose.cpp 1 addition, 0 deletionssrc/operator/Transpose.cpp
- unit_tests/data/Test_Tensor.cpp 1 addition, 1 deletionunit_tests/data/Test_Tensor.cpp
- unit_tests/operator/Test_ConcatImpl.cpp 9 additions, 1 deletionunit_tests/operator/Test_ConcatImpl.cpp
- unit_tests/operator/Test_Div_Op.cpp 48 additions, 48 deletionsunit_tests/operator/Test_Div_Op.cpp