From b58edb583efa878884f54fe87fc6fbf5fd49646a Mon Sep 17 00:00:00 2001 From: root Date: Sun, 29 May 2022 23:12:00 -0600 Subject: [PATCH] tf keras, silence warn --- notebooks/wut-web-beta.ipynb | 43 +++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/notebooks/wut-web-beta.ipynb b/notebooks/wut-web-beta.ipynb index ed6b173..6aaa16d 100644 --- a/notebooks/wut-web-beta.ipynb +++ b/notebooks/wut-web-beta.ipynb @@ -13,10 +13,34 @@ "# GPLv3+\n", "\n", "#from collections import defaultdict\n", - "#import PIL as pil\n", - "\n", + "#import PIL as pil" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "import json\n", - "import os\n", "import random\n", "import tempfile\n", "import shutil\n", @@ -26,8 +50,17 @@ "from IPython.display import display, Image\n", "from IPython.utils import text\n", "from PIL import Image as im\n", - "from keras.models import load_model\n", - "from keras.preprocessing.image import ImageDataGenerator" + "from tensorflow.keras.models import load_model\n", + "from tensorflow.keras.preprocessing.image import ImageDataGenerator" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "tf.get_logger().setLevel('ERROR')" ] }, {