---
title: ScopeDynamicRNNPass
description: "将含有如下算子的Scope融合为DynamicRNN算子。Scope内包括：1个名为while的子Scope，不包含Transpose算子；while子Scope内包括：4的倍数个BiasAdd算子、2的倍数个Tanh算子、8个MatMul算子，1个Split算子。"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommunity/latest/Convergence/tfscopefusionref/atlasfr_30_0020.html
sourcePath: /source/zh/TensorFlowCommunity/910/Convergence/tfscopefusionref/atlasfr_30_0020.html
indexId: 3e631b69d68b390d93be035e3ebacfa37dcc544cbfaa82fe8fabf144da35bece84
---
# ScopeDynamicRNNPass

#### 功能说明

将含有如下算子的Scope融合为DynamicRNN算子。Scope内包括：1个名为while的子Scope，不包含Transpose算子；while子Scope内包括：4的倍数个BiasAdd算子、2的倍数个Tanh算子、8个MatMul算子，1个Split算子。


#### Scope详情

待融合的Scope：


其中while子Scope内包括：4的倍数个BiasAdd算子、2的倍数个Tanh算子、8个MatMul算子，1个Split算子。

内部Scope结构如下：


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

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


#### 融合对应关系

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

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

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

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


#### 适用网络

Tacotron


#### 融合规则类型

定制化融合规则
