You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the four Binary Operators:- Add,Sub,Mul,Div added with the corresponding unit tests and Multi-directional broadcasting functionality is added for SOFIE
throwstd::runtime_error(std::string("TMVA SOFIE Binary Op does not support input tensors with different lengths. The output tensor should also have the same length as the input tensors."));
// Check if input1_shape.size() < input2_shape.size() we insert in the shape vector values of 1 at the beginning of the tensor until input1_shape.size() == input2_shape.size()
147
+
auto it = input1_shape.begin();
148
+
while (input1_shape.size() < input2_shape.size()) {
// Check if input2_shape.size() < input1_shape.size() we insert in the shape vector values of 1 at the beginning of the tensor until input1_shape.size() == input2_shape.size()
154
+
auto it = input2_shape.begin();
155
+
while (input2_shape.size() < input1_shape.size()) {
156
+
it = input2_shape.insert(it, 1);
157
+
}
158
+
}
159
+
//check if both the input have same shape, nothing to do directly return the output_shape as the same shape.
160
+
if(input1_shape.size() == input2_shape.size()){
161
+
if(input1_shape != input2_shape){
162
+
//Check the shape values, if input1[i] not equal to input2[i] we have the result shape equal to input1[i] if input2[i] = 1 or viceversa
0 commit comments