CLUniqueTensor(const ::arm_compute::TensorInfo &info)
{
_tensor.allocator()->init(info);
- _tensor.allocator()->allocate();
}
public:
}
public:
+ void allocate()
+ {
+ _tensor.allocator()->allocate();
+ }
+
+public:
::arm_compute::CLTensor &ref(void) { return _tensor; }
::arm_compute::CLTensor *ptr(void) { return &_tensor; }
arm_compute::CLConvolutionLayer conv_f;
conv_f.configure(input.ptr(), filter.ptr(), bias.ptr(), output.ptr(), conv_info);
+ input.allocate();
+ output.allocate();
+ bias.allocate();
+ filter.allocate();
+
TensorAccess<InputAccessor>(input.ref(), inputData, inputShape);
TensorAccess<BiasAccessor>(bias.ref(), biasData, biasShape);
TensorAccess<WeightAccessor>(filter.ref(), filterData, filterShape);
float filterData[9];
const android::nn::Shape filterShape = { OperandType::FLOAT32, {1,3,3,1}, 1.0, 0 };
float biasData[1] = { 1.0 };
- const android::nn::Shape biasShape = { OperandType::FLOAT32, {1,1,1,1}, 1.0, 0 };
+ const android::nn::Shape biasShape = { OperandType::FLOAT32, {1}, 1.0, 0 };
int32_t padding_left = 0;
int32_t padding_right = 0;
int32_t padding_top = 0;
float filterData[9];
const android::nn::Shape filterShape = { OperandType::FLOAT32, {1,3,3,1}, 1.0, 0 };
float biasData[1] = { 1.0 };
- const android::nn::Shape biasShape = { OperandType::FLOAT32, {1,1,1,1}, 1.0, 0 };
+ const android::nn::Shape biasShape = { OperandType::FLOAT32, {1}, 1.0, 0 };
int32_t padding_left = 1;
int32_t padding_right = 1;
int32_t padding_top = 1;