`scale` and `offset` are used only in case of `TENSOR_QUANT8_ASYMM`.
For most cases, we don't need the values at all.
Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
public:
TypeInfo() = delete;
- TypeInfo(DataType type, float scale, int32_t offset) : _type(type), _scale(scale), _offset(offset)
+ explicit TypeInfo(DataType type, float scale = 0, int32_t offset = 0)
+ : _type(type), _scale(scale), _offset(offset)
{
- // DO NOTHING
}
public:
shape1.dim(2) = 30;
shape1.dim(3) = 40;
- ::neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32, 0, 0};
+ ::neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32};
set.append(shape0, type);
set.append(shape1, type);
neurun::graph::verifier::DAGChecker verifier;
neurun::model::operand::Shape shape(3);
- neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32, 0, 0};
+ neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32};
// Model Input/Output
auto input_operand = model->operands.append(shape, type);
neurun::model::Model model;
neurun::model::operand::Shape shape{3};
- neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32, 0, 0};
+ neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32};
// Add Conv
using GraphNode = neurun::model::operation::Conv2DNode;
neurun::model::operand::Shape shape{3};
- neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32, 0, 0};
+ neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32};
using GraphNode = neurun::model::operation::ConcatNode;
std::unique_ptr<neurun::model::Model> model = nnfw::cpp14::make_unique<neurun::model::Model>();
::neurun::model::operand::Shape shape{3};
- ::neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32, 0, 0};
+ ::neurun::model::operand::TypeInfo type{neurun::model::operand::DataType::TENSOR_INT32};
auto operand1 = model->operands.append(shape, type);
auto operand2 = model->operands.append(shape, type);
std::unique_ptr<neurun::model::Model> model = nnfw::cpp14::make_unique<neurun::model::Model>();
operand::Shape shape{1, 2, 2, 1};
- operand::TypeInfo type{DataType::TENSOR_INT32, 0, 0};
+ operand::TypeInfo type{DataType::TENSOR_INT32};
operand::Shape shape_scalar(0);
- operand::TypeInfo type_scalar{DataType::SCALAR_INT32, 0, 0};
+ operand::TypeInfo type_scalar{DataType::SCALAR_INT32};
auto operand_lhs = model->operands.append(shape, type);
auto operand_rhs = model->operands.append(shape, type);