Skip to content
Snippets Groups Projects
Commit 04ed465e authored by Maxence Naud's avatar Maxence Naud
Browse files

don't give a name to elements of metaop automatically if metaop has no name

parent 9b8dc155
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!179Add GridSample Operator
...@@ -34,7 +34,9 @@ std::shared_ptr<Aidge::Node> Aidge::PaddedConv(Aidge::DimSize_t in_channels, ...@@ -34,7 +34,9 @@ std::shared_ptr<Aidge::Node> Aidge::PaddedConv(Aidge::DimSize_t in_channels,
bool no_bias) bool no_bias)
{ {
auto metaOp = std::make_shared<Node>(PaddedConv_Op<DIM>(kernel_dims, stride_dims, padding_dims, dilation_dims), name); auto metaOp = std::make_shared<Node>(PaddedConv_Op<DIM>(kernel_dims, stride_dims, padding_dims, dilation_dims), name);
std::static_pointer_cast<MetaOperator_Op>(metaOp->getOperator())->getMicroGraph()->setNodesName(); if (!name.empty()) {
std::static_pointer_cast<MetaOperator_Op>(metaOp->getOperator())->getMicroGraph()->setNodesName();
}
addProducer(metaOp, 1, append(out_channels, append(in_channels, kernel_dims)), "w"); addProducer(metaOp, 1, append(out_channels, append(in_channels, kernel_dims)), "w");
if (!no_bias) { if (!no_bias) {
addProducer(metaOp, 2, {out_channels}, "b"); addProducer(metaOp, 2, {out_channels}, "b");
......
...@@ -33,7 +33,9 @@ std::shared_ptr<Aidge::Node> Aidge::PaddedConvDepthWise(const Aidge::DimSize_t n ...@@ -33,7 +33,9 @@ std::shared_ptr<Aidge::Node> Aidge::PaddedConvDepthWise(const Aidge::DimSize_t n
bool no_bias) bool no_bias)
{ {
auto metaOp = std::make_shared<Node>(PaddedConvDepthWise_Op<DIM>(kernel_dims, stride_dims, padding_dims, dilation_dims), name); auto metaOp = std::make_shared<Node>(PaddedConvDepthWise_Op<DIM>(kernel_dims, stride_dims, padding_dims, dilation_dims), name);
std::static_pointer_cast<MetaOperator_Op>(metaOp->getOperator())->getMicroGraph()->setNodesName(); if (!name.empty()) {
std::static_pointer_cast<MetaOperator_Op>(metaOp->getOperator())->getMicroGraph()->setNodesName();
}
addProducer(metaOp, 1, append(nb_channels, append(Aidge::DimSize_t(1), kernel_dims)), "w"); addProducer(metaOp, 1, append(nb_channels, append(Aidge::DimSize_t(1), kernel_dims)), "w");
if (!no_bias) { if (!no_bias) {
addProducer(metaOp, 2, {nb_channels}, "b"); addProducer(metaOp, 2, {nb_channels}, "b");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment