30 if (args.op.inputs.size() != 3 && args.op.inputs.size() != 4)
33 const auto &inputs = args.op.inputs;
34 const auto tensors = args.reader.tensors();
35 const auto filter_tensor = tensors.at(inputs.at(1));
36 assert(filter_tensor !=
nullptr);
37 const auto filter_shape =
wrap(filter_tensor->shape());
38 const auto ifm_tensor = tensors.at(inputs.at(2));
39 assert(ifm_tensor !=
nullptr);
40 const auto ifm_shape =
wrap(ifm_tensor->shape());
43 if (ifm_shape.size() != 4)
45 if (filter_shape.size() != 4)
50 if (ifm_shape.at(3) != filter_shape.at(3))
56CircleNode *CircleTransposeConvGraphBuilder::build_node(
const circle::OperatorT &op,
57 const std::vector<CircleNode *> &inputs,
63 node->filter(inputs.at(1));
64 node->outBackprop(inputs.at(2));
65 if (inputs.size() == 3)
71 node->bias(inputs.at(3));
73 const auto *options = op.builtin_options.AsTransposeConvOptions();
75 node->stride()->w(options->stride_w);
76 node->stride()->h(options->stride_h);
77 node->fusedActivationFunction(
luci_actfunc(options->fused_activation_function));
CircleOutputExclude is used to specifying not exported nodes.
bool validate(const ValidateArgs &args) const final
TRANSPOSE_CONV in Circle.
loco::Node * inputSizes(void) const
VectorWrapper< T > wrap(const flatbuffers::Vector< T > *vec)
Padding luci_padding(const circle::Padding padding)
FusedActFunc luci_actfunc(const circle::ActivationFunctionType type)