{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "LSTM与attention进行中文文本分类.ipynb",
      "provenance": [],
      "collapsed_sections": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "metadata": {
        "id": "53Jw1JQnETe_",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 122
        },
        "outputId": "4fb8b69d-7b42-4767-e3b7-07a4dee40c65"
      },
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly&response_type=code\n",
            "\n",
            "Enter your authorization code:\n",
            "··········\n",
            "Mounted at /content/drive\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "uklyIuuvcpq5",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 649
        },
        "outputId": "a39b6f0d-64c2-4cae-c36a-2d0dd586ca7e"
      },
      "source": [
        "!pip install tensorflow==1.3\n"
      ],
      "execution_count": 17,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Collecting tensorflow==1.3\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/7c/9f/57e1404fc9345759e4a732c4ab48ab4dd78fd1e60ee1270442b8850fa75f/tensorflow-1.3.0-cp36-cp36m-manylinux1_x86_64.whl (43.5MB)\n",
            "\u001b[K     |████████████████████████████████| 43.6MB 95kB/s \n",
            "\u001b[?25hCollecting tensorflow-tensorboard<0.2.0,>=0.1.0\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/93/31/bb4111c3141d22bd7b2b553a26aa0c1863c86cb723919e5bd7847b3de4fc/tensorflow_tensorboard-0.1.8-py3-none-any.whl (1.6MB)\n",
            "\u001b[K     |████████████████████████████████| 1.6MB 41.4MB/s \n",
            "\u001b[?25hRequirement already satisfied: protobuf>=3.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.3) (3.12.4)\n",
            "Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.3) (1.18.5)\n",
            "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.3) (1.15.0)\n",
            "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow==1.3) (0.34.2)\n",
            "Requirement already satisfied: werkzeug>=0.11.10 in /usr/local/lib/python3.6/dist-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3) (1.0.1)\n",
            "Collecting bleach==1.5.0\n",
            "  Downloading https://files.pythonhosted.org/packages/33/70/86c5fec937ea4964184d4d6c4f0b9551564f821e1c3575907639036d9b90/bleach-1.5.0-py2.py3-none-any.whl\n",
            "Collecting html5lib==0.9999999\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/ae/ae/bcb60402c60932b32dfaf19bb53870b29eda2cd17551ba5639219fb5ebf9/html5lib-0.9999999.tar.gz (889kB)\n",
            "\u001b[K     |████████████████████████████████| 890kB 45.9MB/s \n",
            "\u001b[?25hRequirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3) (3.2.2)\n",
            "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.3.0->tensorflow==1.3) (49.2.0)\n",
            "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3) (1.7.0)\n",
            "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow==1.3) (3.1.0)\n",
            "Building wheels for collected packages: html5lib\n",
            "  Building wheel for html5lib (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Created wheel for html5lib: filename=html5lib-0.9999999-cp36-none-any.whl size=107220 sha256=19b1273a67227391a0b851186cbb3b88742ee0af60e76d7fc3b63e4cf1e43c81\n",
            "  Stored in directory: /root/.cache/pip/wheels/50/ae/f9/d2b189788efcf61d1ee0e36045476735c838898eef1cad6e29\n",
            "Successfully built html5lib\n",
            "Installing collected packages: html5lib, bleach, tensorflow-tensorboard, tensorflow\n",
            "  Found existing installation: html5lib 1.0.1\n",
            "    Uninstalling html5lib-1.0.1:\n",
            "      Successfully uninstalled html5lib-1.0.1\n",
            "  Found existing installation: bleach 3.1.5\n",
            "    Uninstalling bleach-3.1.5:\n",
            "      Successfully uninstalled bleach-3.1.5\n",
            "  Found existing installation: tensorflow 2.3.0\n",
            "    Uninstalling tensorflow-2.3.0:\n",
            "      Successfully uninstalled tensorflow-2.3.0\n",
            "Successfully installed bleach-1.5.0 html5lib-0.9999999 tensorflow-1.3.0 tensorflow-tensorboard-0.1.8\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6AtULXYMD9Zw",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 119
        },
        "outputId": "1c3ae07c-3850-45c0-d847-90c0000d1ad2"
      },
      "source": [
        "!git clone https://github.com/cjymz886/text_rnn_attention.git"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Cloning into 'text_rnn_attention'...\n",
            "remote: Enumerating objects: 6, done.\u001b[K\n",
            "remote: Counting objects: 100% (6/6), done.\u001b[K\n",
            "remote: Compressing objects: 100% (6/6), done.\u001b[K\n",
            "remote: Total 80 (delta 2), reused 0 (delta 0), pack-reused 74\u001b[K\n",
            "Unpacking objects: 100% (80/80), done.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "um0_qa09EgNp",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "data = open('/content/drive/My Drive/推荐系统课程/Mysql_课件/待抽取关键词文本数据.txt', encoding='utf-8')\n",
        "lines = data.readlines()\n"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "r6o6fFklXjUP",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "from sklearn.model_selection import train_test_split"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Aal4byroXmlH",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "train, test = train_test_split(lines, test_size=0.2, random_state=42)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "xIwplT8XYTNK",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "train, val = train_test_split(train, test_size=0.2, random_state=42)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "M517Bh8YYYW9",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        },
        "outputId": "01438039-64d1-498d-c461-c815f4bfcda9"
      },
      "source": [
        "print(len(train), len(test), len(val))"
      ],
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "6400 2000 1600\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "wOqYjXeeYa0j",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "with open('train.txt', 'w') as f:\n",
        "    for item in train:\n",
        "        f.write(\"%s\\n\" % item)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "p-a36lyKYuSX",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "with open('test.txt', 'w') as f:\n",
        "    for item in test:\n",
        "        f.write(\"%s\\n\" % item)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "myBzoWg5YyTi",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "with open('val.txt', 'w') as f:\n",
        "    for item in val:\n",
        "        f.write(\"%s\\n\" % item)"
      ],
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "TNPwpy7aY01y",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 51
        },
        "outputId": "49b8ca3e-ae91-4fdd-f8d5-689809509eac"
      },
      "source": [
        "%cd text_rnn_attention/"
      ],
      "execution_count": 15,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "[Errno 2] No such file or directory: 'text_rnn_attention/'\n",
            "/content/text_rnn_attention\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "1N15xGSbax2U",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "6f9f2fd2-5082-429c-9382-c50c0a45cb8f"
      },
      "source": [
        "!python train_word2vec.py"
      ],
      "execution_count": 14,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "2020-08-23 03:45:01.448581: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1\n",
            "2020-08-23 03:45:02,919 : INFO : collecting all words and their counts\n",
            "Building prefix dict from the default dictionary ...\n",
            "2020-08-23 03:45:02,919 : DEBUG : Building prefix dict from the default dictionary ...\n",
            "Dumping model to file cache /tmp/jieba.cache\n",
            "2020-08-23 03:45:03,740 : DEBUG : Dumping model to file cache /tmp/jieba.cache\n",
            "Loading model cost 0.891 seconds.\n",
            "2020-08-23 03:45:03,810 : DEBUG : Loading model cost 0.891 seconds.\n",
            "Prefix dict has been built successfully.\n",
            "2020-08-23 03:45:03,810 : DEBUG : Prefix dict has been built successfully.\n",
            "2020-08-23 03:45:03,813 : INFO : PROGRESS: at sentence #0, processed 0 words, keeping 0 word types\n",
            "2020-08-23 03:45:46,198 : INFO : collected 150330 word types from a corpus of 4659776 raw words and 10000 sentences\n",
            "2020-08-23 03:45:46,199 : INFO : Loading a fresh vocabulary\n",
            "2020-08-23 03:45:46,643 : INFO : effective_min_count=1 retains 150330 unique words (100% of original 150330, drops 0)\n",
            "2020-08-23 03:45:46,643 : INFO : effective_min_count=1 leaves 4659776 word corpus (100% of original 4659776, drops 0)\n",
            "2020-08-23 03:45:47,113 : INFO : deleting the raw counts dictionary of 150330 items\n",
            "2020-08-23 03:45:47,117 : INFO : sample=0.001 downsamples 24 most-common words\n",
            "2020-08-23 03:45:47,117 : INFO : downsampling leaves estimated 4240911 word corpus (91.0% of prior 4659776)\n",
            "2020-08-23 03:45:47,618 : INFO : estimated required memory for 150330 words and 100 dimensions: 195429000 bytes\n",
            "2020-08-23 03:45:47,618 : INFO : resetting layer weights\n",
            "2020-08-23 03:46:15,402 : INFO : training model with 6 workers on 150330 vocabulary and 100 features, using sg=0 hs=0 sample=0.001 negative=5 window=5\n",
            "2020-08-23 03:46:16,480 : INFO : EPOCH 1 - PROGRESS: at 2.12% examples, 78538 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:17,550 : INFO : EPOCH 1 - PROGRESS: at 4.13% examples, 79857 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:18,632 : INFO : EPOCH 1 - PROGRESS: at 5.97% examples, 79995 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:19,641 : INFO : EPOCH 1 - PROGRESS: at 7.97% examples, 81440 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:20,668 : INFO : EPOCH 1 - PROGRESS: at 9.80% examples, 81962 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:21,696 : INFO : EPOCH 1 - PROGRESS: at 11.76% examples, 82741 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:22,762 : INFO : EPOCH 1 - PROGRESS: at 14.07% examples, 82739 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:23,834 : INFO : EPOCH 1 - PROGRESS: at 16.09% examples, 82745 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:24,849 : INFO : EPOCH 1 - PROGRESS: at 18.01% examples, 82869 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:25,864 : INFO : EPOCH 1 - PROGRESS: at 19.79% examples, 82904 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:26,907 : INFO : EPOCH 1 - PROGRESS: at 21.82% examples, 83122 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:27,979 : INFO : EPOCH 1 - PROGRESS: at 23.90% examples, 83111 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:29,021 : INFO : EPOCH 1 - PROGRESS: at 25.68% examples, 83039 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:30,120 : INFO : EPOCH 1 - PROGRESS: at 27.91% examples, 82885 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:31,196 : INFO : EPOCH 1 - PROGRESS: at 30.18% examples, 82884 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:32,269 : INFO : EPOCH 1 - PROGRESS: at 32.41% examples, 82804 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:33,308 : INFO : EPOCH 1 - PROGRESS: at 34.71% examples, 82841 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:34,407 : INFO : EPOCH 1 - PROGRESS: at 36.86% examples, 82802 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:35,480 : INFO : EPOCH 1 - PROGRESS: at 39.16% examples, 82823 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:36,537 : INFO : EPOCH 1 - PROGRESS: at 41.02% examples, 82856 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:37,568 : INFO : EPOCH 1 - PROGRESS: at 42.95% examples, 82824 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:38,611 : INFO : EPOCH 1 - PROGRESS: at 44.97% examples, 82869 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:39,665 : INFO : EPOCH 1 - PROGRESS: at 47.10% examples, 82874 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:40,716 : INFO : EPOCH 1 - PROGRESS: at 49.19% examples, 82788 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:41,841 : INFO : EPOCH 1 - PROGRESS: at 51.26% examples, 82748 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:42,874 : INFO : EPOCH 1 - PROGRESS: at 53.36% examples, 82788 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:43,962 : INFO : EPOCH 1 - PROGRESS: at 55.49% examples, 82747 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:45,029 : INFO : EPOCH 1 - PROGRESS: at 57.68% examples, 82783 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:46,050 : INFO : EPOCH 1 - PROGRESS: at 59.97% examples, 82861 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:47,058 : INFO : EPOCH 1 - PROGRESS: at 61.77% examples, 82856 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:48,126 : INFO : EPOCH 1 - PROGRESS: at 63.95% examples, 82790 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:49,200 : INFO : EPOCH 1 - PROGRESS: at 66.27% examples, 82772 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:50,252 : INFO : EPOCH 1 - PROGRESS: at 68.47% examples, 82786 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:51,316 : INFO : EPOCH 1 - PROGRESS: at 70.59% examples, 82765 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:52,393 : INFO : EPOCH 1 - PROGRESS: at 72.87% examples, 82768 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:53,460 : INFO : EPOCH 1 - PROGRESS: at 74.98% examples, 82725 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:54,502 : INFO : EPOCH 1 - PROGRESS: at 76.83% examples, 82758 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:55,605 : INFO : EPOCH 1 - PROGRESS: at 78.83% examples, 82775 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:56,670 : INFO : EPOCH 1 - PROGRESS: at 80.88% examples, 82815 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:57,707 : INFO : EPOCH 1 - PROGRESS: at 82.77% examples, 82840 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:58,788 : INFO : EPOCH 1 - PROGRESS: at 84.90% examples, 82816 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:46:59,863 : INFO : EPOCH 1 - PROGRESS: at 87.03% examples, 82809 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:00,909 : INFO : EPOCH 1 - PROGRESS: at 89.06% examples, 82834 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:01,935 : INFO : EPOCH 1 - PROGRESS: at 91.00% examples, 82806 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:02,977 : INFO : EPOCH 1 - PROGRESS: at 93.15% examples, 82825 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:04,009 : INFO : EPOCH 1 - PROGRESS: at 95.00% examples, 82850 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:05,087 : INFO : EPOCH 1 - PROGRESS: at 97.07% examples, 82844 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:06,150 : INFO : EPOCH 1 - PROGRESS: at 99.13% examples, 82841 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:06,563 : INFO : worker thread finished; awaiting finish of 5 more threads\n",
            "2020-08-23 03:47:06,564 : INFO : worker thread finished; awaiting finish of 4 more threads\n",
            "2020-08-23 03:47:06,564 : INFO : worker thread finished; awaiting finish of 3 more threads\n",
            "2020-08-23 03:47:06,564 : INFO : worker thread finished; awaiting finish of 2 more threads\n",
            "2020-08-23 03:47:06,574 : INFO : worker thread finished; awaiting finish of 1 more threads\n",
            "2020-08-23 03:47:06,578 : INFO : worker thread finished; awaiting finish of 0 more threads\n",
            "2020-08-23 03:47:06,578 : INFO : EPOCH - 1 : training on 4659776 raw words (4241334 effective words) took 51.2s, 82881 effective words/s\n",
            "2020-08-23 03:47:07,672 : INFO : EPOCH 2 - PROGRESS: at 2.12% examples, 77228 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:08,712 : INFO : EPOCH 2 - PROGRESS: at 4.13% examples, 80281 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:09,793 : INFO : EPOCH 2 - PROGRESS: at 5.97% examples, 80292 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:10,807 : INFO : EPOCH 2 - PROGRESS: at 7.97% examples, 81599 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:11,819 : INFO : EPOCH 2 - PROGRESS: at 9.80% examples, 82308 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:12,863 : INFO : EPOCH 2 - PROGRESS: at 11.76% examples, 82818 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:13,934 : INFO : EPOCH 2 - PROGRESS: at 14.07% examples, 82746 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:15,019 : INFO : EPOCH 2 - PROGRESS: at 16.09% examples, 82613 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:16,038 : INFO : EPOCH 2 - PROGRESS: at 18.01% examples, 82725 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:17,050 : INFO : EPOCH 2 - PROGRESS: at 19.79% examples, 82786 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:18,124 : INFO : EPOCH 2 - PROGRESS: at 21.82% examples, 82785 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:19,181 : INFO : EPOCH 2 - PROGRESS: at 23.90% examples, 82898 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:20,240 : INFO : EPOCH 2 - PROGRESS: at 25.68% examples, 82740 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:21,343 : INFO : EPOCH 2 - PROGRESS: at 27.91% examples, 82586 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:22,420 : INFO : EPOCH 2 - PROGRESS: at 30.18% examples, 82598 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:23,506 : INFO : EPOCH 2 - PROGRESS: at 32.41% examples, 82469 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:24,531 : INFO : EPOCH 2 - PROGRESS: at 34.71% examples, 82599 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:25,615 : INFO : EPOCH 2 - PROGRESS: at 36.86% examples, 82634 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:26,622 : INFO : EPOCH 2 - PROGRESS: at 38.95% examples, 82501 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:27,694 : INFO : EPOCH 2 - PROGRESS: at 40.82% examples, 82476 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:28,750 : INFO : EPOCH 2 - PROGRESS: at 42.83% examples, 82418 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:29,758 : INFO : EPOCH 2 - PROGRESS: at 44.53% examples, 82225 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:30,856 : INFO : EPOCH 2 - PROGRESS: at 46.69% examples, 82061 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:31,946 : INFO : EPOCH 2 - PROGRESS: at 48.94% examples, 81979 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:32,994 : INFO : EPOCH 2 - PROGRESS: at 50.81% examples, 82102 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:34,062 : INFO : EPOCH 2 - PROGRESS: at 53.01% examples, 82116 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:35,146 : INFO : EPOCH 2 - PROGRESS: at 55.06% examples, 82069 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:36,226 : INFO : EPOCH 2 - PROGRESS: at 57.17% examples, 82096 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:37,267 : INFO : EPOCH 2 - PROGRESS: at 59.40% examples, 82137 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:38,375 : INFO : EPOCH 2 - PROGRESS: at 61.58% examples, 82173 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:39,421 : INFO : EPOCH 2 - PROGRESS: at 63.65% examples, 82189 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:40,494 : INFO : EPOCH 2 - PROGRESS: at 66.04% examples, 82190 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:41,553 : INFO : EPOCH 2 - PROGRESS: at 68.17% examples, 82216 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:42,605 : INFO : EPOCH 2 - PROGRESS: at 70.32% examples, 82233 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:43,726 : INFO : EPOCH 2 - PROGRESS: at 72.73% examples, 82157 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:44,764 : INFO : EPOCH 2 - PROGRESS: at 74.77% examples, 82192 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:45,838 : INFO : EPOCH 2 - PROGRESS: at 76.65% examples, 82165 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:46,841 : INFO : EPOCH 2 - PROGRESS: at 78.48% examples, 82209 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:47,911 : INFO : EPOCH 2 - PROGRESS: at 80.37% examples, 82226 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:48,961 : INFO : EPOCH 2 - PROGRESS: at 82.42% examples, 82238 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:50,052 : INFO : EPOCH 2 - PROGRESS: at 84.48% examples, 82218 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:51,118 : INFO : EPOCH 2 - PROGRESS: at 86.60% examples, 82241 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:52,149 : INFO : EPOCH 2 - PROGRESS: at 88.61% examples, 82296 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:53,227 : INFO : EPOCH 2 - PROGRESS: at 90.68% examples, 82253 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:54,250 : INFO : EPOCH 2 - PROGRESS: at 92.75% examples, 82269 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:55,345 : INFO : EPOCH 2 - PROGRESS: at 94.64% examples, 82200 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:56,375 : INFO : EPOCH 2 - PROGRESS: at 96.61% examples, 82272 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:57,460 : INFO : EPOCH 2 - PROGRESS: at 98.79% examples, 82253 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:47:58,070 : INFO : worker thread finished; awaiting finish of 5 more threads\n",
            "2020-08-23 03:47:58,070 : INFO : worker thread finished; awaiting finish of 4 more threads\n",
            "2020-08-23 03:47:58,070 : INFO : worker thread finished; awaiting finish of 3 more threads\n",
            "2020-08-23 03:47:58,070 : INFO : worker thread finished; awaiting finish of 2 more threads\n",
            "2020-08-23 03:47:58,080 : INFO : worker thread finished; awaiting finish of 1 more threads\n",
            "2020-08-23 03:47:58,083 : INFO : worker thread finished; awaiting finish of 0 more threads\n",
            "2020-08-23 03:47:58,084 : INFO : EPOCH - 2 : training on 4659776 raw words (4240249 effective words) took 51.5s, 82329 effective words/s\n",
            "2020-08-23 03:47:59,168 : INFO : EPOCH 3 - PROGRESS: at 2.12% examples, 77923 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:00,229 : INFO : EPOCH 3 - PROGRESS: at 4.13% examples, 79818 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:01,314 : INFO : EPOCH 3 - PROGRESS: at 5.97% examples, 79933 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:02,322 : INFO : EPOCH 3 - PROGRESS: at 7.97% examples, 81398 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:03,335 : INFO : EPOCH 3 - PROGRESS: at 9.80% examples, 82132 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:04,402 : INFO : EPOCH 3 - PROGRESS: at 11.76% examples, 82359 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:05,457 : INFO : EPOCH 3 - PROGRESS: at 14.07% examples, 82521 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:06,544 : INFO : EPOCH 3 - PROGRESS: at 16.09% examples, 82415 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:07,573 : INFO : EPOCH 3 - PROGRESS: at 18.01% examples, 82450 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:08,594 : INFO : EPOCH 3 - PROGRESS: at 19.79% examples, 82470 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:09,644 : INFO : EPOCH 3 - PROGRESS: at 21.82% examples, 82666 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:10,707 : INFO : EPOCH 3 - PROGRESS: at 23.90% examples, 82759 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:11,775 : INFO : EPOCH 3 - PROGRESS: at 25.68% examples, 82558 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:12,863 : INFO : EPOCH 3 - PROGRESS: at 27.91% examples, 82495 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:13,918 : INFO : EPOCH 3 - PROGRESS: at 30.18% examples, 82633 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:15,000 : INFO : EPOCH 3 - PROGRESS: at 32.41% examples, 82528 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:16,013 : INFO : EPOCH 3 - PROGRESS: at 34.71% examples, 82703 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:17,114 : INFO : EPOCH 3 - PROGRESS: at 36.86% examples, 82661 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:18,195 : INFO : EPOCH 3 - PROGRESS: at 39.16% examples, 82656 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:19,244 : INFO : EPOCH 3 - PROGRESS: at 41.02% examples, 82735 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:20,274 : INFO : EPOCH 3 - PROGRESS: at 42.95% examples, 82710 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:21,330 : INFO : EPOCH 3 - PROGRESS: at 44.97% examples, 82714 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:22,399 : INFO : EPOCH 3 - PROGRESS: at 47.10% examples, 82671 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:23,424 : INFO : EPOCH 3 - PROGRESS: at 49.19% examples, 82679 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:24,521 : INFO : EPOCH 3 - PROGRESS: at 51.26% examples, 82728 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:25,562 : INFO : EPOCH 3 - PROGRESS: at 53.36% examples, 82749 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:26,627 : INFO : EPOCH 3 - PROGRESS: at 55.49% examples, 82776 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:27,709 : INFO : EPOCH 3 - PROGRESS: at 57.68% examples, 82773 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:28,726 : INFO : EPOCH 3 - PROGRESS: at 59.97% examples, 82863 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:29,731 : INFO : EPOCH 3 - PROGRESS: at 61.77% examples, 82868 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:30,767 : INFO : EPOCH 3 - PROGRESS: at 63.95% examples, 82881 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:31,851 : INFO : EPOCH 3 - PROGRESS: at 66.27% examples, 82836 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:32,903 : INFO : EPOCH 3 - PROGRESS: at 68.47% examples, 82857 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:33,960 : INFO : EPOCH 3 - PROGRESS: at 70.59% examples, 82851 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:35,024 : INFO : EPOCH 3 - PROGRESS: at 72.87% examples, 82879 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:36,116 : INFO : EPOCH 3 - PROGRESS: at 74.98% examples, 82778 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:37,151 : INFO : EPOCH 3 - PROGRESS: at 76.83% examples, 82828 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:38,162 : INFO : EPOCH 3 - PROGRESS: at 78.69% examples, 82835 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:39,241 : INFO : EPOCH 3 - PROGRESS: at 80.64% examples, 82822 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:40,275 : INFO : EPOCH 3 - PROGRESS: at 82.58% examples, 82852 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:41,348 : INFO : EPOCH 3 - PROGRESS: at 84.71% examples, 82844 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:42,447 : INFO : EPOCH 3 - PROGRESS: at 86.82% examples, 82797 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:43,509 : INFO : EPOCH 3 - PROGRESS: at 88.83% examples, 82784 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:44,551 : INFO : EPOCH 3 - PROGRESS: at 90.85% examples, 82789 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:45,581 : INFO : EPOCH 3 - PROGRESS: at 92.93% examples, 82785 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:46,638 : INFO : EPOCH 3 - PROGRESS: at 94.79% examples, 82769 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:47,684 : INFO : EPOCH 3 - PROGRESS: at 96.80% examples, 82806 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:48,776 : INFO : EPOCH 3 - PROGRESS: at 98.96% examples, 82757 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:49,279 : INFO : worker thread finished; awaiting finish of 5 more threads\n",
            "2020-08-23 03:48:49,280 : INFO : worker thread finished; awaiting finish of 4 more threads\n",
            "2020-08-23 03:48:49,280 : INFO : worker thread finished; awaiting finish of 3 more threads\n",
            "2020-08-23 03:48:49,280 : INFO : worker thread finished; awaiting finish of 2 more threads\n",
            "2020-08-23 03:48:49,284 : INFO : worker thread finished; awaiting finish of 1 more threads\n",
            "2020-08-23 03:48:49,290 : INFO : worker thread finished; awaiting finish of 0 more threads\n",
            "2020-08-23 03:48:49,290 : INFO : EPOCH - 3 : training on 4659776 raw words (4241392 effective words) took 51.2s, 82832 effective words/s\n",
            "2020-08-23 03:48:50,384 : INFO : EPOCH 4 - PROGRESS: at 2.12% examples, 77350 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:51,445 : INFO : EPOCH 4 - PROGRESS: at 4.13% examples, 79561 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:52,516 : INFO : EPOCH 4 - PROGRESS: at 5.97% examples, 80060 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:53,569 : INFO : EPOCH 4 - PROGRESS: at 7.97% examples, 80682 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:54,575 : INFO : EPOCH 4 - PROGRESS: at 9.80% examples, 81649 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:55,644 : INFO : EPOCH 4 - PROGRESS: at 11.76% examples, 81942 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:56,703 : INFO : EPOCH 4 - PROGRESS: at 14.07% examples, 82126 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:57,790 : INFO : EPOCH 4 - PROGRESS: at 16.09% examples, 82060 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:58,799 : INFO : EPOCH 4 - PROGRESS: at 18.01% examples, 82313 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:48:59,840 : INFO : EPOCH 4 - PROGRESS: at 19.79% examples, 82196 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:00,903 : INFO : EPOCH 4 - PROGRESS: at 21.82% examples, 82324 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:01,977 : INFO : EPOCH 4 - PROGRESS: at 23.90% examples, 82363 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:03,049 : INFO : EPOCH 4 - PROGRESS: at 25.68% examples, 82174 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:04,160 : INFO : EPOCH 4 - PROGRESS: at 27.91% examples, 82013 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:05,220 : INFO : EPOCH 4 - PROGRESS: at 30.18% examples, 82154 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:06,275 : INFO : EPOCH 4 - PROGRESS: at 32.41% examples, 82205 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:07,310 : INFO : EPOCH 4 - PROGRESS: at 34.71% examples, 82298 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:08,413 : INFO : EPOCH 4 - PROGRESS: at 36.86% examples, 82272 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:09,487 : INFO : EPOCH 4 - PROGRESS: at 39.16% examples, 82316 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:10,552 : INFO : EPOCH 4 - PROGRESS: at 41.02% examples, 82338 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:11,591 : INFO : EPOCH 4 - PROGRESS: at 42.95% examples, 82297 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:12,632 : INFO : EPOCH 4 - PROGRESS: at 44.97% examples, 82375 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:13,715 : INFO : EPOCH 4 - PROGRESS: at 47.10% examples, 82306 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:14,742 : INFO : EPOCH 4 - PROGRESS: at 49.19% examples, 82318 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:15,750 : INFO : EPOCH 4 - PROGRESS: at 51.02% examples, 82314 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:16,804 : INFO : EPOCH 4 - PROGRESS: at 53.17% examples, 82320 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:17,871 : INFO : EPOCH 4 - PROGRESS: at 55.27% examples, 82355 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:18,946 : INFO : EPOCH 4 - PROGRESS: at 57.43% examples, 82382 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:20,003 : INFO : EPOCH 4 - PROGRESS: at 59.69% examples, 82365 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:21,018 : INFO : EPOCH 4 - PROGRESS: at 61.58% examples, 82358 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:22,046 : INFO : EPOCH 4 - PROGRESS: at 63.65% examples, 82410 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:23,100 : INFO : EPOCH 4 - PROGRESS: at 66.04% examples, 82457 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:24,198 : INFO : EPOCH 4 - PROGRESS: at 68.17% examples, 82386 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:25,242 : INFO : EPOCH 4 - PROGRESS: at 70.32% examples, 82420 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:26,350 : INFO : EPOCH 4 - PROGRESS: at 72.73% examples, 82369 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:27,416 : INFO : EPOCH 4 - PROGRESS: at 74.77% examples, 82344 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:28,460 : INFO : EPOCH 4 - PROGRESS: at 76.65% examples, 82375 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:29,462 : INFO : EPOCH 4 - PROGRESS: at 78.48% examples, 82413 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:30,529 : INFO : EPOCH 4 - PROGRESS: at 80.37% examples, 82433 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:31,564 : INFO : EPOCH 4 - PROGRESS: at 82.42% examples, 82470 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:32,654 : INFO : EPOCH 4 - PROGRESS: at 84.48% examples, 82446 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:33,682 : INFO : EPOCH 4 - PROGRESS: at 86.60% examples, 82532 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:34,742 : INFO : EPOCH 4 - PROGRESS: at 88.61% examples, 82530 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:35,782 : INFO : EPOCH 4 - PROGRESS: at 90.68% examples, 82545 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:36,801 : INFO : EPOCH 4 - PROGRESS: at 92.75% examples, 82565 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:37,883 : INFO : EPOCH 4 - PROGRESS: at 94.64% examples, 82515 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:38,966 : INFO : EPOCH 4 - PROGRESS: at 96.61% examples, 82491 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:40,077 : INFO : EPOCH 4 - PROGRESS: at 98.79% examples, 82423 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:40,711 : INFO : worker thread finished; awaiting finish of 5 more threads\n",
            "2020-08-23 03:49:40,713 : INFO : worker thread finished; awaiting finish of 4 more threads\n",
            "2020-08-23 03:49:40,714 : INFO : worker thread finished; awaiting finish of 3 more threads\n",
            "2020-08-23 03:49:40,714 : INFO : worker thread finished; awaiting finish of 2 more threads\n",
            "2020-08-23 03:49:40,717 : INFO : worker thread finished; awaiting finish of 1 more threads\n",
            "2020-08-23 03:49:40,722 : INFO : worker thread finished; awaiting finish of 0 more threads\n",
            "2020-08-23 03:49:40,723 : INFO : EPOCH - 4 : training on 4659776 raw words (4241110 effective words) took 51.4s, 82462 effective words/s\n",
            "2020-08-23 03:49:41,739 : INFO : EPOCH 5 - PROGRESS: at 1.86% examples, 74466 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:42,761 : INFO : EPOCH 5 - PROGRESS: at 3.67% examples, 75783 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:43,827 : INFO : EPOCH 5 - PROGRESS: at 5.56% examples, 77546 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:44,831 : INFO : EPOCH 5 - PROGRESS: at 7.48% examples, 78091 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:45,891 : INFO : EPOCH 5 - PROGRESS: at 9.24% examples, 78388 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:46,960 : INFO : EPOCH 5 - PROGRESS: at 11.13% examples, 79201 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:47,962 : INFO : EPOCH 5 - PROGRESS: at 13.23% examples, 79293 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:49,042 : INFO : EPOCH 5 - PROGRESS: at 15.35% examples, 79577 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:50,099 : INFO : EPOCH 5 - PROGRESS: at 17.31% examples, 79971 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:51,165 : INFO : EPOCH 5 - PROGRESS: at 19.14% examples, 79952 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:52,237 : INFO : EPOCH 5 - PROGRESS: at 21.01% examples, 79973 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:53,262 : INFO : EPOCH 5 - PROGRESS: at 22.88% examples, 79833 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:54,366 : INFO : EPOCH 5 - PROGRESS: at 24.84% examples, 79818 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:55,476 : INFO : EPOCH 5 - PROGRESS: at 26.83% examples, 79649 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:56,493 : INFO : EPOCH 5 - PROGRESS: at 28.75% examples, 79578 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:57,506 : INFO : EPOCH 5 - PROGRESS: at 30.79% examples, 79558 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:58,605 : INFO : EPOCH 5 - PROGRESS: at 33.19% examples, 79596 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:49:59,685 : INFO : EPOCH 5 - PROGRESS: at 35.35% examples, 79603 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:00,732 : INFO : EPOCH 5 - PROGRESS: at 37.39% examples, 79523 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:01,809 : INFO : EPOCH 5 - PROGRESS: at 39.56% examples, 79692 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:02,903 : INFO : EPOCH 5 - PROGRESS: at 41.46% examples, 79745 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:03,924 : INFO : EPOCH 5 - PROGRESS: at 43.33% examples, 79856 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:05,049 : INFO : EPOCH 5 - PROGRESS: at 45.47% examples, 79777 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:06,125 : INFO : EPOCH 5 - PROGRESS: at 47.58% examples, 79845 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:07,166 : INFO : EPOCH 5 - PROGRESS: at 49.58% examples, 79917 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:08,264 : INFO : EPOCH 5 - PROGRESS: at 51.74% examples, 80056 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:09,313 : INFO : EPOCH 5 - PROGRESS: at 53.77% examples, 80156 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:10,389 : INFO : EPOCH 5 - PROGRESS: at 55.92% examples, 80246 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:11,437 : INFO : EPOCH 5 - PROGRESS: at 58.14% examples, 80382 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:12,481 : INFO : EPOCH 5 - PROGRESS: at 60.16% examples, 80433 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:13,496 : INFO : EPOCH 5 - PROGRESS: at 62.23% examples, 80529 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:14,540 : INFO : EPOCH 5 - PROGRESS: at 64.56% examples, 80612 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:15,601 : INFO : EPOCH 5 - PROGRESS: at 66.66% examples, 80693 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:16,656 : INFO : EPOCH 5 - PROGRESS: at 68.89% examples, 80759 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:17,718 : INFO : EPOCH 5 - PROGRESS: at 71.03% examples, 80824 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:18,827 : INFO : EPOCH 5 - PROGRESS: at 73.34% examples, 80812 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:19,864 : INFO : EPOCH 5 - PROGRESS: at 75.30% examples, 80858 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:20,932 : INFO : EPOCH 5 - PROGRESS: at 77.20% examples, 80905 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:21,933 : INFO : EPOCH 5 - PROGRESS: at 78.99% examples, 80959 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:23,063 : INFO : EPOCH 5 - PROGRESS: at 81.12% examples, 80915 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:24,095 : INFO : EPOCH 5 - PROGRESS: at 82.99% examples, 81002 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:25,185 : INFO : EPOCH 5 - PROGRESS: at 85.10% examples, 81004 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:26,238 : INFO : EPOCH 5 - PROGRESS: at 87.21% examples, 81069 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:27,292 : INFO : EPOCH 5 - PROGRESS: at 89.34% examples, 81128 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:28,298 : INFO : EPOCH 5 - PROGRESS: at 91.18% examples, 81170 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:29,354 : INFO : EPOCH 5 - PROGRESS: at 93.33% examples, 81194 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:30,381 : INFO : EPOCH 5 - PROGRESS: at 95.18% examples, 81263 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:31,474 : INFO : EPOCH 5 - PROGRESS: at 97.27% examples, 81265 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:32,561 : INFO : EPOCH 5 - PROGRESS: at 99.38% examples, 81262 words/s, in_qsize 0, out_qsize 0\n",
            "2020-08-23 03:50:32,813 : INFO : worker thread finished; awaiting finish of 5 more threads\n",
            "2020-08-23 03:50:32,813 : INFO : worker thread finished; awaiting finish of 4 more threads\n",
            "2020-08-23 03:50:32,814 : INFO : worker thread finished; awaiting finish of 3 more threads\n",
            "2020-08-23 03:50:32,814 : INFO : worker thread finished; awaiting finish of 2 more threads\n",
            "2020-08-23 03:50:32,824 : INFO : worker thread finished; awaiting finish of 1 more threads\n",
            "2020-08-23 03:50:32,826 : INFO : worker thread finished; awaiting finish of 0 more threads\n",
            "2020-08-23 03:50:32,827 : INFO : EPOCH - 5 : training on 4659776 raw words (4240749 effective words) took 52.1s, 81394 effective words/s\n",
            "2020-08-23 03:50:32,827 : INFO : training on a 23298880 raw words (21204834 effective words) took 257.4s, 82373 effective words/s\n",
            "2020-08-23 03:50:32,827 : INFO : storing 150330x100 projection weights into ./data/vector_word.txt\n",
            "/usr/local/lib/python3.6/dist-packages/smart_open/smart_open_lib.py:254: UserWarning: This function is deprecated, use smart_open.open instead. See the migration notes for details: https://github.com/RaRe-Technologies/smart_open/blob/master/README.rst#migrating-to-the-new-open-function\n",
            "  'See the migration notes for details: %s' % _MIGRATION_NOTES_URL\n",
            "-------------------------------------------\n",
            "Training word2vec model cost 341.300 seconds...\n",
            "\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "QPjFrXJRa1zU",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "087ec8c5-64cf-4dfd-9a64-2ca905f412fa"
      },
      "source": [
        "!python text_train.py"
      ],
      "execution_count": 18,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n",
            "Configuring RNN model...\n",
            "Building prefix dict from the default dictionary ...\n",
            "Loading model from cache /tmp/jieba.cache\n",
            "Loading model cost 0.699 seconds.\n",
            "Prefix dict has been built successfully.\n",
            "Configuring TensorBoard and Saver...\n",
            "Loading training and validation data...\n",
            "Time cost: 75.964 seconds...\n",
            "\n",
            "2020-08-23 03:58:59.411300: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 03:58:59.411351: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 03:58:59.411363: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 03:58:59.411375: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 03:58:59.411389: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.\n",
            "Training and evaluating...\n",
            "Epoch: 1\n",
            "step: 100,train loss: 0.209, train accuracy: 0.938, val loss: 0.148, val accuracy: 0.949,training speed: 3.719sec/batch *\n",
            "\n",
            "Epoch: 2\n",
            "step: 200,train loss: 0.168, train accuracy: 0.906, val loss: 0.117, val accuracy: 0.962,training speed: 3.756sec/batch *\n",
            "\n",
            "Epoch: 3\n",
            "step: 300,train loss: 0.032, train accuracy: 1.000, val loss: 0.108, val accuracy: 0.966,training speed: 3.760sec/batch *\n",
            "\n",
            "Epoch: 4\n",
            "step: 400,train loss: 0.057, train accuracy: 0.984, val loss: 0.094, val accuracy: 0.967,training speed: 3.698sec/batch *\n",
            "\n",
            "Epoch: 5\n",
            "step: 500,train loss: 0.132, train accuracy: 0.953, val loss: 0.093, val accuracy: 0.971,training speed: 3.813sec/batch *\n",
            "\n",
            "Epoch: 6\n",
            "step: 600,train loss: 0.078, train accuracy: 0.969, val loss: 0.100, val accuracy: 0.971,training speed: 3.777sec/batch \n",
            "\n",
            "Epoch: 7\n",
            "step: 700,train loss: 0.070, train accuracy: 0.984, val loss: 0.110, val accuracy: 0.969,training speed: 3.698sec/batch \n",
            "\n",
            "Epoch: 8\n",
            "step: 800,train loss: 0.023, train accuracy: 1.000, val loss: 0.086, val accuracy: 0.973,training speed: 3.768sec/batch *\n",
            "\n",
            "Epoch: 9\n",
            "step: 900,train loss: 0.016, train accuracy: 1.000, val loss: 0.100, val accuracy: 0.971,training speed: 3.777sec/batch \n",
            "\n",
            "Epoch: 10\n",
            "step: 1000,train loss: 0.045, train accuracy: 0.984, val loss: 0.097, val accuracy: 0.973,training speed: 3.700sec/batch \n",
            "\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kURGR-RDvVOS",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 989
        },
        "outputId": "00a0d250-5e3c-4372-e73d-c5ea3b173763"
      },
      "source": [
        "!python text_test.py"
      ],
      "execution_count": 20,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n",
            "Configuring RNN model...\n",
            "Loading test data...\n",
            "Building prefix dict from the default dictionary ...\n",
            "Loading model from cache /tmp/jieba.cache\n",
            "Loading model cost 0.877 seconds.\n",
            "Prefix dict has been built successfully.\n",
            "2020-08-23 05:15:23.370570: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:15:23.370628: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:15:23.370640: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:15:23.370649: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:15:23.370658: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.\n",
            "Testing...\n",
            "Test Loss:   0.07, Test Acc:  98.20%\n",
            "Precision, Recall and F1-Score...\n",
            "              precision    recall  f1-score   support\n",
            "\n",
            "          体育       1.00      1.00      1.00       208\n",
            "          财经       1.00      0.99      0.99       175\n",
            "          房产       0.93      0.98      0.95       201\n",
            "          家居       0.96      0.95      0.95       192\n",
            "          教育       0.99      0.98      0.98       209\n",
            "          科技       0.99      0.99      0.99       212\n",
            "          时尚       1.00      0.99      1.00       186\n",
            "          时政       0.98      0.97      0.97       211\n",
            "          游戏       0.99      0.98      0.98       204\n",
            "          娱乐       1.00      1.00      1.00       202\n",
            "\n",
            "    accuracy                           0.98      2000\n",
            "   macro avg       0.98      0.98      0.98      2000\n",
            "weighted avg       0.98      0.98      0.98      2000\n",
            "\n",
            "Confusion Matrix...\n",
            "[[208   0   0   0   0   0   0   0   0   0]\n",
            " [  0 173   2   0   0   0   0   0   0   0]\n",
            " [  0   0 196   2   0   0   0   3   0   0]\n",
            " [  0   0   7 182   0   2   0   1   0   0]\n",
            " [  0   0   2   0 205   0   0   1   0   1]\n",
            " [  0   0   0   0   0 210   0   0   2   0]\n",
            " [  0   0   0   0   1   0 185   0   0   0]\n",
            " [  0   0   3   2   0   0   0 205   1   0]\n",
            " [  0   0   0   4   1   0   0   0 199   0]\n",
            " [  0   0   0   0   1   0   0   0   0 201]]\n",
            "Time usage:75.659 seconds...\n",
            "\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "YESsO-TZvaW_",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 751
        },
        "outputId": "9f0cb763-23f5-4905-c0ad-246b7257ba82"
      },
      "source": [
        "!python text_predict.py"
      ],
      "execution_count": 23,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
            "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
            "  np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n",
            "predict random five samples in test data.... \n",
            "Building prefix dict from the default dictionary ...\n",
            "Loading model from cache /tmp/jieba.cache\n",
            "Loading model cost 0.697 seconds.\n",
            "Prefix dict has been built successfully.\n",
            "2020-08-23 05:20:54.630178: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:20:54.630230: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:20:54.630244: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:20:54.630253: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.\n",
            "2020-08-23 05:20:54.630263: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.\n",
            "----------------------the text-------------------------\n",
            "留学资讯:美国留学奖学金类别详解美国大学奖学金发放的数量和种类可以说是全世界最多的,也是相对比较容易....\n",
            "the orginal label:教育\n",
            "the predict label:教育\n",
            "----------------------the text-------------------------\n",
            "魏楠登《芭莎男士》 揭秘电影预告片制作(组图)他是全亚洲最贵的、也是中国第一个电影预告片制作人。他的....\n",
            "the orginal label:娱乐\n",
            "the predict label:娱乐\n",
            "----------------------the text-------------------------\n",
            "发改委官员:一系列振兴东北新举措即将推出《中国经济周刊》记者  宋雪莲/北京报道继国务院4月21日正....\n",
            "the orginal label:时政\n",
            "the predict label:家居\n",
            "----------------------the text-------------------------\n",
            "农业部紧急部署热带风暴莲花防御工作中广网北京6月20日消息(记者李彦亮)据中国之声《央广新闻》8时3....\n",
            "the orginal label:时政\n",
            "the predict label:时政\n",
            "----------------------the text-------------------------\n",
            "政法委副书记被曝圈地建别墅 纪委已介入快报赴连云港调查:院子占地1200平方米,单位称不知情,纪委已....\n",
            "the orginal label:房产\n",
            "the predict label:房产\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "jeaZD2u_3BR_",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        },
        "outputId": "33f00608-153b-425d-eb86-9dd6eb12c0be"
      },
      "source": [
        "%cd .."
      ],
      "execution_count": 24,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/content\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "0ElH5jFn26IB",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "!cp -rf text_rnn_attention '/content/drive/My Drive/推荐系统课程'"
      ],
      "execution_count": 25,
      "outputs": []
    }
  ]
}