|
|
|
@@ -40,4 +40,26 @@ pnnx.Output output 1 0 out |
|
|
|
|
|
|
|
REGISTER_GLOBAL_PNNX_GRAPH_REWRITER_PASS(torch_mean, 20) |
|
|
|
|
|
|
|
class torch_mean_1 : public GraphRewriterPass |
|
|
|
{ |
|
|
|
public: |
|
|
|
const char* match_pattern_graph() const |
|
|
|
{ |
|
|
|
return R"PNNXIR(7767517 |
|
|
|
4 3 |
|
|
|
pnnx.Input input_0 0 1 input |
|
|
|
prim::Constant op_0 0 1 dtype value=* |
|
|
|
aten::mean op_1 2 1 input dtype out |
|
|
|
pnnx.Output output 1 0 out |
|
|
|
)PNNXIR"; |
|
|
|
} |
|
|
|
|
|
|
|
const char* type_str() const |
|
|
|
{ |
|
|
|
return "torch.mean"; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
REGISTER_GLOBAL_PNNX_GRAPH_REWRITER_PASS(torch_mean_1, 20) |
|
|
|
|
|
|
|
} // namespace pnnx |