---
title: ScopeDynamicGRUPass
description: "将含有如下算子的Scope融合为DynamicGRU算子。Scope内包括：5个AddV2算子、3个Mul算子、1个Tanh算子、不包含Transpose算子。"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommercial/latest/Convergence/tfscopefusionref/atlasfr_30_0019.html
sourcePath: /source/zh/TensorFlowCommercial/900/Convergence/tfscopefusionref/atlasfr_30_0019.html
indexId: f535266827e69375baf68560bda3c077be465d475d222f26013c99e63ea5235d85
---
# 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/canncommercial/900/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


#### 融合规则类型

定制化融合规则
