---
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/TensorFlowCommercial/latest/Convergence/tfscopefusionref/atlasfr_30_0020.html
sourcePath: /source/zh/TensorFlowCommercial/900/Convergence/tfscopefusionref/atlasfr_30_0020.html
indexId: f09d44c35d39c19ee60b376c1772e801027517488f65ef5a8a5c79bd22d59e2285
---
# 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/canncommercial/900/API/aolapi/operatorlist_00001.html)》。


#### 融合对应关系

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

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

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

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


#### 适用网络

Tacotron


#### 融合规则类型

定制化融合规则
