{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "choice-grade",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/workspace/DeepSpeech-2.x\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'/workspace/DeepSpeech-2.x'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%cd ..\n",
    "%pwd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "broke-broad",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/layers/utils.py:26: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\n",
      "Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations\n",
      "  def convert_to_list(value, n, name, dtype=np.int):\n",
      "register user softmax to paddle, remove this when fixed!\n",
      "register user log_softmax to paddle, remove this when fixed!\n",
      "register user sigmoid to paddle, remove this when fixed!\n",
      "register user log_sigmoid to paddle, remove this when fixed!\n",
      "register user relu to paddle, remove this when fixed!\n",
      "override cat of paddle if exists or register, remove this when fixed!\n",
      "override item of paddle.Tensor if exists or register, remove this when fixed!\n",
      "override long of paddle.Tensor if exists or register, remove this when fixed!\n",
      "override new_full of paddle.Tensor if exists or register, remove this when fixed!\n",
      "override eq of paddle.Tensor if exists or register, remove this when fixed!\n",
      "override eq of paddle if exists or register, remove this when fixed!\n",
      "override contiguous of paddle.Tensor if exists or register, remove this when fixed!\n",
      "override size of paddle.Tensor (`to_static` do not process `size` property, maybe some `paddle` api dependent on it), remove this when fixed!\n",
      "register user view to paddle.Tensor, remove this when fixed!\n",
      "register user view_as to paddle.Tensor, remove this when fixed!\n",
      "register user masked_fill to paddle.Tensor, remove this when fixed!\n",
      "register user masked_fill_ to paddle.Tensor, remove this when fixed!\n",
      "register user fill_ to paddle.Tensor, remove this when fixed!\n",
      "register user repeat to paddle.Tensor, remove this when fixed!\n",
      "register user softmax to paddle.Tensor, remove this when fixed!\n",
      "register user sigmoid to paddle.Tensor, remove this when fixed!\n",
      "register user relu to paddle.Tensor, remove this when fixed!\n",
      "register user type_as to paddle.Tensor, remove this when fixed!\n",
      "register user to to paddle.Tensor, remove this when fixed!\n",
      "register user float to paddle.Tensor, remove this when fixed!\n",
      "register user tolist to paddle.Tensor, remove this when fixed!\n",
      "register user glu to paddle.nn.functional, remove this when fixed!\n",
      "override ctc_loss of paddle.nn.functional if exists, remove this when fixed!\n",
      "register user Module to paddle.nn, remove this when fixed!\n",
      "register user ModuleList to paddle.nn, remove this when fixed!\n",
      "register user GLU to paddle.nn, remove this when fixed!\n",
      "register user ConstantPad2d to paddle.nn, remove this when fixed!\n",
      "register user export to paddle.jit, remove this when fixed!\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import paddle\n",
    "from yacs.config import CfgNode as CN\n",
    "\n",
    "from deepspeech.models.u2 import U2Model\n",
    "from deepspeech.utils.layer_tools import print_params\n",
    "from deepspeech.utils.layer_tools import summary"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "permanent-summary",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.\n",
      "  and should_run_async(code)\n",
      "[INFO 2021/05/31 03:23:22 u2.py:839] U2 Encoder type: transformer\n",
      "[INFO 2021/05/31 03:23:22 u2.py:840] attention_dropout_rate: 0.0\n",
      "attention_heads: 4\n",
      "dropout_rate: 0.1\n",
      "input_layer: conv2d\n",
      "linear_units: 2048\n",
      "normalize_before: True\n",
      "num_blocks: 12\n",
      "output_size: 256\n",
      "positional_dropout_rate: 0.1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "encoder.embed.conv.0.weight | [256, 1, 3, 3] | 2304 | True\n",
      "encoder.embed.conv.0.bias | [256] | 256 | True\n",
      "encoder.embed.conv.2.weight | [256, 256, 3, 3] | 589824 | True\n",
      "encoder.embed.conv.2.bias | [256] | 256 | True\n",
      "encoder.embed.out.0.weight | [5120, 256] | 1310720 | True\n",
      "encoder.embed.out.0.bias | [256] | 256 | True\n",
      "encoder.after_norm.weight | [256] | 256 | True\n",
      "encoder.after_norm.bias | [256] | 256 | True\n",
      "encoder.encoders.0.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.0.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.0.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.0.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.0.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.0.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.0.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.0.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.0.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.0.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.0.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.0.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.0.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.0.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.0.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.0.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.0.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.0.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.1.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.1.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.1.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.1.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.1.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.1.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.1.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.1.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.1.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.1.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.1.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.1.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.1.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.1.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.1.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.1.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.1.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.1.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.2.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.2.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.2.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.2.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.2.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.2.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.2.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.2.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.2.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.2.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.2.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.2.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.2.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.2.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.2.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.2.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.2.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.2.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.3.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.3.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.3.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.3.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.3.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.3.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.3.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.3.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.3.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.3.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.3.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.3.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.3.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.3.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.3.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.3.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.3.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.3.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.4.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.4.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.4.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.4.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.4.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.4.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.4.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.4.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.4.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.4.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.4.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.4.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.4.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.4.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.4.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.4.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.4.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.4.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.5.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.5.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.5.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.5.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.5.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.5.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.5.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.5.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.5.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.5.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.5.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.5.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.5.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.5.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.5.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.5.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.5.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.5.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.6.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.6.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.6.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.6.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.6.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.6.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.6.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.6.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.6.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.6.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.6.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.6.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.6.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.6.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.6.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.6.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.6.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.6.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.7.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.7.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.7.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.7.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.7.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.7.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.7.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.7.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.7.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.7.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.7.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.7.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.7.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.7.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.7.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.7.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.7.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.7.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.8.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.8.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.8.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.8.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.8.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.8.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.8.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.8.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.8.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.8.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.8.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.8.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.8.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.8.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.8.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.8.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.8.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.8.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.9.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.9.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.9.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.9.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.9.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.9.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.9.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.9.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.9.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.9.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.9.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.9.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.9.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.9.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.9.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.9.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.9.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.9.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.10.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.10.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.10.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.10.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.10.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.10.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.10.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.10.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.10.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.10.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.10.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.10.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.10.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.10.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.10.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.10.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.10.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.10.concat_linear.bias | [256] | 256 | True\n",
      "encoder.encoders.11.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.11.self_attn.linear_q.bias | [256] | 256 | True\n",
      "encoder.encoders.11.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.11.self_attn.linear_k.bias | [256] | 256 | True\n",
      "encoder.encoders.11.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.11.self_attn.linear_v.bias | [256] | 256 | True\n",
      "encoder.encoders.11.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "encoder.encoders.11.self_attn.linear_out.bias | [256] | 256 | True\n",
      "encoder.encoders.11.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "encoder.encoders.11.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "encoder.encoders.11.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "encoder.encoders.11.feed_forward.w_2.bias | [256] | 256 | True\n",
      "encoder.encoders.11.norm1.weight | [256] | 256 | True\n",
      "encoder.encoders.11.norm1.bias | [256] | 256 | True\n",
      "encoder.encoders.11.norm2.weight | [256] | 256 | True\n",
      "encoder.encoders.11.norm2.bias | [256] | 256 | True\n",
      "encoder.encoders.11.concat_linear.weight | [512, 256] | 131072 | True\n",
      "encoder.encoders.11.concat_linear.bias | [256] | 256 | True\n",
      "decoder.embed.0.weight | [4233, 256] | 1083648 | True\n",
      "decoder.after_norm.weight | [256] | 256 | True\n",
      "decoder.after_norm.bias | [256] | 256 | True\n",
      "decoder.output_layer.weight | [256, 4233] | 1083648 | True\n",
      "decoder.output_layer.bias | [4233] | 4233 | True\n",
      "decoder.decoders.0.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.0.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.0.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.0.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.0.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.0.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.0.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.0.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.0.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.0.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.0.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.0.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.0.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.0.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.0.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.0.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.0.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.0.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.0.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.0.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.0.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.0.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.0.concat_linear2.bias | [256] | 256 | True\n",
      "decoder.decoders.1.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.1.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.1.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.1.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.1.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.1.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.1.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.1.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.1.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.1.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.1.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.1.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.1.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.1.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.1.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.1.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.1.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.1.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.1.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.1.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.1.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.1.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.1.concat_linear2.bias | [256] | 256 | True\n",
      "decoder.decoders.2.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.2.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.2.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.2.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.2.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.2.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.2.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.2.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.2.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.2.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.2.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.2.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.2.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.2.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.2.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.2.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.2.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.2.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.2.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.2.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.2.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.2.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.2.concat_linear2.bias | [256] | 256 | True\n",
      "decoder.decoders.3.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.3.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.3.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.3.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.3.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.3.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.3.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.3.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.3.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.3.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.3.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.3.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.3.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.3.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.3.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.3.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.3.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.3.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.3.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.3.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.3.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.3.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.3.concat_linear2.bias | [256] | 256 | True\n",
      "decoder.decoders.4.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.4.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.4.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.4.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.4.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.4.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.4.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.4.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.4.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.4.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.4.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.4.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.4.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.4.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.4.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.4.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.4.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.4.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.4.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.4.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.4.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.4.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.4.concat_linear2.bias | [256] | 256 | True\n",
      "decoder.decoders.5.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.self_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.5.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.self_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.5.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.self_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.5.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.self_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.5.src_attn.linear_q.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.src_attn.linear_q.bias | [256] | 256 | True\n",
      "decoder.decoders.5.src_attn.linear_k.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.src_attn.linear_k.bias | [256] | 256 | True\n",
      "decoder.decoders.5.src_attn.linear_v.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.src_attn.linear_v.bias | [256] | 256 | True\n",
      "decoder.decoders.5.src_attn.linear_out.weight | [256, 256] | 65536 | True\n",
      "decoder.decoders.5.src_attn.linear_out.bias | [256] | 256 | True\n",
      "decoder.decoders.5.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
      "decoder.decoders.5.feed_forward.w_1.bias | [2048] | 2048 | True\n",
      "decoder.decoders.5.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
      "decoder.decoders.5.feed_forward.w_2.bias | [256] | 256 | True\n",
      "decoder.decoders.5.norm1.weight | [256] | 256 | True\n",
      "decoder.decoders.5.norm1.bias | [256] | 256 | True\n",
      "decoder.decoders.5.norm2.weight | [256] | 256 | True\n",
      "decoder.decoders.5.norm2.bias | [256] | 256 | True\n",
      "decoder.decoders.5.norm3.weight | [256] | 256 | True\n",
      "decoder.decoders.5.norm3.bias | [256] | 256 | True\n",
      "decoder.decoders.5.concat_linear1.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.5.concat_linear1.bias | [256] | 256 | True\n",
      "decoder.decoders.5.concat_linear2.weight | [512, 256] | 131072 | True\n",
      "decoder.decoders.5.concat_linear2.bias | [256] | 256 | True\n",
      "ctc.ctc_lo.weight | [256, 4233] | 1083648 | True\n",
      "ctc.ctc_lo.bias | [4233] | 4233 | True\n",
      "Total parameters: 411.0, 32.01M elements.\n"
     ]
    }
   ],
   "source": [
    "conf_str='examples/tiny/s1/conf/transformer.yaml'\n",
    "cfg = CN().load_cfg(open(conf_str))\n",
    "cfg.model.input_dim = 83\n",
    "cfg.model.output_dim = 4233\n",
    "cfg.model.cmvn_file = None\n",
    "cfg.model.cmvn_file_type = 'json'\n",
    "#cfg.model.encoder_conf.concat_after=True\n",
    "cfg.freeze()\n",
    "model = U2Model(cfg.model)\n",
    "\n",
    "print_params(model)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "sapphire-agent",
   "metadata": {},
   "outputs": [],
   "source": [
    "#summary(model)\n",
    "#print(model)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ruled-invitation",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "fossil-means",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "embed.npz    feat.npz  l1.npz   l11.npz  l3.npz  l5.npz  l7.npz  l9.npz\r\n",
      "encoder.npz  l0.npz    l10.npz  l2.npz   l4.npz  l6.npz  l8.npz  model.npz\r\n"
     ]
    }
   ],
   "source": [
    "%ls .notebook/espnet"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "45c2b75f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "state\n",
      "odict_keys(['mask_feature', 'encoder.embed.conv.0.weight', 'encoder.embed.conv.0.bias', 'encoder.embed.conv.2.weight', 'encoder.embed.conv.2.bias', 'encoder.embed.out.0.weight', 'encoder.embed.out.0.bias', 'encoder.encoders.0.self_attn.linear_q.weight', 'encoder.encoders.0.self_attn.linear_q.bias', 'encoder.encoders.0.self_attn.linear_k.weight', 'encoder.encoders.0.self_attn.linear_k.bias', 'encoder.encoders.0.self_attn.linear_v.weight', 'encoder.encoders.0.self_attn.linear_v.bias', 'encoder.encoders.0.self_attn.linear_out.weight', 'encoder.encoders.0.self_attn.linear_out.bias', 'encoder.encoders.0.feed_forward.w_1.weight', 'encoder.encoders.0.feed_forward.w_1.bias', 'encoder.encoders.0.feed_forward.w_2.weight', 'encoder.encoders.0.feed_forward.w_2.bias', 'encoder.encoders.0.norm1.weight', 'encoder.encoders.0.norm1.bias', 'encoder.encoders.0.norm2.weight', 'encoder.encoders.0.norm2.bias', 'encoder.encoders.1.self_attn.linear_q.weight', 'encoder.encoders.1.self_attn.linear_q.bias', 'encoder.encoders.1.self_attn.linear_k.weight', 'encoder.encoders.1.self_attn.linear_k.bias', 'encoder.encoders.1.self_attn.linear_v.weight', 'encoder.encoders.1.self_attn.linear_v.bias', 'encoder.encoders.1.self_attn.linear_out.weight', 'encoder.encoders.1.self_attn.linear_out.bias', 'encoder.encoders.1.feed_forward.w_1.weight', 'encoder.encoders.1.feed_forward.w_1.bias', 'encoder.encoders.1.feed_forward.w_2.weight', 'encoder.encoders.1.feed_forward.w_2.bias', 'encoder.encoders.1.norm1.weight', 'encoder.encoders.1.norm1.bias', 'encoder.encoders.1.norm2.weight', 'encoder.encoders.1.norm2.bias', 'encoder.encoders.2.self_attn.linear_q.weight', 'encoder.encoders.2.self_attn.linear_q.bias', 'encoder.encoders.2.self_attn.linear_k.weight', 'encoder.encoders.2.self_attn.linear_k.bias', 'encoder.encoders.2.self_attn.linear_v.weight', 'encoder.encoders.2.self_attn.linear_v.bias', 'encoder.encoders.2.self_attn.linear_out.weight', 'encoder.encoders.2.self_attn.linear_out.bias', 'encoder.encoders.2.feed_forward.w_1.weight', 'encoder.encoders.2.feed_forward.w_1.bias', 'encoder.encoders.2.feed_forward.w_2.weight', 'encoder.encoders.2.feed_forward.w_2.bias', 'encoder.encoders.2.norm1.weight', 'encoder.encoders.2.norm1.bias', 'encoder.encoders.2.norm2.weight', 'encoder.encoders.2.norm2.bias', 'encoder.encoders.3.self_attn.linear_q.weight', 'encoder.encoders.3.self_attn.linear_q.bias', 'encoder.encoders.3.self_attn.linear_k.weight', 'encoder.encoders.3.self_attn.linear_k.bias', 'encoder.encoders.3.self_attn.linear_v.weight', 'encoder.encoders.3.self_attn.linear_v.bias', 'encoder.encoders.3.self_attn.linear_out.weight', 'encoder.encoders.3.self_attn.linear_out.bias', 'encoder.encoders.3.feed_forward.w_1.weight', 'encoder.encoders.3.feed_forward.w_1.bias', 'encoder.encoders.3.feed_forward.w_2.weight', 'encoder.encoders.3.feed_forward.w_2.bias', 'encoder.encoders.3.norm1.weight', 'encoder.encoders.3.norm1.bias', 'encoder.encoders.3.norm2.weight', 'encoder.encoders.3.norm2.bias', 'encoder.encoders.4.self_attn.linear_q.weight', 'encoder.encoders.4.self_attn.linear_q.bias', 'encoder.encoders.4.self_attn.linear_k.weight', 'encoder.encoders.4.self_attn.linear_k.bias', 'encoder.encoders.4.self_attn.linear_v.weight', 'encoder.encoders.4.self_attn.linear_v.bias', 'encoder.encoders.4.self_attn.linear_out.weight', 'encoder.encoders.4.self_attn.linear_out.bias', 'encoder.encoders.4.feed_forward.w_1.weight', 'encoder.encoders.4.feed_forward.w_1.bias', 'encoder.encoders.4.feed_forward.w_2.weight', 'encoder.encoders.4.feed_forward.w_2.bias', 'encoder.encoders.4.norm1.weight', 'encoder.encoders.4.norm1.bias', 'encoder.encoders.4.norm2.weight', 'encoder.encoders.4.norm2.bias', 'encoder.encoders.5.self_attn.linear_q.weight', 'encoder.encoders.5.self_attn.linear_q.bias', 'encoder.encoders.5.self_attn.linear_k.weight', 'encoder.encoders.5.self_attn.linear_k.bias', 'encoder.encoders.5.self_attn.linear_v.weight', 'encoder.encoders.5.self_attn.linear_v.bias', 'encoder.encoders.5.self_attn.linear_out.weight', 'encoder.encoders.5.self_attn.linear_out.bias', 'encoder.encoders.5.feed_forward.w_1.weight', 'encoder.encoders.5.feed_forward.w_1.bias', 'encoder.encoders.5.feed_forward.w_2.weight', 'encoder.encoders.5.feed_forward.w_2.bias', 'encoder.encoders.5.norm1.weight', 'encoder.encoders.5.norm1.bias', 'encoder.encoders.5.norm2.weight', 'encoder.encoders.5.norm2.bias', 'encoder.encoders.6.self_attn.linear_q.weight', 'encoder.encoders.6.self_attn.linear_q.bias', 'encoder.encoders.6.self_attn.linear_k.weight', 'encoder.encoders.6.self_attn.linear_k.bias', 'encoder.encoders.6.self_attn.linear_v.weight', 'encoder.encoders.6.self_attn.linear_v.bias', 'encoder.encoders.6.self_attn.linear_out.weight', 'encoder.encoders.6.self_attn.linear_out.bias', 'encoder.encoders.6.feed_forward.w_1.weight', 'encoder.encoders.6.feed_forward.w_1.bias', 'encoder.encoders.6.feed_forward.w_2.weight', 'encoder.encoders.6.feed_forward.w_2.bias', 'encoder.encoders.6.norm1.weight', 'encoder.encoders.6.norm1.bias', 'encoder.encoders.6.norm2.weight', 'encoder.encoders.6.norm2.bias', 'encoder.encoders.7.self_attn.linear_q.weight', 'encoder.encoders.7.self_attn.linear_q.bias', 'encoder.encoders.7.self_attn.linear_k.weight', 'encoder.encoders.7.self_attn.linear_k.bias', 'encoder.encoders.7.self_attn.linear_v.weight', 'encoder.encoders.7.self_attn.linear_v.bias', 'encoder.encoders.7.self_attn.linear_out.weight', 'encoder.encoders.7.self_attn.linear_out.bias', 'encoder.encoders.7.feed_forward.w_1.weight', 'encoder.encoders.7.feed_forward.w_1.bias', 'encoder.encoders.7.feed_forward.w_2.weight', 'encoder.encoders.7.feed_forward.w_2.bias', 'encoder.encoders.7.norm1.weight', 'encoder.encoders.7.norm1.bias', 'encoder.encoders.7.norm2.weight', 'encoder.encoders.7.norm2.bias', 'encoder.encoders.8.self_attn.linear_q.weight', 'encoder.encoders.8.self_attn.linear_q.bias', 'encoder.encoders.8.self_attn.linear_k.weight', 'encoder.encoders.8.self_attn.linear_k.bias', 'encoder.encoders.8.self_attn.linear_v.weight', 'encoder.encoders.8.self_attn.linear_v.bias', 'encoder.encoders.8.self_attn.linear_out.weight', 'encoder.encoders.8.self_attn.linear_out.bias', 'encoder.encoders.8.feed_forward.w_1.weight', 'encoder.encoders.8.feed_forward.w_1.bias', 'encoder.encoders.8.feed_forward.w_2.weight', 'encoder.encoders.8.feed_forward.w_2.bias', 'encoder.encoders.8.norm1.weight', 'encoder.encoders.8.norm1.bias', 'encoder.encoders.8.norm2.weight', 'encoder.encoders.8.norm2.bias', 'encoder.encoders.9.self_attn.linear_q.weight', 'encoder.encoders.9.self_attn.linear_q.bias', 'encoder.encoders.9.self_attn.linear_k.weight', 'encoder.encoders.9.self_attn.linear_k.bias', 'encoder.encoders.9.self_attn.linear_v.weight', 'encoder.encoders.9.self_attn.linear_v.bias', 'encoder.encoders.9.self_attn.linear_out.weight', 'encoder.encoders.9.self_attn.linear_out.bias', 'encoder.encoders.9.feed_forward.w_1.weight', 'encoder.encoders.9.feed_forward.w_1.bias', 'encoder.encoders.9.feed_forward.w_2.weight', 'encoder.encoders.9.feed_forward.w_2.bias', 'encoder.encoders.9.norm1.weight', 'encoder.encoders.9.norm1.bias', 'encoder.encoders.9.norm2.weight', 'encoder.encoders.9.norm2.bias', 'encoder.encoders.10.self_attn.linear_q.weight', 'encoder.encoders.10.self_attn.linear_q.bias', 'encoder.encoders.10.self_attn.linear_k.weight', 'encoder.encoders.10.self_attn.linear_k.bias', 'encoder.encoders.10.self_attn.linear_v.weight', 'encoder.encoders.10.self_attn.linear_v.bias', 'encoder.encoders.10.self_attn.linear_out.weight', 'encoder.encoders.10.self_attn.linear_out.bias', 'encoder.encoders.10.feed_forward.w_1.weight', 'encoder.encoders.10.feed_forward.w_1.bias', 'encoder.encoders.10.feed_forward.w_2.weight', 'encoder.encoders.10.feed_forward.w_2.bias', 'encoder.encoders.10.norm1.weight', 'encoder.encoders.10.norm1.bias', 'encoder.encoders.10.norm2.weight', 'encoder.encoders.10.norm2.bias', 'encoder.encoders.11.self_attn.linear_q.weight', 'encoder.encoders.11.self_attn.linear_q.bias', 'encoder.encoders.11.self_attn.linear_k.weight', 'encoder.encoders.11.self_attn.linear_k.bias', 'encoder.encoders.11.self_attn.linear_v.weight', 'encoder.encoders.11.self_attn.linear_v.bias', 'encoder.encoders.11.self_attn.linear_out.weight', 'encoder.encoders.11.self_attn.linear_out.bias', 'encoder.encoders.11.feed_forward.w_1.weight', 'encoder.encoders.11.feed_forward.w_1.bias', 'encoder.encoders.11.feed_forward.w_2.weight', 'encoder.encoders.11.feed_forward.w_2.bias', 'encoder.encoders.11.norm1.weight', 'encoder.encoders.11.norm1.bias', 'encoder.encoders.11.norm2.weight', 'encoder.encoders.11.norm2.bias', 'encoder.after_norm.weight', 'encoder.after_norm.bias', 'decoder.embed.0.weight', 'decoder.decoders.0.self_attn.linear_q.weight', 'decoder.decoders.0.self_attn.linear_q.bias', 'decoder.decoders.0.self_attn.linear_k.weight', 'decoder.decoders.0.self_attn.linear_k.bias', 'decoder.decoders.0.self_attn.linear_v.weight', 'decoder.decoders.0.self_attn.linear_v.bias', 'decoder.decoders.0.self_attn.linear_out.weight', 'decoder.decoders.0.self_attn.linear_out.bias', 'decoder.decoders.0.src_attn.linear_q.weight', 'decoder.decoders.0.src_attn.linear_q.bias', 'decoder.decoders.0.src_attn.linear_k.weight', 'decoder.decoders.0.src_attn.linear_k.bias', 'decoder.decoders.0.src_attn.linear_v.weight', 'decoder.decoders.0.src_attn.linear_v.bias', 'decoder.decoders.0.src_attn.linear_out.weight', 'decoder.decoders.0.src_attn.linear_out.bias', 'decoder.decoders.0.feed_forward.w_1.weight', 'decoder.decoders.0.feed_forward.w_1.bias', 'decoder.decoders.0.feed_forward.w_2.weight', 'decoder.decoders.0.feed_forward.w_2.bias', 'decoder.decoders.0.norm1.weight', 'decoder.decoders.0.norm1.bias', 'decoder.decoders.0.norm2.weight', 'decoder.decoders.0.norm2.bias', 'decoder.decoders.0.norm3.weight', 'decoder.decoders.0.norm3.bias', 'decoder.after_norm.weight', 'decoder.after_norm.bias', 'decoder.output_layer.weight', 'decoder.output_layer.bias', 'sfc.weight', 'sfc.bias', 'deconv.0.weight', 'deconv.0.bias', 'deconv.1.weight', 'deconv.1.bias', 'xlm_embed.0.weight', 'xlm_pred.weight', 'xlm_pred.bias'])\n"
     ]
    }
   ],
   "source": [
    "#!pip install torch\n",
    "import torch\n",
    "\n",
    "e_model = np.load('.notebook/espnet/model.npz',allow_pickle=True)\n",
    "for k in e_model.files:\n",
    "    print(k)\n",
    "state_dict = e_model['state']\n",
    "state_dict = state_dict.tolist()\n",
    "print(state_dict.keys())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f187bb55",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.\n",
      "  and should_run_async(code)\n"
     ]
    }
   ],
   "source": [
    "# embed.conv.0.weight None torch.Size([256, 1, 3, 3]) \tencoder.embed.conv.0.weight | [256, 1, 3, 3] | 2304 | True\n",
    "# embed.conv.0.bias None torch.Size([256]) \tencoder.embed.conv.0.bias | [256] | 256 | True\n",
    "# embed.conv.2.weight None torch.Size([256, 256, 3, 3]) \tencoder.embed.conv.2.weight | [256, 256, 3, 3] | 589824 | True\n",
    "# embed.conv.2.bias None torch.Size([256]) \tencoder.embed.conv.2.bias | [256] | 256 | True\n",
    "# embed.out.0.weight None torch.Size([256, 5120]) 83 feature\tencoder.embed.out.0.weight | [4864, 256] | 1245184 | True 80 feature\n",
    "# embed.out.0.bias None torch.Size([256]) \tencoder.embed.out.0.bias | [256] | 256 | True\n",
    "# after_norm.weight None torch.Size([256]) \tencoder.after_norm.weight | [256] | 256 | True\n",
    "# after_norm.bias None torch.Size([256]) \tencoder.after_norm.bias | [256] | 256 | True\n",
    "# encoders.9.self_attn.linear_q.weight None torch.Size([256, 256]) \tencoder.encoders.0.self_attn.linear_q.weight | [256, 256] | 65536 | True\n",
    "# encoders.9.self_attn.linear_q.bias None torch.Size([256]) \tencoder.encoders.0.self_attn.linear_q.bias | [256] | 256 | True\n",
    "# encoders.9.self_attn.linear_k.weight None torch.Size([256, 256]) \tencoder.encoders.0.self_attn.linear_k.weight | [256, 256] | 65536 | True\n",
    "# encoders.9.self_attn.linear_k.bias None torch.Size([256]) \tencoder.encoders.0.self_attn.linear_k.bias | [256] | 256 | True\n",
    "# encoders.9.self_attn.linear_v.weight None torch.Size([256, 256]) \tencoder.encoders.0.self_attn.linear_v.weight | [256, 256] | 65536 | True\n",
    "# encoders.9.self_attn.linear_v.bias None torch.Size([256]) \tencoder.encoders.0.self_attn.linear_v.bias | [256] | 256 | True\n",
    "# encoders.9.self_attn.linear_out.weight None torch.Size([256, 256]) \tencoder.encoders.0.self_attn.linear_out.weight | [256, 256] | 65536 | True\n",
    "# encoders.9.self_attn.linear_out.bias None torch.Size([256]) \tencoder.encoders.0.self_attn.linear_out.bias | [256] | 256 | True\n",
    "# encoders.9.feed_forward.w_1.weight None torch.Size([2048, 256]) \tencoder.encoders.0.feed_forward.w_1.weight | [256, 2048] | 524288 | True\n",
    "# encoders.9.feed_forward.w_1.bias None torch.Size([2048]) \tencoder.encoders.0.feed_forward.w_1.bias | [2048] | 2048 | True\n",
    "# encoders.9.feed_forward.w_2.weight None torch.Size([256, 2048]) \tencoder.encoders.0.feed_forward.w_2.weight | [2048, 256] | 524288 | True\n",
    "# encoders.9.feed_forward.w_2.bias None torch.Size([256]) \tencoder.encoders.0.feed_forward.w_2.bias | [256] | 256 | True\n",
    "# encoders.9.norm1.weight None torch.Size([256]) \tencoder.encoders.0.norm1.weight | [256] | 256 | True\n",
    "# encoders.9.norm1.bias None torch.Size([256]) \tencoder.encoders.0.norm1.bias | [256] | 256 | True\n",
    "# encoders.9.norm2.weight None torch.Size([256]) \tencoder.encoders.0.norm2.weight | [256] | 256 | True\n",
    "# encoders.9.norm2.bias None torch.Size([256]) \tencoder.encoders.0.norm2.bias | [256] | 256 | True\n",
    "# \tencoder.encoders.0.concat_linear.weight | [512, 256] | 131072 | True\n",
    "# \tencoder.encoders.0.concat_linear.bias | [256] | 256 | True\n",
    "# espnet transformer\tconcat_linear只是保存了，但是未使用\n",
    "\t\n",
    "# \tpaddle transformer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "2a0428ae",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-> encoder.embed.conv.0.weight\n",
      "-> encoder.embed.conv.0.bias\n",
      "-> encoder.embed.conv.2.weight\n",
      "-> encoder.embed.conv.2.bias\n",
      "-> encoder.embed.out.0.weight\n",
      "encoder.embed.out.0.weight: (256, 5120) -> (5120, 256)\n",
      "-> encoder.embed.out.0.bias\n",
      "-> encoder.encoders.0.self_attn.linear_q.weight\n",
      "encoder.encoders.0.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.0.self_attn.linear_q.bias\n",
      "-> encoder.encoders.0.self_attn.linear_k.weight\n",
      "encoder.encoders.0.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.0.self_attn.linear_k.bias\n",
      "-> encoder.encoders.0.self_attn.linear_v.weight\n",
      "encoder.encoders.0.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.0.self_attn.linear_v.bias\n",
      "-> encoder.encoders.0.self_attn.linear_out.weight\n",
      "encoder.encoders.0.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.0.self_attn.linear_out.bias\n",
      "-> encoder.encoders.0.feed_forward.w_1.weight\n",
      "encoder.encoders.0.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.0.feed_forward.w_1.bias\n",
      "-> encoder.encoders.0.feed_forward.w_2.weight\n",
      "encoder.encoders.0.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.0.feed_forward.w_2.bias\n",
      "-> encoder.encoders.0.norm1.weight\n",
      "-> encoder.encoders.0.norm1.bias\n",
      "-> encoder.encoders.0.norm2.weight\n",
      "-> encoder.encoders.0.norm2.bias\n",
      "-> encoder.encoders.1.self_attn.linear_q.weight\n",
      "encoder.encoders.1.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.1.self_attn.linear_q.bias\n",
      "-> encoder.encoders.1.self_attn.linear_k.weight\n",
      "encoder.encoders.1.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.1.self_attn.linear_k.bias\n",
      "-> encoder.encoders.1.self_attn.linear_v.weight\n",
      "encoder.encoders.1.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.1.self_attn.linear_v.bias\n",
      "-> encoder.encoders.1.self_attn.linear_out.weight\n",
      "encoder.encoders.1.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.1.self_attn.linear_out.bias\n",
      "-> encoder.encoders.1.feed_forward.w_1.weight\n",
      "encoder.encoders.1.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.1.feed_forward.w_1.bias\n",
      "-> encoder.encoders.1.feed_forward.w_2.weight\n",
      "encoder.encoders.1.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.1.feed_forward.w_2.bias\n",
      "-> encoder.encoders.1.norm1.weight\n",
      "-> encoder.encoders.1.norm1.bias\n",
      "-> encoder.encoders.1.norm2.weight\n",
      "-> encoder.encoders.1.norm2.bias\n",
      "-> encoder.encoders.2.self_attn.linear_q.weight\n",
      "encoder.encoders.2.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.2.self_attn.linear_q.bias\n",
      "-> encoder.encoders.2.self_attn.linear_k.weight\n",
      "encoder.encoders.2.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.2.self_attn.linear_k.bias\n",
      "-> encoder.encoders.2.self_attn.linear_v.weight\n",
      "encoder.encoders.2.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.2.self_attn.linear_v.bias\n",
      "-> encoder.encoders.2.self_attn.linear_out.weight\n",
      "encoder.encoders.2.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.2.self_attn.linear_out.bias\n",
      "-> encoder.encoders.2.feed_forward.w_1.weight\n",
      "encoder.encoders.2.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.2.feed_forward.w_1.bias\n",
      "-> encoder.encoders.2.feed_forward.w_2.weight\n",
      "encoder.encoders.2.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.2.feed_forward.w_2.bias\n",
      "-> encoder.encoders.2.norm1.weight\n",
      "-> encoder.encoders.2.norm1.bias\n",
      "-> encoder.encoders.2.norm2.weight\n",
      "-> encoder.encoders.2.norm2.bias\n",
      "-> encoder.encoders.3.self_attn.linear_q.weight\n",
      "encoder.encoders.3.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.3.self_attn.linear_q.bias\n",
      "-> encoder.encoders.3.self_attn.linear_k.weight\n",
      "encoder.encoders.3.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.3.self_attn.linear_k.bias\n",
      "-> encoder.encoders.3.self_attn.linear_v.weight\n",
      "encoder.encoders.3.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.3.self_attn.linear_v.bias\n",
      "-> encoder.encoders.3.self_attn.linear_out.weight\n",
      "encoder.encoders.3.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.3.self_attn.linear_out.bias\n",
      "-> encoder.encoders.3.feed_forward.w_1.weight\n",
      "encoder.encoders.3.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.3.feed_forward.w_1.bias\n",
      "-> encoder.encoders.3.feed_forward.w_2.weight\n",
      "encoder.encoders.3.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.3.feed_forward.w_2.bias\n",
      "-> encoder.encoders.3.norm1.weight\n",
      "-> encoder.encoders.3.norm1.bias\n",
      "-> encoder.encoders.3.norm2.weight\n",
      "-> encoder.encoders.3.norm2.bias\n",
      "-> encoder.encoders.4.self_attn.linear_q.weight\n",
      "encoder.encoders.4.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.4.self_attn.linear_q.bias\n",
      "-> encoder.encoders.4.self_attn.linear_k.weight\n",
      "encoder.encoders.4.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.4.self_attn.linear_k.bias\n",
      "-> encoder.encoders.4.self_attn.linear_v.weight\n",
      "encoder.encoders.4.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.4.self_attn.linear_v.bias\n",
      "-> encoder.encoders.4.self_attn.linear_out.weight\n",
      "encoder.encoders.4.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.4.self_attn.linear_out.bias\n",
      "-> encoder.encoders.4.feed_forward.w_1.weight\n",
      "encoder.encoders.4.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.4.feed_forward.w_1.bias\n",
      "-> encoder.encoders.4.feed_forward.w_2.weight\n",
      "encoder.encoders.4.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.4.feed_forward.w_2.bias\n",
      "-> encoder.encoders.4.norm1.weight\n",
      "-> encoder.encoders.4.norm1.bias\n",
      "-> encoder.encoders.4.norm2.weight\n",
      "-> encoder.encoders.4.norm2.bias\n",
      "-> encoder.encoders.5.self_attn.linear_q.weight\n",
      "encoder.encoders.5.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.5.self_attn.linear_q.bias\n",
      "-> encoder.encoders.5.self_attn.linear_k.weight\n",
      "encoder.encoders.5.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.5.self_attn.linear_k.bias\n",
      "-> encoder.encoders.5.self_attn.linear_v.weight\n",
      "encoder.encoders.5.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.5.self_attn.linear_v.bias\n",
      "-> encoder.encoders.5.self_attn.linear_out.weight\n",
      "encoder.encoders.5.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.5.self_attn.linear_out.bias\n",
      "-> encoder.encoders.5.feed_forward.w_1.weight\n",
      "encoder.encoders.5.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.5.feed_forward.w_1.bias\n",
      "-> encoder.encoders.5.feed_forward.w_2.weight\n",
      "encoder.encoders.5.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.5.feed_forward.w_2.bias\n",
      "-> encoder.encoders.5.norm1.weight\n",
      "-> encoder.encoders.5.norm1.bias\n",
      "-> encoder.encoders.5.norm2.weight\n",
      "-> encoder.encoders.5.norm2.bias\n",
      "-> encoder.encoders.6.self_attn.linear_q.weight\n",
      "encoder.encoders.6.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.6.self_attn.linear_q.bias\n",
      "-> encoder.encoders.6.self_attn.linear_k.weight\n",
      "encoder.encoders.6.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.6.self_attn.linear_k.bias\n",
      "-> encoder.encoders.6.self_attn.linear_v.weight\n",
      "encoder.encoders.6.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.6.self_attn.linear_v.bias\n",
      "-> encoder.encoders.6.self_attn.linear_out.weight\n",
      "encoder.encoders.6.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.6.self_attn.linear_out.bias\n",
      "-> encoder.encoders.6.feed_forward.w_1.weight\n",
      "encoder.encoders.6.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.6.feed_forward.w_1.bias\n",
      "-> encoder.encoders.6.feed_forward.w_2.weight\n",
      "encoder.encoders.6.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.6.feed_forward.w_2.bias\n",
      "-> encoder.encoders.6.norm1.weight\n",
      "-> encoder.encoders.6.norm1.bias\n",
      "-> encoder.encoders.6.norm2.weight\n",
      "-> encoder.encoders.6.norm2.bias\n",
      "-> encoder.encoders.7.self_attn.linear_q.weight\n",
      "encoder.encoders.7.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.7.self_attn.linear_q.bias\n",
      "-> encoder.encoders.7.self_attn.linear_k.weight\n",
      "encoder.encoders.7.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.7.self_attn.linear_k.bias\n",
      "-> encoder.encoders.7.self_attn.linear_v.weight\n",
      "encoder.encoders.7.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.7.self_attn.linear_v.bias\n",
      "-> encoder.encoders.7.self_attn.linear_out.weight\n",
      "encoder.encoders.7.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.7.self_attn.linear_out.bias\n",
      "-> encoder.encoders.7.feed_forward.w_1.weight\n",
      "encoder.encoders.7.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.7.feed_forward.w_1.bias\n",
      "-> encoder.encoders.7.feed_forward.w_2.weight\n",
      "encoder.encoders.7.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.7.feed_forward.w_2.bias\n",
      "-> encoder.encoders.7.norm1.weight\n",
      "-> encoder.encoders.7.norm1.bias\n",
      "-> encoder.encoders.7.norm2.weight\n",
      "-> encoder.encoders.7.norm2.bias\n",
      "-> encoder.encoders.8.self_attn.linear_q.weight\n",
      "encoder.encoders.8.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.8.self_attn.linear_q.bias\n",
      "-> encoder.encoders.8.self_attn.linear_k.weight\n",
      "encoder.encoders.8.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.8.self_attn.linear_k.bias\n",
      "-> encoder.encoders.8.self_attn.linear_v.weight\n",
      "encoder.encoders.8.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.8.self_attn.linear_v.bias\n",
      "-> encoder.encoders.8.self_attn.linear_out.weight\n",
      "encoder.encoders.8.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.8.self_attn.linear_out.bias\n",
      "-> encoder.encoders.8.feed_forward.w_1.weight\n",
      "encoder.encoders.8.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.8.feed_forward.w_1.bias\n",
      "-> encoder.encoders.8.feed_forward.w_2.weight\n",
      "encoder.encoders.8.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.8.feed_forward.w_2.bias\n",
      "-> encoder.encoders.8.norm1.weight\n",
      "-> encoder.encoders.8.norm1.bias\n",
      "-> encoder.encoders.8.norm2.weight\n",
      "-> encoder.encoders.8.norm2.bias\n",
      "-> encoder.encoders.9.self_attn.linear_q.weight\n",
      "encoder.encoders.9.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.9.self_attn.linear_q.bias\n",
      "-> encoder.encoders.9.self_attn.linear_k.weight\n",
      "encoder.encoders.9.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.9.self_attn.linear_k.bias\n",
      "-> encoder.encoders.9.self_attn.linear_v.weight\n",
      "encoder.encoders.9.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.9.self_attn.linear_v.bias\n",
      "-> encoder.encoders.9.self_attn.linear_out.weight\n",
      "encoder.encoders.9.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.9.self_attn.linear_out.bias\n",
      "-> encoder.encoders.9.feed_forward.w_1.weight\n",
      "encoder.encoders.9.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.9.feed_forward.w_1.bias\n",
      "-> encoder.encoders.9.feed_forward.w_2.weight\n",
      "encoder.encoders.9.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.9.feed_forward.w_2.bias\n",
      "-> encoder.encoders.9.norm1.weight\n",
      "-> encoder.encoders.9.norm1.bias\n",
      "-> encoder.encoders.9.norm2.weight\n",
      "-> encoder.encoders.9.norm2.bias\n",
      "-> encoder.encoders.10.self_attn.linear_q.weight\n",
      "encoder.encoders.10.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.10.self_attn.linear_q.bias\n",
      "-> encoder.encoders.10.self_attn.linear_k.weight\n",
      "encoder.encoders.10.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.10.self_attn.linear_k.bias\n",
      "-> encoder.encoders.10.self_attn.linear_v.weight\n",
      "encoder.encoders.10.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.10.self_attn.linear_v.bias\n",
      "-> encoder.encoders.10.self_attn.linear_out.weight\n",
      "encoder.encoders.10.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.10.self_attn.linear_out.bias\n",
      "-> encoder.encoders.10.feed_forward.w_1.weight\n",
      "encoder.encoders.10.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.10.feed_forward.w_1.bias\n",
      "-> encoder.encoders.10.feed_forward.w_2.weight\n",
      "encoder.encoders.10.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.10.feed_forward.w_2.bias\n",
      "-> encoder.encoders.10.norm1.weight\n",
      "-> encoder.encoders.10.norm1.bias\n",
      "-> encoder.encoders.10.norm2.weight\n",
      "-> encoder.encoders.10.norm2.bias\n",
      "-> encoder.encoders.11.self_attn.linear_q.weight\n",
      "encoder.encoders.11.self_attn.linear_q.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.11.self_attn.linear_q.bias\n",
      "-> encoder.encoders.11.self_attn.linear_k.weight\n",
      "encoder.encoders.11.self_attn.linear_k.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.11.self_attn.linear_k.bias\n",
      "-> encoder.encoders.11.self_attn.linear_v.weight\n",
      "encoder.encoders.11.self_attn.linear_v.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.11.self_attn.linear_v.bias\n",
      "-> encoder.encoders.11.self_attn.linear_out.weight\n",
      "encoder.encoders.11.self_attn.linear_out.weight: (256, 256) -> (256, 256)\n",
      "-> encoder.encoders.11.self_attn.linear_out.bias\n",
      "-> encoder.encoders.11.feed_forward.w_1.weight\n",
      "encoder.encoders.11.feed_forward.w_1.weight: (2048, 256) -> (256, 2048)\n",
      "-> encoder.encoders.11.feed_forward.w_1.bias\n",
      "-> encoder.encoders.11.feed_forward.w_2.weight\n",
      "encoder.encoders.11.feed_forward.w_2.weight: (256, 2048) -> (2048, 256)\n",
      "-> encoder.encoders.11.feed_forward.w_2.bias\n",
      "-> encoder.encoders.11.norm1.weight\n",
      "-> encoder.encoders.11.norm1.bias\n",
      "-> encoder.encoders.11.norm2.weight\n",
      "-> encoder.encoders.11.norm2.bias\n",
      "-> encoder.after_norm.weight\n",
      "-> encoder.after_norm.bias\n"
     ]
    }
   ],
   "source": [
    "# dump torch model to paddle\n",
    "#state_dict = model.state_dict()\n",
    "paddle_state_dict = {}\n",
    "\n",
    "for n, p in state_dict.items():\n",
    "    if 'encoder' not in n:\n",
    "        continue \n",
    "    print(f'-> {n}')\n",
    "    \n",
    "    \n",
    "    name_change=True\n",
    "    if 'norm.running_mean' in n:\n",
    "        new_n = n.replace('norm.running_', 'norm._')\n",
    "    elif 'norm.running_var' in n:\n",
    "        new_n = n.replace('norm.running_var', 'norm._variance')\n",
    "    else:\n",
    "        name_change=False\n",
    "        new_n = n\n",
    "    if name_change:\n",
    "        print(f\"{n} -> {new_n}\")\n",
    "        \n",
    "        \n",
    "    p = p.cpu().detach().numpy()\n",
    "    if n.endswith('weight') and p.ndim == 2:\n",
    "        new_p = p.T\n",
    "        print(f\"{n}: {p.shape} -> {new_p.shape}\")\n",
    "    else:\n",
    "        new_p = p\n",
    "        \n",
    "    if 'global_cmvn.mean' in n:\n",
    "        print(p, p.dtype)\n",
    "        \n",
    "    paddle_state_dict[new_n] = new_p\n",
    "    \n",
    "# np.savez('/workspace/DeepSpeech-2.x/.notebook/model',\n",
    "#        state=paddle_state_dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "a1d97e9f",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.0.concat_linear.weight. encoder.encoders.0.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.0.concat_linear.bias. encoder.encoders.0.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.1.concat_linear.weight. encoder.encoders.1.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.1.concat_linear.bias. encoder.encoders.1.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.2.concat_linear.weight. encoder.encoders.2.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.2.concat_linear.bias. encoder.encoders.2.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.3.concat_linear.weight. encoder.encoders.3.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.3.concat_linear.bias. encoder.encoders.3.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.4.concat_linear.weight. encoder.encoders.4.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.4.concat_linear.bias. encoder.encoders.4.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.5.concat_linear.weight. encoder.encoders.5.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.5.concat_linear.bias. encoder.encoders.5.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.6.concat_linear.weight. encoder.encoders.6.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.6.concat_linear.bias. encoder.encoders.6.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.7.concat_linear.weight. encoder.encoders.7.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.7.concat_linear.bias. encoder.encoders.7.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.8.concat_linear.weight. encoder.encoders.8.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.8.concat_linear.bias. encoder.encoders.8.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.9.concat_linear.weight. encoder.encoders.9.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.9.concat_linear.bias. encoder.encoders.9.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.10.concat_linear.weight. encoder.encoders.10.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.10.concat_linear.bias. encoder.encoders.10.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.11.concat_linear.weight. encoder.encoders.11.concat_linear.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for encoder.encoders.11.concat_linear.bias. encoder.encoders.11.concat_linear.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.embed.0.weight. decoder.embed.0.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.after_norm.weight. decoder.after_norm.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.after_norm.bias. decoder.after_norm.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.output_layer.weight. decoder.output_layer.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.output_layer.bias. decoder.output_layer.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_q.weight. decoder.decoders.0.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_q.bias. decoder.decoders.0.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_k.weight. decoder.decoders.0.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_k.bias. decoder.decoders.0.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_v.weight. decoder.decoders.0.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_v.bias. decoder.decoders.0.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_out.weight. decoder.decoders.0.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.self_attn.linear_out.bias. decoder.decoders.0.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_q.weight. decoder.decoders.0.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_q.bias. decoder.decoders.0.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_k.weight. decoder.decoders.0.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_k.bias. decoder.decoders.0.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_v.weight. decoder.decoders.0.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_v.bias. decoder.decoders.0.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_out.weight. decoder.decoders.0.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.src_attn.linear_out.bias. decoder.decoders.0.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.feed_forward.w_1.weight. decoder.decoders.0.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.feed_forward.w_1.bias. decoder.decoders.0.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.feed_forward.w_2.weight. decoder.decoders.0.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.feed_forward.w_2.bias. decoder.decoders.0.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm1.weight. decoder.decoders.0.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm1.bias. decoder.decoders.0.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm2.weight. decoder.decoders.0.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm2.bias. decoder.decoders.0.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm3.weight. decoder.decoders.0.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.norm3.bias. decoder.decoders.0.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.concat_linear1.weight. decoder.decoders.0.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.concat_linear1.bias. decoder.decoders.0.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.concat_linear2.weight. decoder.decoders.0.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.0.concat_linear2.bias. decoder.decoders.0.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_q.weight. decoder.decoders.1.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_q.bias. decoder.decoders.1.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_k.weight. decoder.decoders.1.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_k.bias. decoder.decoders.1.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_v.weight. decoder.decoders.1.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_v.bias. decoder.decoders.1.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_out.weight. decoder.decoders.1.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.self_attn.linear_out.bias. decoder.decoders.1.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_q.weight. decoder.decoders.1.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_q.bias. decoder.decoders.1.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_k.weight. decoder.decoders.1.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_k.bias. decoder.decoders.1.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_v.weight. decoder.decoders.1.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_v.bias. decoder.decoders.1.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_out.weight. decoder.decoders.1.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.src_attn.linear_out.bias. decoder.decoders.1.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.feed_forward.w_1.weight. decoder.decoders.1.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.feed_forward.w_1.bias. decoder.decoders.1.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.feed_forward.w_2.weight. decoder.decoders.1.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.feed_forward.w_2.bias. decoder.decoders.1.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm1.weight. decoder.decoders.1.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm1.bias. decoder.decoders.1.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm2.weight. decoder.decoders.1.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm2.bias. decoder.decoders.1.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm3.weight. decoder.decoders.1.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.norm3.bias. decoder.decoders.1.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.concat_linear1.weight. decoder.decoders.1.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.concat_linear1.bias. decoder.decoders.1.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.concat_linear2.weight. decoder.decoders.1.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.1.concat_linear2.bias. decoder.decoders.1.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_q.weight. decoder.decoders.2.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_q.bias. decoder.decoders.2.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_k.weight. decoder.decoders.2.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_k.bias. decoder.decoders.2.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_v.weight. decoder.decoders.2.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_v.bias. decoder.decoders.2.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_out.weight. decoder.decoders.2.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.self_attn.linear_out.bias. decoder.decoders.2.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_q.weight. decoder.decoders.2.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_q.bias. decoder.decoders.2.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_k.weight. decoder.decoders.2.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_k.bias. decoder.decoders.2.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_v.weight. decoder.decoders.2.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_v.bias. decoder.decoders.2.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_out.weight. decoder.decoders.2.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.src_attn.linear_out.bias. decoder.decoders.2.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.feed_forward.w_1.weight. decoder.decoders.2.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.feed_forward.w_1.bias. decoder.decoders.2.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.feed_forward.w_2.weight. decoder.decoders.2.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.feed_forward.w_2.bias. decoder.decoders.2.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm1.weight. decoder.decoders.2.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm1.bias. decoder.decoders.2.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm2.weight. decoder.decoders.2.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm2.bias. decoder.decoders.2.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm3.weight. decoder.decoders.2.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.norm3.bias. decoder.decoders.2.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.concat_linear1.weight. decoder.decoders.2.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.concat_linear1.bias. decoder.decoders.2.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.concat_linear2.weight. decoder.decoders.2.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.2.concat_linear2.bias. decoder.decoders.2.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_q.weight. decoder.decoders.3.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_q.bias. decoder.decoders.3.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_k.weight. decoder.decoders.3.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_k.bias. decoder.decoders.3.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_v.weight. decoder.decoders.3.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_v.bias. decoder.decoders.3.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_out.weight. decoder.decoders.3.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.self_attn.linear_out.bias. decoder.decoders.3.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_q.weight. decoder.decoders.3.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_q.bias. decoder.decoders.3.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_k.weight. decoder.decoders.3.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_k.bias. decoder.decoders.3.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_v.weight. decoder.decoders.3.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_v.bias. decoder.decoders.3.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_out.weight. decoder.decoders.3.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.src_attn.linear_out.bias. decoder.decoders.3.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.feed_forward.w_1.weight. decoder.decoders.3.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.feed_forward.w_1.bias. decoder.decoders.3.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.feed_forward.w_2.weight. decoder.decoders.3.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.feed_forward.w_2.bias. decoder.decoders.3.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm1.weight. decoder.decoders.3.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm1.bias. decoder.decoders.3.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm2.weight. decoder.decoders.3.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm2.bias. decoder.decoders.3.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm3.weight. decoder.decoders.3.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.norm3.bias. decoder.decoders.3.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.concat_linear1.weight. decoder.decoders.3.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.concat_linear1.bias. decoder.decoders.3.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.concat_linear2.weight. decoder.decoders.3.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.3.concat_linear2.bias. decoder.decoders.3.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_q.weight. decoder.decoders.4.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_q.bias. decoder.decoders.4.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_k.weight. decoder.decoders.4.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_k.bias. decoder.decoders.4.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_v.weight. decoder.decoders.4.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_v.bias. decoder.decoders.4.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_out.weight. decoder.decoders.4.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.self_attn.linear_out.bias. decoder.decoders.4.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_q.weight. decoder.decoders.4.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_q.bias. decoder.decoders.4.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_k.weight. decoder.decoders.4.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_k.bias. decoder.decoders.4.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_v.weight. decoder.decoders.4.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_v.bias. decoder.decoders.4.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_out.weight. decoder.decoders.4.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.src_attn.linear_out.bias. decoder.decoders.4.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.feed_forward.w_1.weight. decoder.decoders.4.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.feed_forward.w_1.bias. decoder.decoders.4.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.feed_forward.w_2.weight. decoder.decoders.4.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.feed_forward.w_2.bias. decoder.decoders.4.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm1.weight. decoder.decoders.4.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm1.bias. decoder.decoders.4.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm2.weight. decoder.decoders.4.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm2.bias. decoder.decoders.4.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm3.weight. decoder.decoders.4.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.norm3.bias. decoder.decoders.4.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.concat_linear1.weight. decoder.decoders.4.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.concat_linear1.bias. decoder.decoders.4.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.concat_linear2.weight. decoder.decoders.4.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.4.concat_linear2.bias. decoder.decoders.4.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_q.weight. decoder.decoders.5.self_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_q.bias. decoder.decoders.5.self_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_k.weight. decoder.decoders.5.self_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_k.bias. decoder.decoders.5.self_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_v.weight. decoder.decoders.5.self_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_v.bias. decoder.decoders.5.self_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_out.weight. decoder.decoders.5.self_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.self_attn.linear_out.bias. decoder.decoders.5.self_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_q.weight. decoder.decoders.5.src_attn.linear_q.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_q.bias. decoder.decoders.5.src_attn.linear_q.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_k.weight. decoder.decoders.5.src_attn.linear_k.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_k.bias. decoder.decoders.5.src_attn.linear_k.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_v.weight. decoder.decoders.5.src_attn.linear_v.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_v.bias. decoder.decoders.5.src_attn.linear_v.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_out.weight. decoder.decoders.5.src_attn.linear_out.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.src_attn.linear_out.bias. decoder.decoders.5.src_attn.linear_out.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.feed_forward.w_1.weight. decoder.decoders.5.feed_forward.w_1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.feed_forward.w_1.bias. decoder.decoders.5.feed_forward.w_1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.feed_forward.w_2.weight. decoder.decoders.5.feed_forward.w_2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.feed_forward.w_2.bias. decoder.decoders.5.feed_forward.w_2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm1.weight. decoder.decoders.5.norm1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm1.bias. decoder.decoders.5.norm1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm2.weight. decoder.decoders.5.norm2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm2.bias. decoder.decoders.5.norm2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm3.weight. decoder.decoders.5.norm3.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.norm3.bias. decoder.decoders.5.norm3.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.concat_linear1.weight. decoder.decoders.5.concat_linear1.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.concat_linear1.bias. decoder.decoders.5.concat_linear1.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.concat_linear2.weight. decoder.decoders.5.concat_linear2.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for decoder.decoders.5.concat_linear2.bias. decoder.decoders.5.concat_linear2.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for ctc.ctc_lo.weight. ctc.ctc_lo.weight is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n",
      "/workspace/DeepSpeech-2.x/tools/venv-2p1/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py:1303: UserWarning: Skip loading for ctc.ctc_lo.bias. ctc.ctc_lo.bias is not found in the provided dict.\n",
      "  warnings.warn((\"Skip loading for {}. \".format(key) + str(err)))\n"
     ]
    }
   ],
   "source": [
    "model.set_state_dict(paddle_state_dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "fc7edf1e",
   "metadata": {},
   "outputs": [],
   "source": [
    "e_state = model.encoder.state_dict()\n",
    "for key, value in e_state.items():\n",
    "    if 'concat_linear' in key:\n",
    "        continue\n",
    "    if not np.allclose(value.numpy(), paddle_state_dict['encoder.' + key]):\n",
    "        print(key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "572097d0",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "748250b7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "91e5deee",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "fleet-despite",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "embed.npz    feat.npz  l1.npz   l11.npz  l3.npz  l5.npz  l7.npz  l9.npz\r\n",
      "encoder.npz  l0.npz    l10.npz  l2.npz   l4.npz  l6.npz  l8.npz  model.npz\r\n"
     ]
    }
   ],
   "source": [
    "%ls .notebook/espnet"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "abroad-oracle",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(8, 57, 83)\n",
      "(8, 1, 57)\n",
      "[57 50 48 38 32 31 28 25]\n"
     ]
    }
   ],
   "source": [
    "data = np.load('.notebook/espnet/feat.npz', allow_pickle=True)\n",
    "xs=data['xs']\n",
    "masks=data['masks']\n",
    "print(xs.shape)\n",
    "print(masks.shape)\n",
    "xs_lens = masks.sum(axis=-1).squeeze()\n",
    "print(xs_lens)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "false-instrument",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[8, 13, 256]\n",
      "[8, 1, 13]\n"
     ]
    }
   ],
   "source": [
    "# ecnoder\n",
    "xs = paddle.to_tensor(xs, dtype='float32')\n",
    "x_lens = paddle.to_tensor(xs_lens, dtype='int32')\n",
    "model.eval()\n",
    "encoder_out, encoder_mask = model.encoder(xs, x_lens)\n",
    "print(encoder_out.shape)\n",
    "print(encoder_mask.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "arctic-proxy",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(8, 13, 256)\n",
      "(8, 1, 13)\n",
      "False\n",
      "False\n",
      "True\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "data = np.load('.notebook/espnet/encoder.npz', allow_pickle=True)\n",
    "xs = data['xs']\n",
    "masks = data['masks']\n",
    "print(xs.shape)\n",
    "print(masks.shape)\n",
    "print(np.allclose(xs,  encoder_out.numpy()))\n",
    "print(np.allclose(xs,  encoder_out.numpy(), atol=1e-6))\n",
    "print(np.allclose(xs,  encoder_out.numpy(), atol=1e-5))\n",
    "print(np.allclose(masks, encoder_mask.numpy()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "seasonal-switch",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 2.1380312   1.8675405  -1.1873871  ... -0.30456656  0.56382173\n",
      "  -0.6526459 ]\n",
      " [ 2.1926146   2.1373641  -0.6548196  ... -0.897318    0.6044322\n",
      "  -0.63332295]\n",
      " [ 1.6367635   2.3320658  -0.8848577  ... -0.9640939   1.2420733\n",
      "  -0.05243584]\n",
      " ...\n",
      " [ 1.8533031   1.8421621  -0.6728406  ...  0.04810616  0.6459763\n",
      "  -0.18188554]\n",
      " [ 2.0894065   1.7813934  -1.1591585  ... -0.09513803  0.8321831\n",
      "  -0.72916794]\n",
      " [ 1.6488649   2.0984242  -1.3490562  ...  0.42678255  0.5903866\n",
      "  -0.32597935]]\n",
      "Tensor(shape=[13, 256], dtype=float32, place=CUDAPlace(0), stop_gradient=False,\n",
      "       [[ 2.13803196,  1.86753929, -1.18738675, ..., -0.30456796,  0.56382364, -0.65264463],\n",
      "        [ 2.19261336,  2.13736486, -0.65482187, ..., -0.89731705,  0.60443199, -0.63332343],\n",
      "        [ 1.63676369,  2.33206534, -0.88485885, ..., -0.96409231,  1.24207270, -0.05243752],\n",
      "        ...,\n",
      "        [ 1.85330284,  1.84216177, -0.67284071, ...,  0.04810715,  0.64597648, -0.18188696],\n",
      "        [ 2.08940673,  1.78139246, -1.15916038, ..., -0.09513779,  0.83218288, -0.72916913],\n",
      "        [ 1.64886570,  2.09842515, -1.34905660, ...,  0.42678308,  0.59038705, -0.32598034]])\n"
     ]
    }
   ],
   "source": [
    "print(xs[0])\n",
    "print(encoder_out[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "defined-brooks",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 2.209824    1.5208759   0.1417884  ... -0.73617566  1.6538682\n",
      "  -0.16355833]\n",
      " [ 2.1441019   1.4377339   0.3629197  ... -0.91226125  1.3739952\n",
      "   0.11874156]\n",
      " [ 1.8725398   1.5417286   0.38919652 ... -0.89621615  1.1841662\n",
      "   0.27621832]\n",
      " ...\n",
      " [ 2.4591084   0.7238764  -1.1456345  ... -0.24188249  0.8232168\n",
      "  -0.9794884 ]\n",
      " [ 2.5156236   1.1919155  -0.97032744 ... -0.7360675   1.0647209\n",
      "  -1.3076135 ]\n",
      " [ 2.160009    0.98425585 -1.2231126  ... -0.03393313  1.9141548\n",
      "  -1.0099151 ]]\n",
      "Tensor(shape=[13, 256], dtype=float32, place=CUDAPlace(0), stop_gradient=False,\n",
      "       [[ 2.20982409,  1.52087593,  0.14178854, ..., -0.73617446,  1.65386844, -0.16355731],\n",
      "        [ 2.14410043,  1.43773460,  0.36291891, ..., -0.91226172,  1.37399518,  0.11874183],\n",
      "        [ 1.87254059,  1.54172909,  0.38919681, ..., -0.89621687,  1.18416822,  0.27621880],\n",
      "        ...,\n",
      "        [ 2.45910931,  0.72387671, -1.14563596, ..., -0.24188218,  0.82321703, -0.97948682],\n",
      "        [ 2.51562238,  1.19191694, -0.97032893, ..., -0.73606837,  1.06472087, -1.30761123],\n",
      "        [ 2.16000915,  0.98425680, -1.22311163, ..., -0.03393326,  1.91415381, -1.00991392]])\n"
     ]
    }
   ],
   "source": [
    "print(xs[1])\n",
    "print(encoder_out[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0504e3f8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
