|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 1, |
| 5 | + "execution_count": 2, |
| 6 | + "metadata": {}, |
| 7 | + "outputs": [ |
| 8 | + { |
| 9 | + "name": "stdout", |
| 10 | + "output_type": "stream", |
| 11 | + "text": [ |
| 12 | + "Requirement already satisfied: tensorflow-gpu==2.2.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (2.2.0)\n", |
| 13 | + "Requirement already satisfied: tensorboard<2.3.0,>=2.2.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (2.2.2)\n", |
| 14 | + "Requirement already satisfied: keras-preprocessing>=1.1.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.1.2)\n", |
| 15 | + "Requirement already satisfied: wheel>=0.26; python_version >= \"3\" in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (0.34.2)\n", |
| 16 | + "Requirement already satisfied: h5py<2.11.0,>=2.10.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (2.10.0)\n", |
| 17 | + "Requirement already satisfied: astunparse==1.6.3 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.6.3)\n", |
| 18 | + "Requirement already satisfied: six>=1.12.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.15.0)\n", |
| 19 | + "Requirement already satisfied: google-pasta>=0.1.8 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (0.2.0)\n", |
| 20 | + "Requirement already satisfied: numpy<2.0,>=1.16.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.18.5)\n", |
| 21 | + "Requirement already satisfied: wrapt>=1.11.1 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.12.1)\n", |
| 22 | + "Requirement already satisfied: scipy==1.4.1; python_version >= \"3\" in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.4.1)\n", |
| 23 | + "Requirement already satisfied: opt-einsum>=2.3.2 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (3.3.0)\n", |
| 24 | + "Requirement already satisfied: protobuf>=3.8.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (3.12.2)\n", |
| 25 | + "Requirement already satisfied: termcolor>=1.1.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.1.0)\n", |
| 26 | + "Requirement already satisfied: absl-py>=0.7.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (0.9.0)\n", |
| 27 | + "Requirement already satisfied: grpcio>=1.8.6 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (1.30.0)\n", |
| 28 | + "Requirement already satisfied: gast==0.3.3 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (0.3.3)\n", |
| 29 | + "Requirement already satisfied: tensorflow-estimator<2.3.0,>=2.2.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorflow-gpu==2.2.0) (2.2.0)\n", |
| 30 | + "Requirement already satisfied: markdown>=2.6.8 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (3.2.2)\n", |
| 31 | + "Requirement already satisfied: google-auth<2,>=1.6.3 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.20.0)\n", |
| 32 | + "Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.7.0)\n", |
| 33 | + "Requirement already satisfied: werkzeug>=0.11.15 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.0.1)\n", |
| 34 | + "Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (0.4.1)\n", |
| 35 | + "Requirement already satisfied: setuptools>=41.0.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (49.2.0.post20200714)\n", |
| 36 | + "Requirement already satisfied: requests<3,>=2.21.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (2.24.0)\n", |
| 37 | + "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.7.0)\n", |
| 38 | + "Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (0.2.8)\n", |
| 39 | + "Requirement already satisfied: cachetools<5.0,>=2.0.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (4.1.1)\n", |
| 40 | + "Requirement already satisfied: rsa<5,>=3.1.4; python_version >= \"3.5\" in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (4.6)\n", |
| 41 | + "Requirement already satisfied: requests-oauthlib>=0.7.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.3.0)\n", |
| 42 | + "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (1.25.10)\n", |
| 43 | + "Requirement already satisfied: idna<3,>=2.5 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (2.10)\n", |
| 44 | + "Requirement already satisfied: chardet<4,>=3.0.2 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (3.0.4)\n", |
| 45 | + "Requirement already satisfied: certifi>=2017.4.17 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (2020.6.20)\n", |
| 46 | + "Requirement already satisfied: zipp>=0.5 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (3.1.0)\n", |
| 47 | + "Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (0.4.8)\n", |
| 48 | + "Requirement already satisfied: oauthlib>=3.0.0 in /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu==2.2.0) (3.1.0)\n" |
| 49 | + ] |
| 50 | + } |
| 51 | + ], |
| 52 | + "source": [ |
| 53 | + "## tensorflow-gpu==2.3.0 bug to load_weight after call inference\n", |
| 54 | + "!pip install tensorflow-gpu==2.2.0" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "code", |
| 59 | + "execution_count": 3, |
6 | 60 | "metadata": {}, |
7 | 61 | "outputs": [], |
8 | 62 | "source": [ |
|
12 | 66 | "\n", |
13 | 67 | "import tensorflow as tf\n", |
14 | 68 | "\n", |
15 | | - "from tensorflow_tts.configs import MultiBandMelGANGeneratorConfig\n", |
16 | | - "\n", |
17 | 69 | "from tensorflow_tts.inference import AutoConfig\n", |
18 | 70 | "from tensorflow_tts.inference import TFAutoModel" |
19 | 71 | ] |
20 | 72 | }, |
21 | 73 | { |
22 | 74 | "cell_type": "code", |
23 | | - "execution_count": 2, |
| 75 | + "execution_count": 4, |
24 | 76 | "metadata": {}, |
25 | 77 | "outputs": [], |
26 | 78 | "source": [ |
|
35 | 87 | }, |
36 | 88 | { |
37 | 89 | "cell_type": "code", |
38 | | - "execution_count": 3, |
| 90 | + "execution_count": 5, |
39 | 91 | "metadata": {}, |
40 | 92 | "outputs": [], |
41 | 93 | "source": [ |
|
44 | 96 | }, |
45 | 97 | { |
46 | 98 | "cell_type": "code", |
47 | | - "execution_count": 4, |
| 99 | + "execution_count": 6, |
48 | 100 | "metadata": {}, |
49 | 101 | "outputs": [], |
50 | 102 | "source": [ |
|
53 | 105 | }, |
54 | 106 | { |
55 | 107 | "cell_type": "code", |
56 | | - "execution_count": 5, |
| 108 | + "execution_count": 7, |
57 | 109 | "metadata": {}, |
58 | 110 | "outputs": [], |
59 | 111 | "source": [ |
60 | | - "mb_melgan.load_weights(\"../examples/multiband_melgan/checkpoints/generator-940000.h5\")" |
| 112 | + "mb_melgan.load_weights(\"../examples/multiband_melgan/checkpoints/mb_melgan.v1-940K.h5\")" |
61 | 113 | ] |
62 | 114 | }, |
63 | 115 | { |
|
69 | 121 | }, |
70 | 122 | { |
71 | 123 | "cell_type": "code", |
72 | | - "execution_count": 6, |
| 124 | + "execution_count": 8, |
73 | 125 | "metadata": {}, |
74 | 126 | "outputs": [ |
75 | 127 | { |
76 | 128 | "name": "stdout", |
77 | 129 | "output_type": "stream", |
78 | 130 | "text": [ |
79 | | - "WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow_tts.models.melgan.TFMelGANGenerator object at 0x7f6088419850>, because it is not built.\n", |
| 131 | + "WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow_tts.models.mb_melgan.TFMBMelGANGenerator object at 0x7fcd99f163d0>, because it is not built.\n", |
| 132 | + "WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow_tts.models.mb_melgan.TFPQMF object at 0x7fcd99c16710>, because it is not built.\n", |
80 | 133 | "WARNING:tensorflow:From /home/lap13548/anaconda3/envs/tensorflow-tts/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py:1817: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.\n", |
81 | 134 | "Instructions for updating:\n", |
82 | 135 | "If using Keras pass *_constraint arguments to layers.\n", |
|
97 | 150 | }, |
98 | 151 | { |
99 | 152 | "cell_type": "code", |
100 | | - "execution_count": 7, |
| 153 | + "execution_count": 9, |
101 | 154 | "metadata": {}, |
102 | 155 | "outputs": [], |
103 | 156 | "source": [ |
|
0 commit comments