fix: 改正类型转换

Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
YdrMaster 2023-02-22 11:05:54 +08:00
parent 2a23669394
commit bb9b62b169
1 changed files with 3 additions and 3 deletions

View File

@ -95,17 +95,17 @@ static int tensor_dtype(Tensor t) {
static int concat_axis_of(Operator op) {
IT_ASSERT(op->getOpType() == OpType::Concat);
return reinterpret_cast<const ConcatObj *>(op.get())->getDim();
return dynamic_cast<const ConcatObj *>(op.get())->getDim();
}
static int gather_axis_of(Operator op) {
IT_ASSERT(op->getOpType() == OpType::Gather);
return reinterpret_cast<const GatherObj *>(op.get())->getAxis();
return dynamic_cast<const GatherObj *>(op.get())->getAxis();
}
static Shape reshape_shape_of(Operator op) {
IT_ASSERT(op->getOpType() == OpType::Reshape);
return reinterpret_cast<const ReshapeObj *>(op.get())->getShape();
return dynamic_cast<const ReshapeObj *>(op.get())->getShape();
}
void init_graph_builder(py::module &m) {