mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* improvement(ViT): use Crop to subtitude Gather * fix(CI): code format * fix(pytorch/ops/linear.py): bias maybe None * fix(test/test_pytorch_ops.py): op_type error * fix(test): pytest error * fix(test): torch version 1.8
20 lines
509 B
C++
20 lines
509 B
C++
// Copyright (c) OpenMMLab. All rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "utils.h"
|
|
|
|
/**
|
|
* @brief query output shape of target node
|
|
*
|
|
* @param mutable_graph
|
|
* @param target
|
|
* @param weights
|
|
* @param context <tensor name, shape>
|
|
* @return std::tuple<bool, std::vector<int>>
|
|
*/
|
|
std::tuple<bool, std::vector<int>> query_shape(
|
|
onnx::GraphProto* mutable_graph, onnx::NodeProto* target,
|
|
const std::map<std::string, onnx::TensorProto>& weights,
|
|
std::map<std::string, std::vector<int>>& context);
|