17#include "luci_interpreter/core/Tensor.h"
27 : _element_type(element_type), _shape(
std::
move(shape)), _quantization(
std::
move(quantization)),
36 if (
data_size != num_elements * element_size)
38 throw std::invalid_argument(
"Invalid data size.");
48 if (
data_size != num_elements * element_size)
50 throw std::invalid_argument(
"Invalid data size.");
56void Tensor::resize(
const Shape &new_shape) { _shape = new_shape; }
int32_t num_elements() const
const Shape & shape() const
static int32_t num_elements(const circle::Tensor *circle_tensor)
DataType element_type() const
size_t getDataTypeSize(DataType data_type)
DataType
"scalar" value type
T must_cast(loco::Node *node)