const ::internal::tflite::operand::Index ofm_index{node.param().ofm_index};
const ::internal::tflite::operand::Index lhs_index{node.param().lhs_index};
const ::internal::tflite::operand::Index rhs_index{node.param().rhs_index};
- const ::internal::tflite::operand::Index activation_index{node.param().activation_index};
// Set Shape Constraints and TensorInfo
_builder.addShapeConstr(
int ofm_index;
int lhs_index;
int rhs_index;
-
- FuseCode activation;
};
Param param;
param.lhs_index = lhs_index.asInt();
param.rhs_index = rhs_index.asInt();
- param.activation = static_cast<FuseCode>(_ctx.at(activation_index).asScalar<int32_t>());
-
auto stage = [param](const IAllocationContext &ctx, IExecutionBuilder &builder) {
auto ofm_alloc = ctx.at(::internal::tflite::operand::Index{param.ofm_index});
auto lhs_alloc = ctx.at(::internal::tflite::operand::Index{param.lhs_index});
builder.append("SquaredDifference", std::move(fn));
- ActivationBuilder{builder}.append(param.activation, ofm_alloc);
};
_builder.addStage(stage);
Param::Param(uint32_t inputCount, const uint32_t *inputs, uint32_t outputCount,
const uint32_t *outputs)
{
- assert(inputCount == 3 && outputCount == 1);
+ assert(inputCount == 2 && outputCount == 1);
ofm_index = outputs[0];
// 2 -> Activation Index
lhs_index = inputs[0];
rhs_index = inputs[1];
- activation_index = inputs[2];
}
} // namespace SquaredDifference