已合并
fix ReverseSequecne infershape error #2744
fix ReverseSequecne infershape error #2744
已合并
yu_qinfei创建于 3月16日
1 个文件变更+19-0
@@ -12,3 +12,22 @@
12 * \file reverse_sequence_infershape.cpp12 * \file reverse_sequence_infershape.cpp
13 * \brief13 * \brief
14 */14 */
15+#include "log/log.h"
16+#include "util/shape_util.h"
17+#include "register/op_impl_registry.h"
18+#include "op_host/infershape_elewise_util.h"
19+ 
20+using namespace ge;
21+namespace ops
22+{
23+static graphStatus InferDataType4ReverseSequence(gert::InferDataTypeContext* context)
24+{
25+ OP_LOGD(context->GetNodeName(), "InferDataType4ReverseSequence enter");
26+ auto input_x_dtype = context->GetInputDataType(0);
27+ context->SetOutputDataType(0, input_x_dtype);
28+ OP_LOGD(context->GetNodeName(), "InferDataType4ReverseSequence end");
29+ return GRAPH_SUCCESS;
30+}
31+ 
32+IMPL_OP_INFERSHAPE(ReverseSequence).InferShape(Ops::Base::InferShape4Elewise).InferDataType(InferDataType4ReverseSequence);
33+} // namespace ops