diff --git a/ethosu/regor/compiler/graphir_optimiser.cpp b/ethosu/regor/compiler/graphir_optimiser.cpp index 44a81040ede6a965394b49791e4988d3b46ef473..ea1ad4058dd3d1e933a669297755ae526a1b3071 100644 --- a/ethosu/regor/compiler/graphir_optimiser.cpp +++ b/ethosu/regor/compiler/graphir_optimiser.cpp @@ -419,7 +419,7 @@ Operation *GraphIrOptimiser::RewriteFullyConnected(Graph *const graph, Operation // Batched Conv2D with kernel 1x1 can be handled the same way as FullyConnected if ( opType == OpType::FullyConnected || (opType == OpType::Conv2D && ifm->shape.Batch() > 1 && kernel->Size().AreaXY() == 1 && - kernel->Stride().AreaXY() == 1 && kernel->DilatedWH().AreaXY() == 1) ) + kernel->Stride().AreaXY() == 1 && kernel->DilatedWH().AreaXY() == 1 && kernel->Padding().IsZero()) ) { const auto &weights = operation->Input(TensorUsage::Weights); const auto &shape = weights->tensor->StorageShape();