---
title: ScopeDynamicGRUPass
description: "将含有如下算子的Scope融合为DynamicGRU算子。Scope内包括：5个AddV2算子、3个Mul算子、1个Tanh算子、不包含Transpose算子。"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommunity/latest/Convergence/tfscopefusionref/atlasfr_30_0019.html
sourcePath: /source/zh/TensorFlowCommunity/910/Convergence/tfscopefusionref/atlasfr_30_0019.html
indexId: 6f88957194957e110791f53de4c9f6813214126c9f99c9276f9077a8dc14170184
---
# ScopeDynamicGRUPass

#### 功能说明

将含有如下算子的Scope融合为DynamicGRU算子。Scope内包括：5个AddV2算子、3个Mul算子、1个Tanh算子、不包含Transpose算子。


#### Scope详情

例如，待融合的Scope为：


其中while内包含5个AddV2算子、3个Mul算子、1个Tanh算子、不包含Transpose算子，最终把上面红框中的所有算子融合为DynamicGRU算子。


#### 融合后的算子原型

DynamicGRUV2，具体请参见《算子库(https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/920beta1/API/aolapi/operatorlist_00001.html)》。


#### 融合对应关系

TensorArrayUnstack/TensorArrayScatter/TensorArrayScatterV3的输入作为融合后算子的第一个输入。

while/ReadVariableOp_1/Enter的输入作为融合后算子的第二个输入。

while/ReadVariableOp_4/Enter的输入作为融合后算子的第三个输入。

while/ReadVariableOp_00/Enter的输入作为融合后算子的第四个输入。

while/ReadVariableOp_01/Enter的输入作为融合后算子的第五个输入。

TensorArrayStack/TensorArrayGatherV3的输出作为融合后算子的第一个输出。


#### 适用网络

DeepSpeech2


#### 融合规则类型

定制化融合规则
