Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROperator_Pool.hxx
Go to the documentation of this file.
1#ifndef TMVA_SOFIE_ROPERATOR_POOL
2#define TMVA_SOFIE_ROPERATOR_POOL
3
5#include "TMVA/ROperator.hxx"
6#include "TMVA/RModel.hxx"
7
8#include <memory>
9#include <sstream>
10#include <algorithm>
11#include <stdexcept>
12#include <vector>
13#include <cassert>
14
15namespace TMVA {
16namespace Experimental {
17namespace SOFIE {
18
20 // structure that contains Pool attribute
21 std::string auto_pad = "NOTSET";
22 int ceil_mode = 0;
23 int count_include_pad = 0; // not for MaxPool
24 int storage_order = 0; // not for AveragePool
25 std::vector<size_t> dilations; // not for AveragePool
26 std::vector<size_t> kernel_shape;
27 std::vector<size_t> pads;
28 std::vector<size_t> strides;
29};
30
32
33template<typename T>
35{
36
37private:
38
40
44 std::string fAttrAutopad;
45 std::vector<size_t> fAttrDilations;
46 std::vector<size_t> fAttrKernelShape;
47 std::vector<size_t> fAttrPads;
48 std::vector<size_t> fAttrStrides;
49
50 std::string fNX;
51 std::string fNY;
52
53 std::vector<size_t> fShapeX;
54 std::vector<size_t> fShapeY;
55
56 std::string fType;
57
58 size_t fDim; // dimension of the MaxPool
59 bool fUseSession = false;
60
61public:
62
63 std::string Name() {
64 if (fPoolMode == AveragePool) return "AveragePool";
65 if (fPoolMode == MaxPool) return "MaxPool";
66 return "Invalid";
67 }
68
70
72 : fPoolMode(mode), fAttrCeilMode(attr.ceil_mode), fAttrCountIncludePad(attr.count_include_pad),
73 fAttrStorageOrder(attr.storage_order), fAttrAutopad(attr.auto_pad),
74 fAttrDilations(attr.dilations), fAttrKernelShape(attr.kernel_shape), fAttrPads(attr.pads), fAttrStrides(attr.strides),
75 fNX(UTILITY::Clean_name(nameX)), fNY(UTILITY::Clean_name(nameY))
76 {
77 if(std::is_same<T, float>::value) {
78 fType = "float";
79 } else {
80 throw
81 std::runtime_error("TMVA SOFIE Encountered unsupported type parsing a Pool operator");
82 }
85 }
86
87 // return input type (defined abstract in ROperator class )
88 std::vector<ETensorType> TypeInference(std::vector<ETensorType> input) override {
89 // only one input in Pool operators
90 return input;
91 }
92
93 // function returning output shape given input
94 std::vector<std::vector<size_t>> ShapeInference(std::vector<std::vector<size_t>> input) override {
95 // shape of pooling input has to be (according to ONNX): NxCxHxW
96 // Where N is batch size, C : input channels, H : input height, W = input width
97 // or it can be [N, C, F1,F2,....FN] . Minimum dimension is 3
98 if (input.size() != 1 ) {
99 throw std::runtime_error("TMVA SOFIE" + Name() + "Op Shape inference need 1 input tensor");
100 }
101 if (input[0].size() < 3) {
102 throw std::runtime_error("TMVA SOFIE" + Name() + "Op Shape inference only accept tensor with at least 3 dimensions");
103 }
104 // support only input tensors with dim = 3,4,5
105 if (input[0].size() < 3 || input[0].size() > 5) {
106 throw std::runtime_error("TMVA SOFIE" + Name() + "Op : tensors with dimension " + std::to_string(input[0].size()) + " are not yet supported");
107 }
108
109 if (input[0].size() -2 != fDim) {
110 throw
111 std::runtime_error("TMVA SOFIE Pool Op Shape inference - invalid inputs ");
112 }
113 // kernel shape
114 size_t k1 = ((fAttrKernelShape.empty())? input[0][2] : fAttrKernelShape[0]);
115 size_t k2 = (fDim > 1) ? ((fAttrKernelShape.empty()) ? input[0][3] : fAttrKernelShape[1]) : 1;
116 size_t k3 = (fDim > 2) ? ((fAttrKernelShape.empty()) ? input[0][4] : fAttrKernelShape[2]) : 1;
117
118
119 size_t i1 = (fDim > 1) ? ((fDim > 2) ? 3 : 2) : 1;
120 size_t i2 = (fDim > 2) ? 4 : 3;
121 size_t i3 = 5;
122
123 if (fAttrDilations.empty()) {
124 fAttrDilations = {1, 1, 1};
125 }
126 fAttrDilations.resize(3);
127 if (fDim < 3) {
128 fAttrDilations.resize(3, 1);
129 }
130 // Shape of the kernel
131 fAttrKernelShape = {k1 + (fAttrDilations[0] - 1) * (k1 - 1),
132 k2 + (fAttrDilations[1] - 1) * (k2 - 1),
133 k3 + (fAttrDilations[2] - 1) * (k3 - 1)};
134
135 if (fAttrStrides.empty()) {
136 fAttrStrides = {1, 1, 1};
137 }
138 if (fDim < 3)
139 fAttrStrides.resize(3, 1);
140
141 if (fAttrAutopad == "NOTSET") {
142 // in auto_pad is NOTSET then fAttrPads should have been set or default zero is used
143 if (fAttrPads.empty()) {
144 fAttrPads = {0, 0, 0, 0, 0, 0};
145 }
146 } else if (fAttrAutopad == "SAME_UPPER" || fAttrAutopad == "SAME_LOWER") {
147 // ONNX SAME padding: total_pad = max(0, (ceil(in/stride)-1)*stride + kernel - in)
148 // SAME_UPPER places extra padding at end, SAME_LOWER at beginning
149 fAttrPads.assign(6, 0);
150 for (size_t d = 0; d < fDim; ++d) {
151 size_t inSize = input[0][d + 2];
152 size_t stride_d = fAttrStrides[d];
153 size_t outSize = (inSize + stride_d - 1) / stride_d;
154 int totalPad = std::max(0, (int)((outSize - 1) * stride_d + fAttrKernelShape[d]) - (int)inSize);
155 if (fAttrAutopad == "SAME_UPPER") {
156 fAttrPads[d] = (size_t)(totalPad / 2);
157 fAttrPads[d + fDim] = (size_t)(totalPad - totalPad / 2);
158 } else {
159 fAttrPads[d] = (size_t)(totalPad - totalPad / 2);
160 fAttrPads[d + fDim] = (size_t)(totalPad / 2);
161 }
162 }
163 } else if (fAttrAutopad != "VALID") {
164 throw
165 std::runtime_error("TMVA SOFIE" + Name() + "Op invalid Autopad value : " + fAttrAutopad);
166 }
167 // to be sure pad is vector of size 6
168 if (fDim < 3) fAttrPads.resize(6, 0);
169
170 size_t input1 = input[0][2];
171 size_t input2 = (fDim > 1) ? input[0][3] : 1;
172 size_t input3 = (fDim > 2) ? input[0][4] : 1;
173
174 // use ceiling division when ceil_mode=1, floor otherwise
175 auto poolOutDim = [this](size_t in, size_t pad, size_t kern, size_t stride) -> size_t {
176 size_t n = in + pad - kern;
177 return (fAttrCeilMode ? (n + stride - 1) / stride : n / stride) + 1;
178 };
179
180 size_t pad1 = fAttrPads[0] + fAttrPads[i1];
182
183 size_t batch_size = input[0][0]; // first element in input tensor
184 size_t output_channels = input[0][1]; // first element in output tensor
185
186 std::vector<std::vector<size_t>> ret({{ batch_size, output_channels, output1 }});
187
188 if (fDim == 1)
189 return ret;
190
191 size_t pad2 = fAttrPads[1] + fAttrPads[i2];
193 // output is N x C x OH x OW
194 ret[0].push_back(output2);
195 if (fDim == 2)
196 return ret;
197
198 size_t pad3 = fAttrPads[2] + fAttrPads[i3];
200
201 // output is N x C x OH x OW x OD
202 ret[0].push_back(output3);
203 return ret;
204 }
205
206 void Initialize(RModel& model) override {
207
208 fUseSession = model.UseSession();
209
210 if (!model.CheckIfTensorAlreadyExist(fNX)) {
211 throw
212 std::runtime_error("TMVA SOFIE Pool op Input Tensor " + fNX + " is not found in model");
213 }
214 fShapeX = model.GetTensorShape(fNX);
215 if (fShapeX.size() < 3 || fShapeX.size() > 5) {
216 std::cout << fNX << " : " << ConvertShapeToString(fShapeX) << std::endl;
217 throw
218 std::runtime_error("TMVA SOFIE Pool Op input data tensor" + fNX + " is not of 3,4 or 5 dimensions");
219 }
220 fDim = fShapeX.size() - 2;
221 // case of GlobalAveragePool. It is a pool case with kernel shape == image shape
224 fAttrKernelShape.resize(3);
226 if (fDim > 1)
228 if (fDim > 2)
230 fAttrAutopad = "VALID";
231 fAttrPads = {0, 0, 0, 0, 0, 0 };
232 assert(fAttrStrides.empty());
233 }
234 // find shape of Y and add it in the list of intermediate tensors
237
238 // need cmath for INFINITY when using MaxPool
239 if (fPoolMode == MaxPool) model.AddNeededStdLib("cmath");
240
241 }
242
243 std::string GenerateInitCode() override {
244 std::stringstream out;
245 return out.str();
246 }
247
248 // generate code for Session data members (e.g. internal vectors)
249 virtual std::string GenerateSessionMembersCode(std::string opName) override {
250 opName = "op_" + opName;
251 std::stringstream out;
252 // input matrix padded with zero
253 if(fDim == 1){
254 out << "std::vector<" << fType << "> fVec_" << opName << "_xpad = std::vector<" << fType << ">("
255 << fShapeX[1] * (fShapeX[2] + fAttrPads[0] + fAttrPads[2]) << ");\n";
256 }
257 else if(fDim == 2){
258 out << "std::vector<" << fType << "> fVec_" << opName << "_xpad = std::vector<" << fType << ">("
259 << fShapeX[1] * (fShapeX[2] + fAttrPads[0] + fAttrPads[2]) * (fShapeX[3] + fAttrPads[1] + fAttrPads[3])
260 << ");\n";
261 }
262 else{ //dim is 3D
263 out << "std::vector<" << fType << "> fVec_" << opName << "_xpad = std::vector<" << fType << ">("
264 << fShapeX[1] * (fShapeX[2] + fAttrPads[0] + fAttrPads[2]) * (fShapeX[3] + fAttrPads[1] + fAttrPads[3]) *
265 (fShapeX[4] + fAttrPads[2] + fAttrPads[4]) << ");\n";
266 }
267
268 return out.str();
269 }
270
271 std::string Generate(std::string OpName) override {
272 OpName = "op_" + OpName;
273
274 if (fShapeX.empty() || fShapeY.empty()) {
275 throw std::runtime_error("TMVA SOFIE Pool Op called to Generate without being initialized first");
276 }
277
278 std::stringstream out;
279
280 out << "\n//---- operator " << Name() << " " << OpName << "\n";
281 out << "{\n"; // create a new scope to avoid name clash
282
283 assert(fShapeX[0] == fShapeY[0]);
284 assert(fShapeX[1] == fShapeY[1]);
285 assert(fAttrPads.size() == 6);
286 assert(fAttrKernelShape.size() == 3);
287 // find lower bounds of filtered area
288 int hmin = - fAttrPads[0]; // minimum lower bound value of filter area
289 // use stride instead of 1 when ceil_mode=1, so the loop covers the extra partial window
290 int hmax = fShapeX[2] + fAttrPads[1] - fAttrKernelShape[0] + (fAttrCeilMode ? (int)fAttrStrides[0] : 1);
291 int wmin,wmax,dmin,dmax;
292
293 if(fDim >= 2){
294 wmin = - fAttrPads[2]; // minimum lower bound value of filter area
296 }
297 else{
298 wmin=1;
299 wmax=1;
300 }
301 if(fDim == 3){
302 dmin = - fAttrPads[4]; // minimum lower bound value of filter area
304 }
305 else{
306 dmin=1;
307 dmax=1;
308 }
309 out << SP << "constexpr int hsize = " << fShapeX[2] << ";\n";
310 out << SP << "constexpr int hmin = " << hmin << ";\n";
311 out << SP << "constexpr int hmax = " << hmax << ";\n";
312 out << SP << "constexpr int kh = " << fAttrKernelShape[0] << ";\n";
313 if (fDim > 1) {
314 size_t wsize = fShapeX[3];
315 out << SP << "constexpr int wsize = " << wsize << ";\n";
316 out << SP << "constexpr int wmin = " << wmin << ";\n";
317 out << SP << "constexpr int wmax = " << wmax << ";\n";
318 out << SP << "constexpr int kw = " << fAttrKernelShape[1] << ";\n";
319 if (fDim > 2) {
320 size_t dsize = fShapeX[4];
321 out << SP << "constexpr int dsize = " << dsize << ";\n";
322 out << SP << "constexpr int dwsize = " << dsize*wsize << ";\n"; // hstride
323 out << SP << "constexpr int dmin = " << dmin << ";\n";
324 out << SP << "constexpr int dmax = " << dmax << ";\n";
325 out << SP << "constexpr int kd = " << fAttrKernelShape[2] << ";\n";
326 }
327 }
328
329
330 bool doPadding = false;
331 for ( auto & e : fAttrPads)
332 doPadding |= (e > 0);
333
334
335 if(fDim==1){
336 // loop on batches and channels
337 out << SP << "size_t outIndex = 0;\n";
338 out << SP << "for (size_t n = 0; n < " << fShapeX[0]*fShapeX[1] << "; n++) {\n";
339 out << SP << SP << "size_t inputOffset = n*" << fShapeX[2] << ";\n";
340 out << SP << SP << "for (int i = hmin; i < hmax; i+=" << fAttrStrides[0] << ") {\n";
341 // loop on elements of filter region to compute maximum
342 if (fPoolMode == MaxPool)
343 out << SP << SP << SP << SP << "float value = -INFINITY;\n";
344 else if (fPoolMode == AveragePool) {
345 out << SP << SP << SP << SP << "float value = 0;\n";
347 out << SP << SP << SP << SP << "int nsum = 0;\n";
348 else // in case we count the pad values in average
349 out << SP << SP << SP << SP << "constexpr int nsum = kh;\n";
350 }
351 // loop on rows of filtered region
352 out << SP << SP << SP << SP << "for (int l = i; l < i + kh; l++) {\n";
353 out << SP << SP << SP << SP << SP << "if (l < 0 || l >= hsize) continue;\n";
354 out << SP << SP << SP << SP << SP << SP << "int index = inputOffset + l;\n";
355 if (fPoolMode == MaxPool) {
356 out << SP << SP << SP << SP << SP << SP << "auto xval = tensor_" << fNX << "[index];\n";
357 out << SP << SP << SP << SP << SP << SP << "if (xval > value) value = xval;\n";
358 }
359 else if (fPoolMode == AveragePool) {
360 // compute sum of values
361 out << SP << SP << SP << SP << SP << SP << "value += tensor_" << fNX << "[index];\n";
363 // compute number of elements used for the average
364 out << SP << SP << SP << SP << SP << SP << "nsum++;\n";
365 }
366 out << SP << SP << SP << SP << SP << "}\n"; // end loop on region elements
367 if (fPoolMode == AveragePool) {
368 // compute average
369 out << SP << SP << SP << SP << "value /= float(nsum);\n";
370 }
371
372 out << SP << SP << SP << SP << "tensor_" << fNY << "[outIndex++] = value;\n";
373
374 out << SP << SP << "}\n"; // end loop on i (image rows)
375 out << SP << "}\n"; // end loop on c*b
376 }
377 else if(fDim==2){
378 // loop on batches and channels
379 out << SP << "size_t outIndex = 0;\n";
380 out << SP << "for (size_t n = 0; n < " << fShapeX[0]*fShapeX[1] << "; n++) {\n";
381 out << SP << SP << "size_t inputOffset = n*" << fShapeX[2]*fShapeX[3] << ";\n";
382 out << SP << SP << "for (int i = hmin; i < hmax; i+=" << fAttrStrides[0] << ") {\n";
383 out << SP << SP << SP << "for (int j = wmin; j < wmax; j+=" << fAttrStrides[1] << ") {\n";
384 // loop on elements of filter region to compute maximum
385 if (fPoolMode == MaxPool)
386 out << SP << SP << SP << SP << "float value = -INFINITY;\n";
387 else if (fPoolMode == AveragePool) {
388 out << SP << SP << SP << SP << "float value = 0;\n";
390 out << SP << SP << SP << SP << "int nsum = 0;\n";
391 else // in case we count the pad values in average
392 out << SP << SP << SP << SP << "constexpr int nsum = kw*kh;\n";
393 }
394 // loop on rows of filtered region
395 out << SP << SP << SP << SP << "for (int l = i; l < i + kh; l++) {\n";
396 out << SP << SP << SP << SP << SP << "if (l < 0 || l >= hsize) continue;\n";
397 // loop on columns of filtered region
398 out << SP << SP << SP << SP << SP << "for (int m = j; m < j + kw; m++) {\n";
399 out << SP << SP << SP << SP << SP << SP << "if (m < 0 || m >= wsize) continue;\n";
400 out << SP << SP << SP << SP << SP << SP << SP << "int index = inputOffset + l*wsize + m;\n";
401 if (fPoolMode == MaxPool) {
402 out << SP << SP << SP << SP << SP << SP << SP << "auto xval = tensor_" << fNX << "[index];\n";
403 out << SP << SP << SP << SP << SP << SP << SP << "if (xval > value) value = xval;\n";
404 }
405 else if (fPoolMode == AveragePool) {
406 // compute sum of values
407 out << SP << SP << SP << SP << SP << SP << SP << "value += tensor_" << fNX << "[index];\n";
409 // compute number of elements used for the average
410 out << SP << SP << SP << SP << SP << SP << SP << "nsum++;\n";
411 }
412 out << SP << SP << SP << SP << SP << SP << "}\n";
413 out << SP << SP << SP << SP << SP << "}\n"; // end loop on region elements
414 if (fPoolMode == AveragePool) {
415 // compute average
416 out << SP << SP << SP << SP << "value /= float(nsum);\n";
417 }
418 out << SP << SP << SP << SP << "tensor_" << fNY << "[outIndex++] = value;\n";
419 out << SP << SP << SP << "}\n"; // end loop on j (columns of image)
420 out << SP << SP << "}\n"; // end loop on i (image rows)
421 out << SP << "}\n"; // end loop on c*b
422 }
423 else if(fDim==3){
424 // loop on batches and channels
425 out << SP << "size_t outIndex = 0;\n";
426 out << SP << "for (size_t n = 0; n < " << fShapeX[0]*fShapeX[1] << "; n++) {\n";
427 out << SP << SP << "size_t inputOffset = n*" << fShapeX[2]*fShapeX[3]*fShapeX[4] << ";\n";
428 out << SP << SP << "for (int i = hmin; i < hmax; i+=" << fAttrStrides[0] << ") {\n";
429 out << SP << SP << SP << "for (int j = wmin; j < wmax; j+=" << fAttrStrides[1] << ") {\n";
430 out << SP << SP << SP << SP << "for (int k = dmin; k < dmax; k+=" << fAttrStrides[2] << ") {\n";
431 // loop on elements of filter region to compute maximum
432 if (fPoolMode == MaxPool)
433 out << SP << SP << SP << SP << "float value = -INFINITY;\n";
434 else if (fPoolMode == AveragePool) {
435 out << SP << SP << SP << SP << "float value = 0;\n";
437 out << SP << SP << SP << SP << "int nsum = 0;\n";
438 else // in case we count the pad values in average
439 out << SP << SP << SP << SP << "constexpr int nsum = kw*kh*kd;\n";
440 }
441 // loop on rows of filtered region
442 out << SP << SP << SP << SP << "for (int l = i; l < i + kh; l++) {\n";
443 out << SP << SP << SP << SP << SP << "if (l < 0 || l >= hsize) continue;\n";
444 // loop on columns of filtered region
445 out << SP << SP << SP << SP << SP << "for (int m = j; m < j + kw; m++) {\n";
446 out << SP << SP << SP << SP << SP << SP << "if (m < 0 || m >= wsize) continue;\n";
447 // loop on layers of filtered region
448 out << SP << SP << SP << SP << SP << SP << "for (int p = k; p < k + kd; p++) {\n";
449 out << SP << SP << SP << SP << SP << SP << SP << "if (p < 0 || p >= dsize) continue;\n";
450 out << SP << SP << SP << SP << SP << SP << SP << SP << "int index = inputOffset + l*dwsize + m*dsize + p;\n";
451
452 if (fPoolMode == MaxPool) {
453 out << SP << SP << SP << SP << SP << SP << SP << SP << "auto xval = tensor_" << fNX << "[index];\n";
454 out << SP << SP << SP << SP << SP << SP << SP << SP << "if (xval > value) value = xval;\n";
455 }
456 else if (fPoolMode == AveragePool) {
457 // compute sum of values
458 out << SP << SP << SP << SP << SP << SP << SP << SP << "value += tensor_" << fNX << "[index];\n";
460 // compute number of elements used for the average
461 out << SP << SP << SP << SP << SP << SP << SP << SP << "nsum++;\n";
462 }
463 out << SP << SP << SP << SP << SP << SP << "}\n";
464 out << SP << SP << SP << SP << SP << "}\n";
465 out << SP << SP << SP << SP << "}\n"; // end loop on region elements
466 if (fPoolMode == AveragePool) {
467 // compute average
468 out << SP << SP << SP << SP << "value /= float(nsum);\n";
469 }
470
471 out << SP << SP << SP << SP << "tensor_" << fNY << "[outIndex++] = value;\n";
472 out << SP << SP << SP << SP << "}\n" ; // end loop on k (layers of image)
473 out << SP << SP << SP << "}\n"; // end loop on j (columns of image)
474 out << SP << SP << "}\n"; // end loop on i (image rows)
475 out << SP << "}\n"; // end loop on c*b
476 }
477 // end scope
478 out << SP << "}\n";
479
480
481 return out.str();
482 }
483};
484
485} // namespace SOFIE
486} // namespace Experimental
487} // namespace TMVA
488
489
490#endif
#define d(i)
Definition RSha256.hxx:102
#define e(i)
Definition RSha256.hxx:103
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
void AddNeededStdLib(std::string libname)
std::vector< size_t > GetTensorShape(const std::string &name) const
Definition RModel.cxx:51
void AddIntermediateTensor(std::string tensor_name, ETensorType type, std::vector< Dim > dim_shape)
Definition RModel.cxx:284
bool CheckIfTensorAlreadyExist(std::string tensor_name)
Definition RModel.cxx:144
ETensorType GetTensorType(std::string name) const
Definition RModel.cxx:112
virtual std::string GenerateSessionMembersCode(std::string opName) override
std::vector< std::vector< size_t > > ShapeInference(std::vector< std::vector< size_t > > input) override
void Initialize(RModel &model) override
std::vector< ETensorType > TypeInference(std::vector< ETensorType > input) override
std::string Generate(std::string OpName) override
ROperator_Pool(PoolOpMode mode, RAttributes_Pool attr, std::string nameX, std::string nameY)
std::vector< std::string_view > fInputTensorNames
Definition ROperator.hxx:50
const std::string SP
space used to correctly indent the generated C++ code
Definition ROperator.hxx:45
std::vector< std::string_view > fOutputTensorNames
Definition ROperator.hxx:51
const Int_t n
Definition legend1.C:16
std::string ConvertShapeToString(const std::vector< size_t > &shape)
create variable transformations