#include "Shape.h"
#include <vector>
#include <cstdint>
Go to the source code of this file.
◆ concatenationPrepare()
bool concatenationPrepare |
( |
const std::vector< Shape > & |
inputShapes, |
|
|
int32_t |
axis, |
|
|
Shape * |
output |
|
) |
| |
Definition at line 21 of file Concatenation.cpp.
22{
23
27
29 ASSERT(axis < (int32_t)num_dimensions);
30
33 {
35 ASSERT(inputShapes[i].type == inputShapes[0].type);
36 if (input_type == OperandType::TENSOR_QUANT8_ASYMM)
37 {
39 ASSERT(inputShapes[0].scale == inputShapes[i].scale);
40 }
41 for (int d = 0; d < (int32_t)num_dimensions; ++d)
42 {
43 if (d == axis)
44 {
46 }
47 else
48 {
51 }
52 }
53 }
54
57 output->dimensions[axis] = sum_axis;
58
59 if (input_type == OperandType::TENSOR_QUANT8_ASYMM)
60 {
63 }
64
65 return true;
66}
uint32_t getSizeOfDimension(const Shape &shape, uint32_t dimensionIdx)
uint32_t getNumberOfDimensions(const Shape &shape)
__global uchar * offset(const Image *img, int x, int y)
Option< std::vector< int > > inputShapes(optname("--input-shape"), overview("Shape of caffe2 input"), std::vector< int >{}, optional(false), optvalues(""), nullptr, separators(""), showopt(false), IOption::Group::caffe2)
References ASSERT, getNumberOfDimensions(), getSizeOfDimension(), and offset().