{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 自然语言处理应用" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 概述\n", "\n", "情感分类是自然语言处理中文本分类问题的子集,属于自然语言处理最基础的应用。它是对带有感情色彩的主观性文本进行分析和推理的过程,即分析说话人的态度,是倾向正面还是反面。\n", "\n", "> 通常情况下,我们会把情感类别分为正面、反面和中性三类。虽然“面无表情”的评论也有不少;不过,大部分时候会只采用正面和反面的案例进行训练,下面这个数据集就是很好的例子。\n", "\n", "传统的文本主题分类问题的典型参考数据集为[20 Newsgroups](http://qwone.com/~jason/20Newsgroups/),该数据集由20组新闻数据组成,包含约20000个新闻文档。\n", "其主题列表中有些类别的数据比较相似,例如comp.sys.ibm.pc.hardware和comp.sys.mac.hardware都是和电脑系统硬件相关的题目,相似度比较高。而有些主题类别的数据相对来说就毫无关联,例如misc.forsale和soc.religion.christian。\n", "\n", "就网络本身而言,文本主题分类的网络结构和情感分类的网络结构大致相似。在掌握了情感分类网络如何构造之后,很容易可以构造一个类似的网络,稍作调参即可用于文本主题分类任务。\n", "\n", "但在业务上下文侧,文本主题分类是分析文本讨论的客观内容,而情感分类是要从文本中得到它是否支持某种观点的信息。比如,“《阿甘正传》真是好看极了,影片主题明确,节奏流畅。”这句话,在文本主题分类是要将其归为类别为“电影”主题,而情感分类则要挖掘出这一影评的态度是正面还是负面。\n", "\n", "相对于传统的文本主题分类,情感分类较为简单,实用性也较强。常见的购物网站、电影网站都可以采集到相对高质量的数据集,也很容易给业务领域带来收益。例如,可以结合领域上下文,自动分析特定类型客户对当前产品的意见,可以分主题分用户类型对情感进行分析,以作针对性的处理,甚至基于此进一步推荐产品,提高转化率,带来更高的商业收益。\n", "\n", "特殊领域中,某些非极性词也充分表达了用户的情感倾向,比如下载使用APP时,“卡死了”、“下载太慢了”就表达了用户的负面情感倾向;股票领域中,“看涨”、“牛市”表达的就是用户的正面情感倾向。所以,本质上,我们希望模型能够在垂直领域中,挖掘出一些特殊的表达,作为极性词给情感分类系统使用:\n", "\n", "$垂直极性词 = 通用极性词 + 领域特有极性词$\n", "\n", "按照处理文本的粒度不同,情感分析可分为词语级、短语级、句子级、段落级以及篇章级等几个研究层次。这里以“段落级”为例,输入为一个段落,输出为影评是正面还是负面的信息。\n", "\n", "接下来,以IMDB影评情感分类为例来体验MindSpore在自然语言处理上的应用。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 整体流程\n", "\n", "1. 准备环节。\n", "2. 加载数据集,进行数据处理。\n", "3. 定义网络。\n", "4. 定义优化器和损失函数。\n", "5. 使用网络训练数据,生成模型。\n", "6. 得到模型之后,使用验证数据集,查看模型精度情况。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 准备环节\n", "\n", "### 下载数据集\n", "\n", "本次体验采用IMDB影评数据集作为实验数据。\n", "\n", "1. 下载IMDB影评数据集,数据集下载地址:。\n", "\n", " 以下是负面影评(Negative)和正面影评(Positive)的案例。\n", "\n", "| Review | Label | \n", "|:---|:---:|\n", "| \"Quitting\" may be as much about exiting a pre-ordained identity as about drug withdrawal. As a rural guy coming to Beijing, class and success must have struck this young artist face on as an appeal to separate from his roots and far surpass his peasant parents' acting success. Troubles arise, however, when the new man is too new, when it demands too big a departure from family, history, nature, and personal identity. The ensuing splits, and confusion between the imaginary and the real and the dissonance between the ordinary and the heroic are the stuff of a gut check on the one hand or a complete escape from self on the other. | Negative | \n", "| This movie is amazing because the fact that the real people portray themselves and their real life experience and do such a good job it's like they're almost living the past over again. Jia Hongsheng plays himself an actor who quit everything except music and drugs struggling with depression and searching for the meaning of life while being angry at everyone especially the people who care for him most. | Positive |\n", " \n", "  将下载好的数据集解压并放在当前工作目录下。\n", "\n", "\n", "2. 下载GloVe文件\n", " 下载并解压GloVe文件到当前工作目录下,修改解压后的目录名为`glove`,并在所有Glove文件开头处添加如下所示新的一行,意思是总共读取400000个单词,每个单词用300纬度的词向量表示。\n", "\n", " ```\n", " 400000 300\n", " ```\n", "\n", " GloVe文件下载地址:\n", "\n", "\n", "3. 在当前工作目录创建名为`preprocess`的空目录,该目录将用于存储在数据集预处理操作中IMDB数据集转换为MindRecord格式后的文件。\n", "\n", " 此时当前工作目录结构如下所示。\n", " \n", " ```shell\n", " $ tree -L 2 lstm\n", " lstm\n", " ├── aclImdb\n", " │   ├── imdbEr.txt\n", " │   ├── imdb.vocab\n", " │   ├── README\n", " │   ├── test\n", " │   └── train\n", " ├── glove\n", " │   ├── glove.6B.100d.txt\n", " │   ├── glove.6B.200d.txt\n", " │   ├── glove.6B.300d.txt\n", " │   └── glove.6B.50d.txt\n", " └── preprocess\n", " ```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 确定评价标准\n", "\n", "作为典型的分类问题,情感分类的评价标准可以比照普通的分类问题处理。常见的精度(Accuracy)、精准度(Precision)、召回率(Recall)和F_beta分数都可以作为参考。\n", "\n", "$精度(Accuracy)= 分类正确的样本数目 / 总样本数目$\n", "\n", "$精准度(Precision)= 真阳性样本数目 / 所有预测类别为阳性的样本数目$\n", "\n", "$召回率(Recall)= 真阳性样本数目 / 所有真实类别为阳性的样本数目$ \n", "\n", "$F1分数 = (2 * Precision * Recall) / (Precision + Recall)$\n", "\n", "在IMDB这个数据集中,正负样本数差别不大,可以简单地用精度(accuracy)作为分类器的衡量标准。\n", "\n", "### 确定网络\n", "\n", "我们使用基于LSTM构建的SentimentNet网络进行自然语言处理。\n", "\n", "> LSTM(Long short-term memory,长短期记忆)网络是一种时间循环神经网络,适合于处理和预测时间序列中间隔和延迟非常长的重要事件。\n", "> 本次体验面向GPU或CPU硬件平台。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 配置运行信息" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. 使用`parser`模块传入运行必要的信息。\n", " \n", " - `preprocess`:是否预处理数据集,默认为否。\n", " - `aclimdb_path`:数据集存放路径。\n", " - `glove_path`:GloVe文件存放路径。\n", " - `preprocess_path`:预处理数据集的结果文件夹。\n", " - `ckpt_path`:CheckPoint文件路径。\n", " - `pre_trained`:预加载CheckPoint文件。\n", " - `device_target`:指定GPU或CPU环境。" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [], "source": [ "import argparse\n", "\n", "\n", "parser = argparse.ArgumentParser(description='MindSpore LSTM Example')\n", "parser.add_argument('--preprocess', type=str, default='false', choices=['true', 'false'],\n", " help='whether to preprocess data.')\n", "parser.add_argument('--aclimdb_path', type=str, default=\"./aclImdb\",\n", " help='path where the dataset is stored.')\n", "parser.add_argument('--glove_path', type=str, default=\"./glove\",\n", " help='path where the GloVe is stored.')\n", "parser.add_argument('--preprocess_path', type=str, default=\"./preprocess\",\n", " help='path where the pre-process data is stored.')\n", "parser.add_argument('--ckpt_path', type=str, default=\"./\",\n", " help='the path to save the checkpoint file.')\n", "parser.add_argument('--pre_trained', type=str, default=None,\n", " help='the pretrained checkpoint file path.')\n", "parser.add_argument('--device_target', type=str, default=\"GPU\", choices=['GPU', 'CPU'],\n", " help='the target device to run, support \"GPU\", \"CPU\". Default: \"GPU\".')\n", "args = parser.parse_args(['--device_target', 'GPU', '--preprocess', 'true'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. 进行训练前,需要配置必要的信息,包括环境信息、执行的模式、后端信息及硬件信息。 \n", " \n", "> 详细的接口配置信息,请参见MindSpore官网`context.set_context`API接口说明。" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from mindspore import context\n", "\n", "\n", "context.set_context(\n", " mode=context.GRAPH_MODE,\n", " save_graphs=False,\n", " device_target=args.device_target)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 配置SentimentNet网络参数\n", "\n", "在以下一段代码中配置基于LSTM构建的SentimentNet网络所需相关参数。" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "from easydict import EasyDict as edict\n", "\n", "\n", "# LSTM CONFIG\n", "lstm_cfg = edict({\n", " 'num_classes': 2,\n", " 'learning_rate': 0.1,\n", " 'momentum': 0.9,\n", " 'num_epochs': 10,\n", " 'batch_size': 64,\n", " 'embed_size': 300,\n", " 'num_hiddens': 100,\n", " 'num_layers': 2,\n", " 'bidirectional': True,\n", " 'save_checkpoint_steps': 390,\n", " 'keep_checkpoint_max': 10\n", "})\n", "\n", "cfg = lstm_cfg" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 数据处理\n", "\n", "## 预处理数据集" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. 定义`ImdbParser`类解析文本数据集,包括编码、分词、对齐、处理GloVe原始数据,使之能够适应网络结构。" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import os\n", "from itertools import chain\n", "import numpy as np\n", "import gensim\n", "\n", "\n", "class ImdbParser():\n", " \"\"\"\n", " parse aclImdb data to features and labels.\n", " sentence->tokenized->encoded->padding->features\n", " \"\"\"\n", "\n", " def __init__(self, imdb_path, glove_path, embed_size=300):\n", " self.__segs = ['train', 'test']\n", " self.__label_dic = {'pos': 1, 'neg': 0}\n", " self.__imdb_path = imdb_path\n", " self.__glove_dim = embed_size\n", " self.__glove_file = os.path.join(glove_path, 'glove.6B.' + str(self.__glove_dim) + 'd.txt')\n", "\n", " # properties\n", " self.__imdb_datas = {}\n", " self.__features = {}\n", " self.__labels = {}\n", " self.__vacab = {}\n", " self.__word2idx = {}\n", " self.__weight_np = {}\n", " self.__wvmodel = None\n", "\n", " def parse(self):\n", " \"\"\"\n", " parse imdb data to memory\n", " \"\"\"\n", " self.__wvmodel = gensim.models.KeyedVectors.load_word2vec_format(self.__glove_file)\n", "\n", " for seg in self.__segs:\n", " self.__parse_imdb_datas(seg)\n", " self.__parse_features_and_labels(seg)\n", " self.__gen_weight_np(seg)\n", "\n", " def __parse_imdb_datas(self, seg):\n", " \"\"\"\n", " load data from txt\n", " \"\"\"\n", " data_lists = []\n", " for label_name, label_id in self.__label_dic.items():\n", " sentence_dir = os.path.join(self.__imdb_path, seg, label_name)\n", " for file in os.listdir(sentence_dir):\n", " with open(os.path.join(sentence_dir, file), mode='r', encoding='utf8') as f:\n", " sentence = f.read().replace('\\n', '')\n", " data_lists.append([sentence, label_id])\n", " self.__imdb_datas[seg] = data_lists\n", "\n", " def __parse_features_and_labels(self, seg):\n", " \"\"\"\n", " parse features and labels\n", " \"\"\"\n", " features = []\n", " labels = []\n", " for sentence, label in self.__imdb_datas[seg]:\n", " features.append(sentence)\n", " labels.append(label)\n", "\n", " self.__features[seg] = features\n", " self.__labels[seg] = labels\n", "\n", " # update feature to tokenized\n", " self.__updata_features_to_tokenized(seg)\n", " # parse vacab\n", " self.__parse_vacab(seg)\n", " # encode feature\n", " self.__encode_features(seg)\n", " # padding feature\n", " self.__padding_features(seg)\n", "\n", " def __updata_features_to_tokenized(self, seg):\n", " tokenized_features = []\n", " for sentence in self.__features[seg]:\n", " tokenized_sentence = [word.lower() for word in sentence.split(\" \")]\n", " tokenized_features.append(tokenized_sentence)\n", " self.__features[seg] = tokenized_features\n", "\n", " def __parse_vacab(self, seg):\n", " # vocab\n", " tokenized_features = self.__features[seg]\n", " vocab = set(chain(*tokenized_features))\n", " self.__vacab[seg] = vocab\n", "\n", " # word_to_idx: {'hello': 1, 'world':111, ... '': 0}\n", " word_to_idx = {word: i + 1 for i, word in enumerate(vocab)}\n", " word_to_idx[''] = 0\n", " self.__word2idx[seg] = word_to_idx\n", "\n", " def __encode_features(self, seg):\n", " \"\"\" encode word to index \"\"\"\n", " word_to_idx = self.__word2idx['train']\n", " encoded_features = []\n", " for tokenized_sentence in self.__features[seg]:\n", " encoded_sentence = []\n", " for word in tokenized_sentence:\n", " encoded_sentence.append(word_to_idx.get(word, 0))\n", " encoded_features.append(encoded_sentence)\n", " self.__features[seg] = encoded_features\n", "\n", " def __padding_features(self, seg, maxlen=500, pad=0):\n", " \"\"\" pad all features to the same length \"\"\"\n", " padded_features = []\n", " for feature in self.__features[seg]:\n", " if len(feature) >= maxlen:\n", " padded_feature = feature[:maxlen]\n", " else:\n", " padded_feature = feature\n", " while len(padded_feature) < maxlen:\n", " padded_feature.append(pad)\n", " padded_features.append(padded_feature)\n", " self.__features[seg] = padded_features\n", "\n", " def __gen_weight_np(self, seg):\n", " \"\"\"\n", " generate weight by gensim\n", " \"\"\"\n", " weight_np = np.zeros((len(self.__word2idx[seg]), self.__glove_dim), dtype=np.float32)\n", " for word, idx in self.__word2idx[seg].items():\n", " if word not in self.__wvmodel:\n", " continue\n", " word_vector = self.__wvmodel.get_vector(word)\n", " weight_np[idx, :] = word_vector\n", "\n", " self.__weight_np[seg] = weight_np\n", "\n", " def get_datas(self, seg):\n", " \"\"\"\n", " return features, labels, and weight\n", " \"\"\"\n", " features = np.array(self.__features[seg]).astype(np.int32)\n", " labels = np.array(self.__labels[seg]).astype(np.int32)\n", " weight = np.array(self.__weight_np[seg])\n", " return features, labels, weight" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. 定义`convert_to_mindrecord`函数将数据集格式转换为MindRecord格式,便于MindSpore读取。\n", "\n", " 函数`_convert_to_mindrecord`中`weight.txt`为数据预处理后自动生成的weight参数信息文件。" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import os\n", "import numpy as np\n", "from mindspore.mindrecord import FileWriter\n", "\n", "\n", "def _convert_to_mindrecord(data_home, features, labels, weight_np=None, training=True):\n", " \"\"\"\n", " convert imdb dataset to mindrecoed dataset\n", " \"\"\"\n", " if weight_np is not None:\n", " np.savetxt(os.path.join(data_home, 'weight.txt'), weight_np)\n", "\n", " # write mindrecord\n", " schema_json = {\"id\": {\"type\": \"int32\"},\n", " \"label\": {\"type\": \"int32\"},\n", " \"feature\": {\"type\": \"int32\", \"shape\": [-1]}}\n", "\n", " data_dir = os.path.join(data_home, \"aclImdb_train.mindrecord\")\n", " if not training:\n", " data_dir = os.path.join(data_home, \"aclImdb_test.mindrecord\")\n", "\n", " def get_imdb_data(features, labels):\n", " data_list = []\n", " for i, (label, feature) in enumerate(zip(labels, features)):\n", " data_json = {\"id\": i,\n", " \"label\": int(label),\n", " \"feature\": feature.reshape(-1)}\n", " data_list.append(data_json)\n", " return data_list\n", "\n", " writer = FileWriter(data_dir, shard_num=4)\n", " data = get_imdb_data(features, labels)\n", " writer.add_schema(schema_json, \"nlp_schema\")\n", " writer.add_index([\"id\", \"label\"])\n", " writer.write_raw_data(data)\n", " writer.commit()\n", "\n", "\n", "def convert_to_mindrecord(embed_size, aclimdb_path, preprocess_path, glove_path):\n", " \"\"\"\n", " convert imdb dataset to mindrecoed dataset\n", " \"\"\"\n", " parser = ImdbParser(aclimdb_path, glove_path, embed_size)\n", " parser.parse()\n", "\n", " if not os.path.exists(preprocess_path):\n", " print(f\"preprocess path {preprocess_path} is not exist\")\n", " os.makedirs(preprocess_path)\n", "\n", " train_features, train_labels, train_weight_np = parser.get_datas('train')\n", " _convert_to_mindrecord(preprocess_path, train_features, train_labels, train_weight_np)\n", "\n", " test_features, test_labels, _ = parser.get_datas('test')\n", " _convert_to_mindrecord(preprocess_path, test_features, test_labels, training=False)\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. 调用`convert_to_mindrecord`函数执行数据集预处理,此处用时约3分钟。" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "============== Starting Data Pre-processing ==============\n", "======================= Successful =======================\n" ] } ], "source": [ "if args.preprocess == \"true\":\n", " print(\"============== Starting Data Pre-processing ==============\")\n", " convert_to_mindrecord(cfg.embed_size, args.aclimdb_path, args.preprocess_path, args.glove_path)\n", " print(\"======================= Successful =======================\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "    转换成功后会在`preprocess`目录下生成MindRecord文件,通常该操作在数据集不变的情况下,无需每次训练都执行,此时`preprocess`文件目录如下所示:\n", "\n", "```shell\n", " $ tree preprocess\n", " ├── aclImdb_test.mindrecord0\n", " ├── aclImdb_test.mindrecord0.db\n", " ├── aclImdb_test.mindrecord1\n", " ├── aclImdb_test.mindrecord1.db\n", " ├── aclImdb_test.mindrecord2\n", " ├── aclImdb_test.mindrecord2.db\n", " ├── aclImdb_test.mindrecord3\n", " ├── aclImdb_test.mindrecord3.db\n", " ├── aclImdb_train.mindrecord0\n", " ├── aclImdb_train.mindrecord0.db\n", " ├── aclImdb_train.mindrecord1\n", " ├── aclImdb_train.mindrecord1.db\n", " ├── aclImdb_train.mindrecord2\n", " ├── aclImdb_train.mindrecord2.db\n", " ├── aclImdb_train.mindrecord3\n", " ├── aclImdb_train.mindrecord3.db\n", " └── weight.txt\n", "```\n", "\n", "- 以上各文件中:\n", " - 名称包含`aclImdb_train.mindrecord`的为转换后的MindRecord格式的训练数据集。\n", " - 名称包含`aclImdb_test.mindrecord`的为转换后的MindRecord格式的测试数据集。\n", " - `weight.txt`为预处理后自动生成的weight参数信息文件。\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. 定义创建数据集函数`lstm_create_dataset`,创建训练集`ds_train`。" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "import os\n", "import mindspore.dataset as ds\n", "\n", "\n", "def lstm_create_dataset(data_home, batch_size, repeat_num=1, training=True):\n", " \"\"\"Data operations.\"\"\"\n", " ds.config.set_seed(1)\n", " data_dir = os.path.join(data_home, \"aclImdb_train.mindrecord0\")\n", " if not training:\n", " data_dir = os.path.join(data_home, \"aclImdb_test.mindrecord0\")\n", "\n", " data_set = ds.MindDataset(data_dir, columns_list=[\"feature\", \"label\"], num_parallel_workers=4)\n", "\n", " # apply map operations on images\n", " data_set = data_set.shuffle(buffer_size=data_set.get_dataset_size())\n", " data_set = data_set.batch(batch_size=batch_size, drop_remainder=True)\n", " data_set = data_set.repeat(count=repeat_num)\n", "\n", " return data_set\n", "\n", "ds_train = lstm_create_dataset(args.preprocess_path, cfg.batch_size)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "5. 通过`create_dict_iterator`方法创建字典迭代器,读取已创建的数据集`ds_train`中的数据。\n", "\n", " 运行以下一段代码,读取第1个`batch`中的`label`数据列表,和第1个`batch`中第1个元素的`feature`数据。" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The first batch contains label below:\n", "[0 0 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1\n", " 0 0 0 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0]\n", "\n", "The feature of the first item in the first batch is below vector:\n", "[210974 227370 167874 221440 205821 250308 57410 167874 157597 211314\n", " 104140 154424 238018 167874 216357 23869 209921 187724 131973 144940\n", " 177558 221440 205821 119691 149127 137330 212709 117415 61509 42345\n", " 166849 155531 219231 64473 210974 103293 225985 181047 41304 210974\n", " 132905 33755 96216 8987 210974 195260 117816 15665 241057 8987\n", " 93501 155531 118935 110275 101659 181047 226216 133895 114115 6596\n", " 189694 210974 56753 3426 29344 103100 131973 46391 25351 35080\n", " 27231 69404 190304 212709 117415 157277 167874 210974 109102 92239\n", " 101085 123273 64473 117415 176947 27231 168206 219146 167874 210974\n", " 227370 18539 155531 219231 64473 210974 155781 93577 192315 157597\n", " 213189 66091 216583 100381 158491 181047 15368 221440 15353 137110\n", " 190640 197076 150070 117415 216583 60701 227370 238232 117593 210974\n", " 141131 167874 59907 238018 184247 156120 68959 117415 149618 167874\n", " 110810 216614 80083 10164 238272 245070 213136 205012 53662 199932\n", " 208769 153768 225055 86111 156120 55862 199932 25351 243753 156120\n", " 232746 239534 210974 1793 245184 210005 232746 8987 25351 239106\n", " 23869 89702 232746 175897 221440 202670 181047 117415 169623 206889\n", " 236706 155531 8803 208769 36551 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0\n", " 0 0 0 0 0 0 0 0 0 0]\n" ] } ], "source": [ "iterator = ds_train.create_dict_iterator().get_next()\n", "first_batch_label = iterator[\"label\"]\n", "first_batch_first_feature = iterator[\"feature\"][0]\n", "print(f\"The first batch contains label below:\\n{first_batch_label}\\n\")\n", "print(f\"The feature of the first item in the first batch is below vector:\\n{first_batch_first_feature}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 定义网络\n", "\n", "1. 导入初始化网络所需模块。" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from mindspore import Tensor, nn, context\n", "from mindspore.ops import operations as P\n", "from mindspore.train.serialization import load_param_into_net, load_checkpoint" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. 定义`lstm_default_state`函数来初始化网络参数及网络状态。" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "# Initialize short-term memory (h) and long-term memory (c) to 0\n", "def lstm_default_state(batch_size, hidden_size, num_layers, bidirectional):\n", " \"\"\"init default input.\"\"\"\n", " num_directions = 1\n", " if bidirectional:\n", " num_directions = 2\n", "\n", " if context.get_context(\"device_target\") == \"CPU\":\n", " h_list = []\n", " c_list = []\n", " i = 0\n", " while i < num_layers:\n", " hi = Tensor(np.zeros((num_directions, batch_size, hidden_size)).astype(np.float32))\n", " h_list.append(hi)\n", " ci = Tensor(np.zeros((num_directions, batch_size, hidden_size)).astype(np.float32))\n", " c_list.append(ci)\n", " i = i + 1\n", " h = tuple(h_list)\n", " c = tuple(c_list)\n", " return h, c\n", "\n", " h = Tensor(\n", " np.zeros((num_layers * num_directions, batch_size, hidden_size)).astype(np.float32))\n", " c = Tensor(\n", " np.zeros((num_layers * num_directions, batch_size, hidden_size)).astype(np.float32))\n", " return h, c" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. 使用`Cell`方法,定义网络结构(`SentimentNet`网络)。" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "class SentimentNet(nn.Cell):\n", " \"\"\"Sentiment network structure.\"\"\"\n", "\n", " def __init__(self,\n", " vocab_size,\n", " embed_size,\n", " num_hiddens,\n", " num_layers,\n", " bidirectional,\n", " num_classes,\n", " weight,\n", " batch_size):\n", " super(SentimentNet, self).__init__()\n", " # Mapp words to vectors\n", " self.embedding = nn.Embedding(vocab_size,\n", " embed_size,\n", " embedding_table=weight)\n", " self.embedding.embedding_table.requires_grad = False\n", " self.trans = P.Transpose()\n", " self.perm = (1, 0, 2)\n", " self.encoder = nn.LSTM(input_size=embed_size,\n", " hidden_size=num_hiddens,\n", " num_layers=num_layers,\n", " has_bias=True,\n", " bidirectional=bidirectional,\n", " dropout=0.0)\n", "\n", " self.h, self.c = lstm_default_state(batch_size, num_hiddens, num_layers, bidirectional)\n", "\n", " self.concat = P.Concat(1)\n", " if bidirectional:\n", " self.decoder = nn.Dense(num_hiddens * 4, num_classes)\n", " else:\n", " self.decoder = nn.Dense(num_hiddens * 2, num_classes)\n", "\n", " def construct(self, inputs):\n", " # input:(64,500,300)\n", " embeddings = self.embedding(inputs)\n", " embeddings = self.trans(embeddings, self.perm)\n", " output, _ = self.encoder(embeddings, (self.h, self.c))\n", " # states[i] size(64,200) -> encoding.size(64,400)\n", " encoding = self.concat((output[0], output[499]))\n", " outputs = self.decoder(encoding)\n", " return outputs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. 实例化`SentimentNet`,创建网络,此步骤用时约1分钟。" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "embedding_table = np.loadtxt(os.path.join(args.preprocess_path, \"weight.txt\")).astype(np.float32)\n", "network = SentimentNet(vocab_size=embedding_table.shape[0],\n", " embed_size=cfg.embed_size,\n", " num_hiddens=cfg.num_hiddens,\n", " num_layers=cfg.num_layers,\n", " bidirectional=cfg.bidirectional,\n", " num_classes=cfg.num_classes,\n", " weight=Tensor(embedding_table),\n", " batch_size=cfg.batch_size)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 定义优化器及损失函数\n", "\n", "运行以下一段代码,创建优化器和损失函数模型。" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "from mindspore import nn\n", "\n", "\n", "loss = nn.SoftmaxCrossEntropyWithLogits(is_grad=False, sparse=True)\n", "opt = nn.Momentum(network.trainable_params(), cfg.learning_rate, cfg.momentum)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 训练并保存模型\n", "\n", "加载训练数据集(`ds_train`)并配置好`CheckPoint`生成信息,然后使用`model.train`接口,进行模型训练,此步骤用时约7分钟。根据输出可以看到loss值随着训练逐步降低,最后达到0.262左右。" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "============== Starting Training ==============\n", "epoch: 1 step: 1, loss is 0.6938\n", "epoch: 1 step: 2, loss is 0.6922\n", "epoch: 1 step: 3, loss is 0.6917\n", "epoch: 1 step: 4, loss is 0.6952\n", "epoch: 1 step: 5, loss is 0.6868\n", "epoch: 1 step: 6, loss is 0.6982\n", "epoch: 1 step: 7, loss is 0.6856\n", "epoch: 1 step: 8, loss is 0.6819\n", "epoch: 1 step: 9, loss is 0.7372\n", "epoch: 1 step: 10, loss is 0.6948\n", "epoch: 1 step: 11, loss is 0.6961\n", "epoch: 1 step: 12, loss is 0.6975\n", "epoch: 1 step: 13, loss is 0.6931\n", "epoch: 1 step: 14, loss is 0.6903\n", "epoch: 1 step: 15, loss is 0.6720\n", "epoch: 1 step: 16, loss is 0.7079\n", "epoch: 1 step: 17, loss is 0.7125\n", "epoch: 1 step: 18, loss is 0.7477\n", "epoch: 1 step: 19, loss is 0.6924\n", "epoch: 1 step: 20, loss is 0.7085\n", "epoch: 1 step: 21, loss is 0.6958\n", "epoch: 1 step: 22, loss is 0.6918\n", "epoch: 1 step: 23, loss is 0.6985\n", "epoch: 1 step: 24, loss is 0.6919\n", "epoch: 1 step: 25, loss is 0.6858\n", "epoch: 1 step: 26, loss is 0.6796\n", "epoch: 1 step: 27, loss is 0.7113\n", "epoch: 1 step: 28, loss is 0.7065\n", "epoch: 1 step: 29, loss is 0.6910\n", "epoch: 1 step: 30, loss is 0.6896\n", "epoch: 1 step: 31, loss is 0.6968\n", "epoch: 1 step: 32, loss is 0.6906\n", "epoch: 1 step: 33, loss is 0.6932\n", "epoch: 1 step: 34, loss is 0.6872\n", "epoch: 1 step: 35, loss is 0.6887\n", "epoch: 1 step: 36, loss is 0.6789\n", "epoch: 1 step: 37, loss is 0.6729\n", "epoch: 1 step: 38, loss is 0.7344\n", "epoch: 1 step: 39, loss is 0.6946\n", "epoch: 1 step: 40, loss is 0.6977\n", "epoch: 1 step: 41, loss is 0.7134\n", "epoch: 1 step: 42, loss is 0.6807\n", "epoch: 1 step: 43, loss is 0.6798\n", "epoch: 1 step: 44, loss is 0.7065\n", "epoch: 1 step: 45, loss is 0.6930\n", "epoch: 1 step: 46, loss is 0.6925\n", "epoch: 1 step: 47, loss is 0.6824\n", "epoch: 1 step: 48, loss is 0.7224\n", "epoch: 1 step: 49, loss is 0.7051\n", "epoch: 1 step: 50, loss is 0.7195\n", "epoch: 1 step: 51, loss is 0.6927\n", "epoch: 1 step: 52, loss is 0.7097\n", "epoch: 1 step: 53, loss is 0.6849\n", "epoch: 1 step: 54, loss is 0.6892\n", "epoch: 1 step: 55, loss is 0.6926\n", "epoch: 1 step: 56, loss is 0.6934\n", "epoch: 1 step: 57, loss is 0.6891\n", "epoch: 1 step: 58, loss is 0.7068\n", "epoch: 1 step: 59, loss is 0.6920\n", "epoch: 1 step: 60, loss is 0.7120\n", "epoch: 1 step: 61, loss is 0.6930\n", "epoch: 1 step: 62, loss is 0.7112\n", "epoch: 1 step: 63, loss is 0.6845\n", "epoch: 1 step: 64, loss is 0.6958\n", "epoch: 1 step: 65, loss is 0.6909\n", "epoch: 1 step: 66, loss is 0.6876\n", "epoch: 1 step: 67, loss is 0.6800\n", "epoch: 1 step: 68, loss is 0.7101\n", "epoch: 1 step: 69, loss is 0.7078\n", "epoch: 1 step: 70, loss is 0.6890\n", "epoch: 1 step: 71, loss is 0.6859\n", "epoch: 1 step: 72, loss is 0.6913\n", "epoch: 1 step: 73, loss is 0.6935\n", "epoch: 1 step: 74, loss is 0.6905\n", "epoch: 1 step: 75, loss is 0.6936\n", "epoch: 1 step: 76, loss is 0.6901\n", "epoch: 1 step: 77, loss is 0.6826\n", "epoch: 1 step: 78, loss is 0.6930\n", "epoch: 1 step: 79, loss is 0.6936\n", "epoch: 1 step: 80, loss is 0.6921\n", "epoch: 1 step: 81, loss is 0.6839\n", "epoch: 1 step: 82, loss is 0.6910\n", "epoch: 1 step: 83, loss is 0.6954\n", "epoch: 1 step: 84, loss is 0.6838\n", "epoch: 1 step: 85, loss is 0.6928\n", "epoch: 1 step: 86, loss is 0.6931\n", "epoch: 1 step: 87, loss is 0.6784\n", "epoch: 1 step: 88, loss is 0.6821\n", "epoch: 1 step: 89, loss is 0.6899\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 1 step: 90, loss is 0.6860\n", "epoch: 1 step: 91, loss is 0.6900\n", "epoch: 1 step: 92, loss is 0.6846\n", "epoch: 1 step: 93, loss is 0.6833\n", "epoch: 1 step: 94, loss is 0.6901\n", "epoch: 1 step: 95, loss is 0.6831\n", "epoch: 1 step: 96, loss is 0.7010\n", "epoch: 1 step: 97, loss is 0.6925\n", "epoch: 1 step: 98, loss is 0.6768\n", "epoch: 1 step: 99, loss is 0.6848\n", "epoch: 1 step: 100, loss is 0.6925\n", "epoch: 1 step: 101, loss is 0.7067\n", "epoch: 1 step: 102, loss is 0.7053\n", "epoch: 1 step: 103, loss is 0.6841\n", "epoch: 1 step: 104, loss is 0.6882\n", "epoch: 1 step: 105, loss is 0.6794\n", "epoch: 1 step: 106, loss is 0.6754\n", "epoch: 1 step: 107, loss is 0.6788\n", "epoch: 1 step: 108, loss is 0.6930\n", "epoch: 1 step: 109, loss is 0.6792\n", "epoch: 1 step: 110, loss is 0.6889\n", "epoch: 1 step: 111, loss is 0.6800\n", "epoch: 1 step: 112, loss is 0.6881\n", "epoch: 1 step: 113, loss is 0.6866\n", "epoch: 1 step: 114, loss is 0.6963\n", "epoch: 1 step: 115, loss is 0.6698\n", "epoch: 1 step: 116, loss is 0.6795\n", "epoch: 1 step: 117, loss is 0.7177\n", "epoch: 1 step: 118, loss is 0.6559\n", "epoch: 1 step: 119, loss is 0.6949\n", "epoch: 1 step: 120, loss is 0.6934\n", "epoch: 1 step: 121, loss is 0.6854\n", "epoch: 1 step: 122, loss is 0.6730\n", "epoch: 1 step: 123, loss is 0.6616\n", "epoch: 1 step: 124, loss is 0.6572\n", "epoch: 1 step: 125, loss is 0.6612\n", "epoch: 1 step: 126, loss is 0.6623\n", "epoch: 1 step: 127, loss is 0.6790\n", "epoch: 1 step: 128, loss is 0.6518\n", "epoch: 1 step: 129, loss is 0.6196\n", "epoch: 1 step: 130, loss is 0.6518\n", "epoch: 1 step: 131, loss is 0.7111\n", "epoch: 1 step: 132, loss is 0.6345\n", "epoch: 1 step: 133, loss is 0.6846\n", "epoch: 1 step: 134, loss is 0.6700\n", "epoch: 1 step: 135, loss is 0.6939\n", "epoch: 1 step: 136, loss is 0.6846\n", "epoch: 1 step: 137, loss is 0.6408\n", "epoch: 1 step: 138, loss is 0.6886\n", "epoch: 1 step: 139, loss is 0.7377\n", "epoch: 1 step: 140, loss is 0.7049\n", "epoch: 1 step: 141, loss is 0.6946\n", "epoch: 1 step: 142, loss is 0.7178\n", "epoch: 1 step: 143, loss is 0.6664\n", "epoch: 1 step: 144, loss is 0.6791\n", "epoch: 1 step: 145, loss is 0.6599\n", "epoch: 1 step: 146, loss is 0.6665\n", "epoch: 1 step: 147, loss is 0.6800\n", "epoch: 1 step: 148, loss is 0.6777\n", "epoch: 1 step: 149, loss is 0.6690\n", "epoch: 1 step: 150, loss is 0.6887\n", "epoch: 1 step: 151, loss is 0.6878\n", "epoch: 1 step: 152, loss is 0.7036\n", "epoch: 1 step: 153, loss is 0.6570\n", "epoch: 1 step: 154, loss is 0.6865\n", "epoch: 1 step: 155, loss is 0.6811\n", "epoch: 1 step: 156, loss is 0.6733\n", "epoch: 1 step: 157, loss is 0.6737\n", "epoch: 1 step: 158, loss is 0.6779\n", "epoch: 1 step: 159, loss is 0.6573\n", "epoch: 1 step: 160, loss is 0.6782\n", "epoch: 1 step: 161, loss is 0.6704\n", "epoch: 1 step: 162, loss is 0.6862\n", "epoch: 1 step: 163, loss is 0.6740\n", "epoch: 1 step: 164, loss is 0.6466\n", "epoch: 1 step: 165, loss is 0.6506\n", "epoch: 1 step: 166, loss is 0.6750\n", "epoch: 1 step: 167, loss is 0.6466\n", "epoch: 1 step: 168, loss is 0.6610\n", "epoch: 1 step: 169, loss is 0.6550\n", "epoch: 1 step: 170, loss is 0.6806\n", "epoch: 1 step: 171, loss is 0.6723\n", "epoch: 1 step: 172, loss is 0.6515\n", "epoch: 1 step: 173, loss is 0.6704\n", "epoch: 1 step: 174, loss is 0.6675\n", "epoch: 1 step: 175, loss is 0.6535\n", "epoch: 1 step: 176, loss is 0.6660\n", "epoch: 1 step: 177, loss is 0.6390\n", "epoch: 1 step: 178, loss is 0.6589\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 1 step: 179, loss is 0.6838\n", "epoch: 1 step: 180, loss is 0.7194\n", "epoch: 1 step: 181, loss is 0.5811\n", "epoch: 1 step: 182, loss is 0.7140\n", "epoch: 1 step: 183, loss is 0.7558\n", "epoch: 1 step: 184, loss is 0.6419\n", "epoch: 1 step: 185, loss is 0.5970\n", "epoch: 1 step: 186, loss is 0.7137\n", "epoch: 1 step: 187, loss is 0.6258\n", "epoch: 1 step: 188, loss is 0.6423\n", "epoch: 1 step: 189, loss is 0.6785\n", "epoch: 1 step: 190, loss is 0.6613\n", "epoch: 1 step: 191, loss is 0.6538\n", "epoch: 1 step: 192, loss is 0.6377\n", "epoch: 1 step: 193, loss is 0.7727\n", "epoch: 1 step: 194, loss is 0.6539\n", "epoch: 1 step: 195, loss is 0.6855\n", "epoch: 1 step: 196, loss is 0.6523\n", "epoch: 1 step: 197, loss is 0.6892\n", "epoch: 1 step: 198, loss is 0.6495\n", "epoch: 1 step: 199, loss is 0.6546\n", "epoch: 1 step: 200, loss is 0.6856\n", "epoch: 1 step: 201, loss is 0.6739\n", "epoch: 1 step: 202, loss is 0.6894\n", "epoch: 1 step: 203, loss is 0.6625\n", "epoch: 1 step: 204, loss is 0.6656\n", "epoch: 1 step: 205, loss is 0.6302\n", "epoch: 1 step: 206, loss is 0.6459\n", "epoch: 1 step: 207, loss is 0.6626\n", "epoch: 1 step: 208, loss is 0.6679\n", "epoch: 1 step: 209, loss is 0.6209\n", "epoch: 1 step: 210, loss is 0.6665\n", "epoch: 1 step: 211, loss is 0.6486\n", "epoch: 1 step: 212, loss is 0.6675\n", "epoch: 1 step: 213, loss is 0.6709\n", "epoch: 1 step: 214, loss is 0.6539\n", "epoch: 1 step: 215, loss is 0.6299\n", "epoch: 1 step: 216, loss is 0.6258\n", "epoch: 1 step: 217, loss is 0.6113\n", "epoch: 1 step: 218, loss is 0.6566\n", "epoch: 1 step: 219, loss is 0.6309\n", "epoch: 1 step: 220, loss is 0.7080\n", "epoch: 1 step: 221, loss is 0.6745\n", "epoch: 1 step: 222, loss is 0.7327\n", "epoch: 1 step: 223, loss is 0.6556\n", "epoch: 1 step: 224, loss is 0.5917\n", "epoch: 1 step: 225, loss is 0.6625\n", "epoch: 1 step: 226, loss is 0.5993\n", "epoch: 1 step: 227, loss is 0.6162\n", "epoch: 1 step: 228, loss is 0.5698\n", "epoch: 1 step: 229, loss is 0.6088\n", "epoch: 1 step: 230, loss is 0.6212\n", "epoch: 1 step: 231, loss is 0.5745\n", "epoch: 1 step: 232, loss is 0.6947\n", "epoch: 1 step: 233, loss is 0.6499\n", "epoch: 1 step: 234, loss is 0.6867\n", "epoch: 1 step: 235, loss is 0.6241\n", "epoch: 1 step: 236, loss is 0.8216\n", "epoch: 1 step: 237, loss is 0.6029\n", "epoch: 1 step: 238, loss is 0.7373\n", "epoch: 1 step: 239, loss is 0.7275\n", "epoch: 1 step: 240, loss is 0.6317\n", "epoch: 1 step: 241, loss is 0.6836\n", "epoch: 1 step: 242, loss is 0.7143\n", "epoch: 1 step: 243, loss is 0.6408\n", "epoch: 1 step: 244, loss is 0.6520\n", "epoch: 1 step: 245, loss is 0.6602\n", "epoch: 1 step: 246, loss is 0.6279\n", "epoch: 1 step: 247, loss is 0.6336\n", "epoch: 1 step: 248, loss is 0.6832\n", "epoch: 1 step: 249, loss is 0.6762\n", "epoch: 1 step: 250, loss is 0.7123\n", "epoch: 1 step: 251, loss is 0.7057\n", "epoch: 1 step: 252, loss is 0.6579\n", "epoch: 1 step: 253, loss is 0.6746\n", "epoch: 1 step: 254, loss is 0.6690\n", "epoch: 1 step: 255, loss is 0.6963\n", "epoch: 1 step: 256, loss is 0.6519\n", "epoch: 1 step: 257, loss is 0.6771\n", "epoch: 1 step: 258, loss is 0.6355\n", "epoch: 1 step: 259, loss is 0.6587\n", "epoch: 1 step: 260, loss is 0.6374\n", "epoch: 1 step: 261, loss is 0.6249\n", "epoch: 1 step: 262, loss is 0.6486\n", "epoch: 1 step: 263, loss is 0.6340\n", "epoch: 1 step: 264, loss is 0.6180\n", "epoch: 1 step: 265, loss is 0.6825\n", "epoch: 1 step: 266, loss is 0.6412\n", "epoch: 1 step: 267, loss is 0.6883\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 1 step: 268, loss is 0.6293\n", "epoch: 1 step: 269, loss is 0.6679\n", "epoch: 1 step: 270, loss is 0.6610\n", "epoch: 1 step: 271, loss is 0.6144\n", "epoch: 1 step: 272, loss is 0.6461\n", "epoch: 1 step: 273, loss is 0.6446\n", "epoch: 1 step: 274, loss is 0.7186\n", "epoch: 1 step: 275, loss is 0.7003\n", "epoch: 1 step: 276, loss is 0.6935\n", "epoch: 1 step: 277, loss is 0.7605\n", "epoch: 1 step: 278, loss is 0.6664\n", "epoch: 1 step: 279, loss is 0.5582\n", "epoch: 1 step: 280, loss is 0.6123\n", "epoch: 1 step: 281, loss is 0.6410\n", "epoch: 1 step: 282, loss is 0.6696\n", "epoch: 1 step: 283, loss is 0.6637\n", "epoch: 1 step: 284, loss is 0.6558\n", "epoch: 1 step: 285, loss is 0.6364\n", "epoch: 1 step: 286, loss is 0.6613\n", "epoch: 1 step: 287, loss is 0.6815\n", "epoch: 1 step: 288, loss is 0.6551\n", "epoch: 1 step: 289, loss is 0.6071\n", "epoch: 1 step: 290, loss is 0.6287\n", "epoch: 1 step: 291, loss is 0.6090\n", "epoch: 1 step: 292, loss is 0.6697\n", "epoch: 1 step: 293, loss is 0.6100\n", "epoch: 1 step: 294, loss is 0.6452\n", "epoch: 1 step: 295, loss is 0.5721\n", "epoch: 1 step: 296, loss is 0.6412\n", "epoch: 1 step: 297, loss is 0.6133\n", "epoch: 1 step: 298, loss is 0.7127\n", "epoch: 1 step: 299, loss is 0.6043\n", "epoch: 1 step: 300, loss is 0.6349\n", "epoch: 1 step: 301, loss is 0.6233\n", "epoch: 1 step: 302, loss is 0.6955\n", "epoch: 1 step: 303, loss is 0.5825\n", "epoch: 1 step: 304, loss is 0.6163\n", "epoch: 1 step: 305, loss is 0.6739\n", "epoch: 1 step: 306, loss is 0.6409\n", "epoch: 1 step: 307, loss is 0.6608\n", "epoch: 1 step: 308, loss is 0.6505\n", "epoch: 1 step: 309, loss is 0.6090\n", "epoch: 1 step: 310, loss is 0.6088\n", "epoch: 1 step: 311, loss is 0.6254\n", "epoch: 1 step: 312, loss is 0.6485\n", "epoch: 1 step: 313, loss is 0.7142\n", "epoch: 1 step: 314, loss is 0.5787\n", "epoch: 1 step: 315, loss is 0.6295\n", "epoch: 1 step: 316, loss is 0.6210\n", "epoch: 1 step: 317, loss is 0.7650\n", "epoch: 1 step: 318, loss is 0.6355\n", "epoch: 1 step: 319, loss is 0.6717\n", "epoch: 1 step: 320, loss is 0.7392\n", "epoch: 1 step: 321, loss is 0.6969\n", "epoch: 1 step: 322, loss is 0.6394\n", "epoch: 1 step: 323, loss is 0.6603\n", "epoch: 1 step: 324, loss is 0.6058\n", "epoch: 1 step: 325, loss is 0.6332\n", "epoch: 1 step: 326, loss is 0.6236\n", "epoch: 1 step: 327, loss is 0.6483\n", "epoch: 1 step: 328, loss is 0.6229\n", "epoch: 1 step: 329, loss is 0.6022\n", "epoch: 1 step: 330, loss is 0.6393\n", "epoch: 1 step: 331, loss is 0.5813\n", "epoch: 1 step: 332, loss is 0.6013\n", "epoch: 1 step: 333, loss is 0.6026\n", "epoch: 1 step: 334, loss is 0.5768\n", "epoch: 1 step: 335, loss is 0.6915\n", "epoch: 1 step: 336, loss is 0.6256\n", "epoch: 1 step: 337, loss is 0.7781\n", "epoch: 1 step: 338, loss is 0.7050\n", "epoch: 1 step: 339, loss is 0.7328\n", "epoch: 1 step: 340, loss is 0.7076\n", "epoch: 1 step: 341, loss is 0.7222\n", "epoch: 1 step: 342, loss is 0.6022\n", "epoch: 1 step: 343, loss is 0.6293\n", "epoch: 1 step: 344, loss is 0.6443\n", "epoch: 1 step: 345, loss is 0.6849\n", "epoch: 1 step: 346, loss is 0.6910\n", "epoch: 1 step: 347, loss is 0.7112\n", "epoch: 1 step: 348, loss is 0.7019\n", "epoch: 1 step: 349, loss is 0.6608\n", "epoch: 1 step: 350, loss is 0.6993\n", "epoch: 1 step: 351, loss is 0.6632\n", "epoch: 1 step: 352, loss is 0.6706\n", "epoch: 1 step: 353, loss is 0.6401\n", "epoch: 1 step: 354, loss is 0.6503\n", "epoch: 1 step: 355, loss is 0.6477\n", "epoch: 1 step: 356, loss is 0.6509\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 1 step: 357, loss is 0.6403\n", "epoch: 1 step: 358, loss is 0.6679\n", "epoch: 1 step: 359, loss is 0.6559\n", "epoch: 1 step: 360, loss is 0.6298\n", "epoch: 1 step: 361, loss is 0.6193\n", "epoch: 1 step: 362, loss is 0.6649\n", "epoch: 1 step: 363, loss is 0.6179\n", "epoch: 1 step: 364, loss is 0.6771\n", "epoch: 1 step: 365, loss is 0.6193\n", "epoch: 1 step: 366, loss is 0.5615\n", "epoch: 1 step: 367, loss is 0.6999\n", "epoch: 1 step: 368, loss is 0.6330\n", "epoch: 1 step: 369, loss is 0.6941\n", "epoch: 1 step: 370, loss is 0.7298\n", "epoch: 1 step: 371, loss is 0.7247\n", "epoch: 1 step: 372, loss is 0.5866\n", "epoch: 1 step: 373, loss is 0.6025\n", "epoch: 1 step: 374, loss is 0.6047\n", "epoch: 1 step: 375, loss is 0.5705\n", "epoch: 1 step: 376, loss is 0.7009\n", "epoch: 1 step: 377, loss is 0.6272\n", "epoch: 1 step: 378, loss is 0.6697\n", "epoch: 1 step: 379, loss is 0.6578\n", "epoch: 1 step: 380, loss is 0.5431\n", "epoch: 1 step: 381, loss is 0.7024\n", "epoch: 1 step: 382, loss is 0.5866\n", "epoch: 1 step: 383, loss is 0.6498\n", "epoch: 1 step: 384, loss is 0.5926\n", "epoch: 1 step: 385, loss is 0.6094\n", "epoch: 1 step: 386, loss is 0.5663\n", "epoch: 1 step: 387, loss is 0.6087\n", "epoch: 1 step: 388, loss is 0.5394\n", "epoch: 1 step: 389, loss is 0.7825\n", "epoch: 1 step: 390, loss is 0.6069\n", "Epoch time: 40590.832, per step time: 104.079, avg loss: 0.668\n", "************************************************************\n", "epoch: 2 step: 1, loss is 0.7305\n", "epoch: 2 step: 2, loss is 0.7044\n", "epoch: 2 step: 3, loss is 0.5188\n", "epoch: 2 step: 4, loss is 0.5801\n", "epoch: 2 step: 5, loss is 0.6629\n", "epoch: 2 step: 6, loss is 0.6763\n", "epoch: 2 step: 7, loss is 0.6314\n", "epoch: 2 step: 8, loss is 0.6936\n", "epoch: 2 step: 9, loss is 0.5945\n", "epoch: 2 step: 10, loss is 0.7017\n", "epoch: 2 step: 11, loss is 0.6935\n", "epoch: 2 step: 12, loss is 0.6426\n", "epoch: 2 step: 13, loss is 0.6689\n", "epoch: 2 step: 14, loss is 0.6623\n", "epoch: 2 step: 15, loss is 0.6948\n", "epoch: 2 step: 16, loss is 0.6518\n", "epoch: 2 step: 17, loss is 0.6611\n", "epoch: 2 step: 18, loss is 0.6519\n", "epoch: 2 step: 19, loss is 0.6549\n", "epoch: 2 step: 20, loss is 0.6685\n", "epoch: 2 step: 21, loss is 0.6782\n", "epoch: 2 step: 22, loss is 0.6741\n", "epoch: 2 step: 23, loss is 0.6394\n", "epoch: 2 step: 24, loss is 0.6587\n", "epoch: 2 step: 25, loss is 0.6442\n", "epoch: 2 step: 26, loss is 0.6268\n", "epoch: 2 step: 27, loss is 0.6517\n", "epoch: 2 step: 28, loss is 0.6195\n", "epoch: 2 step: 29, loss is 0.6192\n", "epoch: 2 step: 30, loss is 0.6432\n", "epoch: 2 step: 31, loss is 0.6170\n", "epoch: 2 step: 32, loss is 0.6446\n", "epoch: 2 step: 33, loss is 0.6830\n", "epoch: 2 step: 34, loss is 0.6451\n", "epoch: 2 step: 35, loss is 0.6049\n", "epoch: 2 step: 36, loss is 0.6155\n", "epoch: 2 step: 37, loss is 0.6176\n", "epoch: 2 step: 38, loss is 0.7299\n", "epoch: 2 step: 39, loss is 0.6515\n", "epoch: 2 step: 40, loss is 0.5711\n", "epoch: 2 step: 41, loss is 0.6730\n", "epoch: 2 step: 42, loss is 0.6650\n", "epoch: 2 step: 43, loss is 0.6340\n", "epoch: 2 step: 44, loss is 0.5755\n", "epoch: 2 step: 45, loss is 0.6111\n", "epoch: 2 step: 46, loss is 0.5814\n", "epoch: 2 step: 47, loss is 0.6620\n", "epoch: 2 step: 48, loss is 0.5942\n", "epoch: 2 step: 49, loss is 0.7082\n", "epoch: 2 step: 50, loss is 0.5765\n", "epoch: 2 step: 51, loss is 0.5995\n", "epoch: 2 step: 52, loss is 0.6466\n", "epoch: 2 step: 53, loss is 0.5725\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 2 step: 54, loss is 0.5748\n", "epoch: 2 step: 55, loss is 0.5293\n", "epoch: 2 step: 56, loss is 0.5660\n", "epoch: 2 step: 57, loss is 0.5283\n", "epoch: 2 step: 58, loss is 0.5347\n", "epoch: 2 step: 59, loss is 0.5154\n", "epoch: 2 step: 60, loss is 0.6732\n", "epoch: 2 step: 61, loss is 0.5197\n", "epoch: 2 step: 62, loss is 0.7254\n", "epoch: 2 step: 63, loss is 0.9070\n", "epoch: 2 step: 64, loss is 0.5558\n", "epoch: 2 step: 65, loss is 1.0045\n", "epoch: 2 step: 66, loss is 0.8933\n", "epoch: 2 step: 67, loss is 1.0105\n", "epoch: 2 step: 68, loss is 0.6910\n", "epoch: 2 step: 69, loss is 0.6372\n", "epoch: 2 step: 70, loss is 0.6704\n", "epoch: 2 step: 71, loss is 0.7066\n", "epoch: 2 step: 72, loss is 0.7282\n", "epoch: 2 step: 73, loss is 0.7256\n", "epoch: 2 step: 74, loss is 0.7049\n", "epoch: 2 step: 75, loss is 0.7688\n", "epoch: 2 step: 76, loss is 0.6864\n", "epoch: 2 step: 77, loss is 0.6767\n", "epoch: 2 step: 78, loss is 0.6959\n", "epoch: 2 step: 79, loss is 0.6960\n", "epoch: 2 step: 80, loss is 0.6875\n", "epoch: 2 step: 81, loss is 0.6882\n", "epoch: 2 step: 82, loss is 0.6958\n", "epoch: 2 step: 83, loss is 0.6996\n", "epoch: 2 step: 84, loss is 0.6975\n", "epoch: 2 step: 85, loss is 0.6863\n", "epoch: 2 step: 86, loss is 0.6881\n", "epoch: 2 step: 87, loss is 0.6797\n", "epoch: 2 step: 88, loss is 0.6784\n", "epoch: 2 step: 89, loss is 0.6775\n", "epoch: 2 step: 90, loss is 0.6681\n", "epoch: 2 step: 91, loss is 0.6906\n", "epoch: 2 step: 92, loss is 0.6787\n", "epoch: 2 step: 93, loss is 0.6724\n", "epoch: 2 step: 94, loss is 0.6556\n", "epoch: 2 step: 95, loss is 0.6690\n", "epoch: 2 step: 96, loss is 0.6389\n", "epoch: 2 step: 97, loss is 0.6665\n", "epoch: 2 step: 98, loss is 0.6657\n", "epoch: 2 step: 99, loss is 0.6476\n", "epoch: 2 step: 100, loss is 0.6320\n", "epoch: 2 step: 101, loss is 0.6269\n", "epoch: 2 step: 102, loss is 0.6891\n", "epoch: 2 step: 103, loss is 0.6737\n", "epoch: 2 step: 104, loss is 0.6194\n", "epoch: 2 step: 105, loss is 0.6310\n", "epoch: 2 step: 106, loss is 0.6765\n", "epoch: 2 step: 107, loss is 0.5332\n", "epoch: 2 step: 108, loss is 0.6403\n", "epoch: 2 step: 109, loss is 0.6084\n", "epoch: 2 step: 110, loss is 0.6587\n", "epoch: 2 step: 111, loss is 0.5721\n", "epoch: 2 step: 112, loss is 0.6253\n", "epoch: 2 step: 113, loss is 0.5386\n", "epoch: 2 step: 114, loss is 0.6135\n", "epoch: 2 step: 115, loss is 0.4770\n", "epoch: 2 step: 116, loss is 0.5140\n", "epoch: 2 step: 117, loss is 0.7868\n", "epoch: 2 step: 118, loss is 0.6497\n", "epoch: 2 step: 119, loss is 0.6640\n", "epoch: 2 step: 120, loss is 0.7578\n", "epoch: 2 step: 121, loss is 0.6687\n", "epoch: 2 step: 122, loss is 0.5661\n", "epoch: 2 step: 123, loss is 0.5133\n", "epoch: 2 step: 124, loss is 0.6696\n", "epoch: 2 step: 125, loss is 0.5755\n", "epoch: 2 step: 126, loss is 0.6681\n", "epoch: 2 step: 127, loss is 0.6086\n", "epoch: 2 step: 128, loss is 0.6800\n", "epoch: 2 step: 129, loss is 0.6341\n", "epoch: 2 step: 130, loss is 0.5987\n", "epoch: 2 step: 131, loss is 0.7033\n", "epoch: 2 step: 132, loss is 0.6140\n", "epoch: 2 step: 133, loss is 0.6079\n", "epoch: 2 step: 134, loss is 0.7079\n", "epoch: 2 step: 135, loss is 0.5892\n", "epoch: 2 step: 136, loss is 0.6120\n", "epoch: 2 step: 137, loss is 0.5910\n", "epoch: 2 step: 138, loss is 0.6155\n", "epoch: 2 step: 139, loss is 0.5877\n", "epoch: 2 step: 140, loss is 0.6593\n", "epoch: 2 step: 141, loss is 0.6068\n", "epoch: 2 step: 142, loss is 0.5731\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 2 step: 143, loss is 0.5716\n", "epoch: 2 step: 144, loss is 0.6271\n", "epoch: 2 step: 145, loss is 0.5050\n", "epoch: 2 step: 146, loss is 0.5590\n", "epoch: 2 step: 147, loss is 0.6321\n", "epoch: 2 step: 148, loss is 0.6130\n", "epoch: 2 step: 149, loss is 0.5702\n", "epoch: 2 step: 150, loss is 0.5732\n", "epoch: 2 step: 151, loss is 0.5903\n", "epoch: 2 step: 152, loss is 0.5511\n", "epoch: 2 step: 153, loss is 0.6821\n", "epoch: 2 step: 154, loss is 0.4778\n", "epoch: 2 step: 155, loss is 0.6927\n", "epoch: 2 step: 156, loss is 0.5322\n", "epoch: 2 step: 157, loss is 0.4992\n", "epoch: 2 step: 158, loss is 0.5179\n", "epoch: 2 step: 159, loss is 0.7331\n", "epoch: 2 step: 160, loss is 0.6702\n", "epoch: 2 step: 161, loss is 0.5674\n", "epoch: 2 step: 162, loss is 0.6555\n", "epoch: 2 step: 163, loss is 0.6740\n", "epoch: 2 step: 164, loss is 0.6001\n", "epoch: 2 step: 165, loss is 0.6950\n", "epoch: 2 step: 166, loss is 0.6409\n", "epoch: 2 step: 167, loss is 0.5637\n", "epoch: 2 step: 168, loss is 0.5931\n", "epoch: 2 step: 169, loss is 0.5834\n", "epoch: 2 step: 170, loss is 0.6347\n", "epoch: 2 step: 171, loss is 0.5378\n", "epoch: 2 step: 172, loss is 0.5672\n", "epoch: 2 step: 173, loss is 0.5801\n", "epoch: 2 step: 174, loss is 0.4901\n", "epoch: 2 step: 175, loss is 0.6125\n", "epoch: 2 step: 176, loss is 0.5406\n", "epoch: 2 step: 177, loss is 0.5562\n", "epoch: 2 step: 178, loss is 0.5569\n", "epoch: 2 step: 179, loss is 0.3951\n", "epoch: 2 step: 180, loss is 0.5006\n", "epoch: 2 step: 181, loss is 0.5864\n", "epoch: 2 step: 182, loss is 0.4957\n", "epoch: 2 step: 183, loss is 0.6649\n", "epoch: 2 step: 184, loss is 0.6399\n", "epoch: 2 step: 185, loss is 0.5149\n", "epoch: 2 step: 186, loss is 0.4174\n", "epoch: 2 step: 187, loss is 0.7648\n", "epoch: 2 step: 188, loss is 0.5523\n", "epoch: 2 step: 189, loss is 0.5934\n", "epoch: 2 step: 190, loss is 0.6805\n", "epoch: 2 step: 191, loss is 0.6683\n", "epoch: 2 step: 192, loss is 0.6629\n", "epoch: 2 step: 193, loss is 0.6230\n", "epoch: 2 step: 194, loss is 0.6168\n", "epoch: 2 step: 195, loss is 0.6821\n", "epoch: 2 step: 196, loss is 0.7211\n", "epoch: 2 step: 197, loss is 0.6533\n", "epoch: 2 step: 198, loss is 0.6404\n", "epoch: 2 step: 199, loss is 0.6608\n", "epoch: 2 step: 200, loss is 0.6375\n", "epoch: 2 step: 201, loss is 0.6338\n", "epoch: 2 step: 202, loss is 0.6354\n", "epoch: 2 step: 203, loss is 0.6465\n", "epoch: 2 step: 204, loss is 0.6536\n", "epoch: 2 step: 205, loss is 0.5844\n", "epoch: 2 step: 206, loss is 0.6177\n", "epoch: 2 step: 207, loss is 0.5648\n", "epoch: 2 step: 208, loss is 0.6025\n", "epoch: 2 step: 209, loss is 0.6338\n", "epoch: 2 step: 210, loss is 0.6129\n", "epoch: 2 step: 211, loss is 0.5973\n", "epoch: 2 step: 212, loss is 0.5701\n", "epoch: 2 step: 213, loss is 0.6290\n", "epoch: 2 step: 214, loss is 0.6365\n", "epoch: 2 step: 215, loss is 0.5804\n", "epoch: 2 step: 216, loss is 0.5661\n", "epoch: 2 step: 217, loss is 0.5607\n", "epoch: 2 step: 218, loss is 0.5945\n", "epoch: 2 step: 219, loss is 0.5714\n", "epoch: 2 step: 220, loss is 0.5354\n", "epoch: 2 step: 221, loss is 0.5116\n", "epoch: 2 step: 222, loss is 0.6198\n", "epoch: 2 step: 223, loss is 0.6505\n", "epoch: 2 step: 224, loss is 0.5248\n", "epoch: 2 step: 225, loss is 0.6669\n", "epoch: 2 step: 226, loss is 0.5932\n", "epoch: 2 step: 227, loss is 0.5155\n", "epoch: 2 step: 228, loss is 0.7595\n", "epoch: 2 step: 229, loss is 0.5325\n", "epoch: 2 step: 230, loss is 0.4261\n", "epoch: 2 step: 231, loss is 0.7548\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 2 step: 232, loss is 0.5745\n", "epoch: 2 step: 233, loss is 0.5614\n", "epoch: 2 step: 234, loss is 0.5357\n", "epoch: 2 step: 235, loss is 0.5186\n", "epoch: 2 step: 236, loss is 0.6700\n", "epoch: 2 step: 237, loss is 0.5584\n", "epoch: 2 step: 238, loss is 0.5589\n", "epoch: 2 step: 239, loss is 0.5363\n", "epoch: 2 step: 240, loss is 0.5776\n", "epoch: 2 step: 241, loss is 0.7283\n", "epoch: 2 step: 242, loss is 0.5002\n", "epoch: 2 step: 243, loss is 0.5267\n", "epoch: 2 step: 244, loss is 0.7191\n", "epoch: 2 step: 245, loss is 0.5527\n", "epoch: 2 step: 246, loss is 0.6456\n", "epoch: 2 step: 247, loss is 0.4888\n", "epoch: 2 step: 248, loss is 0.5648\n", "epoch: 2 step: 249, loss is 0.5652\n", "epoch: 2 step: 250, loss is 0.5415\n", "epoch: 2 step: 251, loss is 0.5158\n", "epoch: 2 step: 252, loss is 0.6121\n", "epoch: 2 step: 253, loss is 0.4672\n", "epoch: 2 step: 254, loss is 0.5177\n", "epoch: 2 step: 255, loss is 0.5891\n", "epoch: 2 step: 256, loss is 0.5838\n", "epoch: 2 step: 257, loss is 0.5129\n", "epoch: 2 step: 258, loss is 0.4615\n", "epoch: 2 step: 259, loss is 0.4765\n", "epoch: 2 step: 260, loss is 0.5161\n", "epoch: 2 step: 261, loss is 0.5247\n", "epoch: 2 step: 262, loss is 0.4824\n", "epoch: 2 step: 263, loss is 0.4950\n", "epoch: 2 step: 264, loss is 0.4001\n", "epoch: 2 step: 265, loss is 0.3896\n", "epoch: 2 step: 266, loss is 0.5145\n", "epoch: 2 step: 267, loss is 0.4265\n", "epoch: 2 step: 268, loss is 0.3818\n", "epoch: 2 step: 269, loss is 0.2814\n", "epoch: 2 step: 270, loss is 0.5369\n", "epoch: 2 step: 271, loss is 0.3595\n", "epoch: 2 step: 272, loss is 0.4517\n", "epoch: 2 step: 273, loss is 0.7099\n", "epoch: 2 step: 274, loss is 0.4052\n", "epoch: 2 step: 275, loss is 0.4128\n", "epoch: 2 step: 276, loss is 0.7017\n", "epoch: 2 step: 277, loss is 0.4718\n", "epoch: 2 step: 278, loss is 0.4687\n", "epoch: 2 step: 279, loss is 0.4270\n", "epoch: 2 step: 280, loss is 0.4992\n", "epoch: 2 step: 281, loss is 0.4861\n", "epoch: 2 step: 282, loss is 0.5556\n", "epoch: 2 step: 283, loss is 0.5015\n", "epoch: 2 step: 284, loss is 0.5049\n", "epoch: 2 step: 285, loss is 0.5007\n", "epoch: 2 step: 286, loss is 0.5154\n", "epoch: 2 step: 287, loss is 0.5927\n", "epoch: 2 step: 288, loss is 0.5553\n", "epoch: 2 step: 289, loss is 0.5091\n", "epoch: 2 step: 290, loss is 0.4555\n", "epoch: 2 step: 291, loss is 0.4482\n", "epoch: 2 step: 292, loss is 0.4880\n", "epoch: 2 step: 293, loss is 0.4739\n", "epoch: 2 step: 294, loss is 0.4351\n", "epoch: 2 step: 295, loss is 0.5434\n", "epoch: 2 step: 296, loss is 0.4808\n", "epoch: 2 step: 297, loss is 0.5042\n", "epoch: 2 step: 298, loss is 0.4165\n", "epoch: 2 step: 299, loss is 0.3246\n", "epoch: 2 step: 300, loss is 0.4363\n", "epoch: 2 step: 301, loss is 0.4205\n", "epoch: 2 step: 302, loss is 0.4846\n", "epoch: 2 step: 303, loss is 0.3752\n", "epoch: 2 step: 304, loss is 0.5174\n", "epoch: 2 step: 305, loss is 0.4815\n", "epoch: 2 step: 306, loss is 0.5788\n", "epoch: 2 step: 307, loss is 0.3501\n", "epoch: 2 step: 308, loss is 0.5348\n", "epoch: 2 step: 309, loss is 0.4691\n", "epoch: 2 step: 310, loss is 0.5035\n", "epoch: 2 step: 311, loss is 0.5681\n", "epoch: 2 step: 312, loss is 0.5657\n", "epoch: 2 step: 313, loss is 0.4784\n", "epoch: 2 step: 314, loss is 0.5547\n", "epoch: 2 step: 315, loss is 0.5812\n", "epoch: 2 step: 316, loss is 0.4795\n", "epoch: 2 step: 317, loss is 0.5181\n", "epoch: 2 step: 318, loss is 0.4481\n", "epoch: 2 step: 319, loss is 0.3989\n", "epoch: 2 step: 320, loss is 0.4208\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 2 step: 321, loss is 0.3705\n", "epoch: 2 step: 322, loss is 0.4149\n", "epoch: 2 step: 323, loss is 0.4527\n", "epoch: 2 step: 324, loss is 0.3693\n", "epoch: 2 step: 325, loss is 0.4761\n", "epoch: 2 step: 326, loss is 0.3317\n", "epoch: 2 step: 327, loss is 0.5316\n", "epoch: 2 step: 328, loss is 0.4163\n", "epoch: 2 step: 329, loss is 0.3904\n", "epoch: 2 step: 330, loss is 0.6191\n", "epoch: 2 step: 331, loss is 0.3622\n", "epoch: 2 step: 332, loss is 0.4183\n", "epoch: 2 step: 333, loss is 0.5975\n", "epoch: 2 step: 334, loss is 0.3783\n", "epoch: 2 step: 335, loss is 0.4401\n", "epoch: 2 step: 336, loss is 0.3810\n", "epoch: 2 step: 337, loss is 0.3814\n", "epoch: 2 step: 338, loss is 0.4297\n", "epoch: 2 step: 339, loss is 0.2906\n", "epoch: 2 step: 340, loss is 0.3323\n", "epoch: 2 step: 341, loss is 0.4465\n", "epoch: 2 step: 342, loss is 0.4510\n", "epoch: 2 step: 343, loss is 0.4552\n", "epoch: 2 step: 344, loss is 0.3955\n", "epoch: 2 step: 345, loss is 0.3395\n", "epoch: 2 step: 346, loss is 0.5065\n", "epoch: 2 step: 347, loss is 0.4705\n", "epoch: 2 step: 348, loss is 0.4732\n", "epoch: 2 step: 349, loss is 0.3764\n", "epoch: 2 step: 350, loss is 0.3716\n", "epoch: 2 step: 351, loss is 0.4724\n", "epoch: 2 step: 352, loss is 0.3549\n", "epoch: 2 step: 353, loss is 0.4010\n", "epoch: 2 step: 354, loss is 0.4539\n", "epoch: 2 step: 355, loss is 0.5552\n", "epoch: 2 step: 356, loss is 0.3861\n", "epoch: 2 step: 357, loss is 0.4465\n", "epoch: 2 step: 358, loss is 0.3775\n", "epoch: 2 step: 359, loss is 0.5041\n", "epoch: 2 step: 360, loss is 0.4034\n", "epoch: 2 step: 361, loss is 0.3989\n", "epoch: 2 step: 362, loss is 0.4578\n", "epoch: 2 step: 363, loss is 0.4256\n", "epoch: 2 step: 364, loss is 0.4483\n", "epoch: 2 step: 365, loss is 0.5041\n", "epoch: 2 step: 366, loss is 0.4134\n", "epoch: 2 step: 367, loss is 0.5226\n", "epoch: 2 step: 368, loss is 0.3384\n", "epoch: 2 step: 369, loss is 0.4365\n", "epoch: 2 step: 370, loss is 0.3390\n", "epoch: 2 step: 371, loss is 0.3794\n", "epoch: 2 step: 372, loss is 0.4667\n", "epoch: 2 step: 373, loss is 0.2798\n", "epoch: 2 step: 374, loss is 0.4289\n", "epoch: 2 step: 375, loss is 0.4372\n", "epoch: 2 step: 376, loss is 0.3608\n", "epoch: 2 step: 377, loss is 0.3193\n", "epoch: 2 step: 378, loss is 0.3597\n", "epoch: 2 step: 379, loss is 0.4859\n", "epoch: 2 step: 380, loss is 0.3780\n", "epoch: 2 step: 381, loss is 0.3072\n", "epoch: 2 step: 382, loss is 0.4727\n", "epoch: 2 step: 383, loss is 0.4112\n", "epoch: 2 step: 384, loss is 0.4523\n", "epoch: 2 step: 385, loss is 0.3574\n", "epoch: 2 step: 386, loss is 0.3551\n", "epoch: 2 step: 387, loss is 0.5766\n", "epoch: 2 step: 388, loss is 0.5247\n", "epoch: 2 step: 389, loss is 0.4281\n", "epoch: 2 step: 390, loss is 0.4206\n", "Epoch time: 41081.172, per step time: 105.336, avg loss: 0.564\n", "************************************************************\n", "epoch: 3 step: 1, loss is 0.3717\n", "epoch: 3 step: 2, loss is 0.4016\n", "epoch: 3 step: 3, loss is 0.4964\n", "epoch: 3 step: 4, loss is 0.4364\n", "epoch: 3 step: 5, loss is 0.4573\n", "epoch: 3 step: 6, loss is 0.4915\n", "epoch: 3 step: 7, loss is 0.3635\n", "epoch: 3 step: 8, loss is 0.4102\n", "epoch: 3 step: 9, loss is 0.4057\n", "epoch: 3 step: 10, loss is 0.4424\n", "epoch: 3 step: 11, loss is 0.4570\n", "epoch: 3 step: 12, loss is 0.4399\n", "epoch: 3 step: 13, loss is 0.3412\n", "epoch: 3 step: 14, loss is 0.4659\n", "epoch: 3 step: 15, loss is 0.5166\n", "epoch: 3 step: 16, loss is 0.3432\n", "epoch: 3 step: 17, loss is 0.2530\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 3 step: 18, loss is 0.3993\n", "epoch: 3 step: 19, loss is 0.4321\n", "epoch: 3 step: 20, loss is 0.3459\n", "epoch: 3 step: 21, loss is 0.3473\n", "epoch: 3 step: 22, loss is 0.4423\n", "epoch: 3 step: 23, loss is 0.5265\n", "epoch: 3 step: 24, loss is 0.4170\n", "epoch: 3 step: 25, loss is 0.4483\n", "epoch: 3 step: 26, loss is 0.5304\n", "epoch: 3 step: 27, loss is 0.4433\n", "epoch: 3 step: 28, loss is 0.4486\n", "epoch: 3 step: 29, loss is 0.3785\n", "epoch: 3 step: 30, loss is 0.4524\n", "epoch: 3 step: 31, loss is 0.4300\n", "epoch: 3 step: 32, loss is 0.3490\n", "epoch: 3 step: 33, loss is 0.4418\n", "epoch: 3 step: 34, loss is 0.4400\n", "epoch: 3 step: 35, loss is 0.4215\n", "epoch: 3 step: 36, loss is 0.4959\n", "epoch: 3 step: 37, loss is 0.4083\n", "epoch: 3 step: 38, loss is 0.3641\n", "epoch: 3 step: 39, loss is 0.4726\n", "epoch: 3 step: 40, loss is 0.3642\n", "epoch: 3 step: 41, loss is 0.4058\n", "epoch: 3 step: 42, loss is 0.4929\n", "epoch: 3 step: 43, loss is 0.3960\n", "epoch: 3 step: 44, loss is 0.5293\n", "epoch: 3 step: 45, loss is 0.4512\n", "epoch: 3 step: 46, loss is 0.4348\n", "epoch: 3 step: 47, loss is 0.3913\n", "epoch: 3 step: 48, loss is 0.5439\n", "epoch: 3 step: 49, loss is 0.3946\n", "epoch: 3 step: 50, loss is 0.3742\n", "epoch: 3 step: 51, loss is 0.3904\n", "epoch: 3 step: 52, loss is 0.3143\n", "epoch: 3 step: 53, loss is 0.3225\n", "epoch: 3 step: 54, loss is 0.5099\n", "epoch: 3 step: 55, loss is 0.3449\n", "epoch: 3 step: 56, loss is 0.3859\n", "epoch: 3 step: 57, loss is 0.3710\n", "epoch: 3 step: 58, loss is 0.3936\n", "epoch: 3 step: 59, loss is 0.2827\n", "epoch: 3 step: 60, loss is 0.2523\n", "epoch: 3 step: 61, loss is 0.2955\n", "epoch: 3 step: 62, loss is 0.3792\n", "epoch: 3 step: 63, loss is 0.3951\n", "epoch: 3 step: 64, loss is 0.3538\n", "epoch: 3 step: 65, loss is 0.2615\n", "epoch: 3 step: 66, loss is 0.2563\n", "epoch: 3 step: 67, loss is 0.3461\n", "epoch: 3 step: 68, loss is 0.4189\n", "epoch: 3 step: 69, loss is 0.1861\n", "epoch: 3 step: 70, loss is 0.5654\n", "epoch: 3 step: 71, loss is 0.3408\n", "epoch: 3 step: 72, loss is 0.4145\n", "epoch: 3 step: 73, loss is 0.3291\n", "epoch: 3 step: 74, loss is 0.3935\n", "epoch: 3 step: 75, loss is 0.4106\n", "epoch: 3 step: 76, loss is 0.4341\n", "epoch: 3 step: 77, loss is 0.3573\n", "epoch: 3 step: 78, loss is 0.2479\n", "epoch: 3 step: 79, loss is 0.3640\n", "epoch: 3 step: 80, loss is 0.2931\n", "epoch: 3 step: 81, loss is 0.4537\n", "epoch: 3 step: 82, loss is 0.3663\n", "epoch: 3 step: 83, loss is 0.4545\n", "epoch: 3 step: 84, loss is 0.3072\n", "epoch: 3 step: 85, loss is 0.3475\n", "epoch: 3 step: 86, loss is 0.3380\n", "epoch: 3 step: 87, loss is 0.3027\n", "epoch: 3 step: 88, loss is 0.3898\n", "epoch: 3 step: 89, loss is 0.3724\n", "epoch: 3 step: 90, loss is 0.3696\n", "epoch: 3 step: 91, loss is 0.5897\n", "epoch: 3 step: 92, loss is 0.3328\n", "epoch: 3 step: 93, loss is 0.4406\n", "epoch: 3 step: 94, loss is 0.3753\n", "epoch: 3 step: 95, loss is 0.4312\n", "epoch: 3 step: 96, loss is 0.2916\n", "epoch: 3 step: 97, loss is 0.4791\n", "epoch: 3 step: 98, loss is 0.4071\n", "epoch: 3 step: 99, loss is 0.3603\n", "epoch: 3 step: 100, loss is 0.2947\n", "epoch: 3 step: 101, loss is 0.3169\n", "epoch: 3 step: 102, loss is 0.3696\n", "epoch: 3 step: 103, loss is 0.3359\n", "epoch: 3 step: 104, loss is 0.3557\n", "epoch: 3 step: 105, loss is 0.4236\n", "epoch: 3 step: 106, loss is 0.3706\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 3 step: 107, loss is 0.4050\n", "epoch: 3 step: 108, loss is 0.4224\n", "epoch: 3 step: 109, loss is 0.3945\n", "epoch: 3 step: 110, loss is 0.3166\n", "epoch: 3 step: 111, loss is 0.4504\n", "epoch: 3 step: 112, loss is 0.4167\n", "epoch: 3 step: 113, loss is 0.4151\n", "epoch: 3 step: 114, loss is 0.4592\n", "epoch: 3 step: 115, loss is 0.4591\n", "epoch: 3 step: 116, loss is 0.4377\n", "epoch: 3 step: 117, loss is 0.3935\n", "epoch: 3 step: 118, loss is 0.4603\n", "epoch: 3 step: 119, loss is 0.4321\n", "epoch: 3 step: 120, loss is 0.3649\n", "epoch: 3 step: 121, loss is 0.2203\n", "epoch: 3 step: 122, loss is 0.4187\n", "epoch: 3 step: 123, loss is 0.4314\n", "epoch: 3 step: 124, loss is 0.4402\n", "epoch: 3 step: 125, loss is 0.4183\n", "epoch: 3 step: 126, loss is 0.2995\n", "epoch: 3 step: 127, loss is 0.5258\n", "epoch: 3 step: 128, loss is 0.3425\n", "epoch: 3 step: 129, loss is 0.4904\n", "epoch: 3 step: 130, loss is 0.3656\n", "epoch: 3 step: 131, loss is 0.2937\n", "epoch: 3 step: 132, loss is 0.3514\n", "epoch: 3 step: 133, loss is 0.4062\n", "epoch: 3 step: 134, loss is 0.4585\n", "epoch: 3 step: 135, loss is 0.4663\n", "epoch: 3 step: 136, loss is 0.4121\n", "epoch: 3 step: 137, loss is 0.5713\n", "epoch: 3 step: 138, loss is 0.5436\n", "epoch: 3 step: 139, loss is 0.3907\n", "epoch: 3 step: 140, loss is 0.3895\n", "epoch: 3 step: 141, loss is 0.2858\n", "epoch: 3 step: 142, loss is 0.3387\n", "epoch: 3 step: 143, loss is 0.2160\n", "epoch: 3 step: 144, loss is 0.3003\n", "epoch: 3 step: 145, loss is 0.4193\n", "epoch: 3 step: 146, loss is 0.2822\n", "epoch: 3 step: 147, loss is 0.4882\n", "epoch: 3 step: 148, loss is 0.3009\n", "epoch: 3 step: 149, loss is 0.4665\n", "epoch: 3 step: 150, loss is 0.1979\n", "epoch: 3 step: 151, loss is 0.5718\n", "epoch: 3 step: 152, loss is 0.4232\n", "epoch: 3 step: 153, loss is 0.3551\n", "epoch: 3 step: 154, loss is 0.4726\n", "epoch: 3 step: 155, loss is 0.4916\n", "epoch: 3 step: 156, loss is 0.2972\n", "epoch: 3 step: 157, loss is 0.5057\n", "epoch: 3 step: 158, loss is 0.3771\n", "epoch: 3 step: 159, loss is 0.4795\n", "epoch: 3 step: 160, loss is 0.3869\n", "epoch: 3 step: 161, loss is 0.4202\n", "epoch: 3 step: 162, loss is 0.4563\n", "epoch: 3 step: 163, loss is 0.4568\n", "epoch: 3 step: 164, loss is 0.4694\n", "epoch: 3 step: 165, loss is 0.4631\n", "epoch: 3 step: 166, loss is 0.4519\n", "epoch: 3 step: 167, loss is 0.3601\n", "epoch: 3 step: 168, loss is 0.4120\n", "epoch: 3 step: 169, loss is 0.4180\n", "epoch: 3 step: 170, loss is 0.4114\n", "epoch: 3 step: 171, loss is 0.4114\n", "epoch: 3 step: 172, loss is 0.4159\n", "epoch: 3 step: 173, loss is 0.4097\n", "epoch: 3 step: 174, loss is 0.4147\n", "epoch: 3 step: 175, loss is 0.4558\n", "epoch: 3 step: 176, loss is 0.4649\n", "epoch: 3 step: 177, loss is 0.3569\n", "epoch: 3 step: 178, loss is 0.3931\n", "epoch: 3 step: 179, loss is 0.4755\n", "epoch: 3 step: 180, loss is 0.3079\n", "epoch: 3 step: 181, loss is 0.2524\n", "epoch: 3 step: 182, loss is 0.4180\n", "epoch: 3 step: 183, loss is 0.3591\n", "epoch: 3 step: 184, loss is 0.4032\n", "epoch: 3 step: 185, loss is 0.4342\n", "epoch: 3 step: 186, loss is 0.4754\n", "epoch: 3 step: 187, loss is 0.4542\n", "epoch: 3 step: 188, loss is 0.4420\n", "epoch: 3 step: 189, loss is 0.4167\n", "epoch: 3 step: 190, loss is 0.3310\n", "epoch: 3 step: 191, loss is 0.3687\n", "epoch: 3 step: 192, loss is 0.5318\n", "epoch: 3 step: 193, loss is 0.4974\n", "epoch: 3 step: 194, loss is 0.3833\n", "epoch: 3 step: 195, loss is 0.3165\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 3 step: 196, loss is 0.3696\n", "epoch: 3 step: 197, loss is 0.3521\n", "epoch: 3 step: 198, loss is 0.3601\n", "epoch: 3 step: 199, loss is 0.4757\n", "epoch: 3 step: 200, loss is 0.4163\n", "epoch: 3 step: 201, loss is 0.3398\n", "epoch: 3 step: 202, loss is 0.4203\n", "epoch: 3 step: 203, loss is 0.3198\n", "epoch: 3 step: 204, loss is 0.3190\n", "epoch: 3 step: 205, loss is 0.3116\n", "epoch: 3 step: 206, loss is 0.3934\n", "epoch: 3 step: 207, loss is 0.4535\n", "epoch: 3 step: 208, loss is 0.4659\n", "epoch: 3 step: 209, loss is 0.3414\n", "epoch: 3 step: 210, loss is 0.4802\n", "epoch: 3 step: 211, loss is 0.5756\n", "epoch: 3 step: 212, loss is 0.3171\n", "epoch: 3 step: 213, loss is 0.4107\n", "epoch: 3 step: 214, loss is 0.3674\n", "epoch: 3 step: 215, loss is 0.4184\n", "epoch: 3 step: 216, loss is 0.3420\n", "epoch: 3 step: 217, loss is 0.6002\n", "epoch: 3 step: 218, loss is 0.2872\n", "epoch: 3 step: 219, loss is 0.3229\n", "epoch: 3 step: 220, loss is 0.4415\n", "epoch: 3 step: 221, loss is 0.3746\n", "epoch: 3 step: 222, loss is 0.2635\n", "epoch: 3 step: 223, loss is 0.3991\n", "epoch: 3 step: 224, loss is 0.3567\n", "epoch: 3 step: 225, loss is 0.3465\n", "epoch: 3 step: 226, loss is 0.3587\n", "epoch: 3 step: 227, loss is 0.5150\n", "epoch: 3 step: 228, loss is 0.4710\n", "epoch: 3 step: 229, loss is 0.2521\n", "epoch: 3 step: 230, loss is 0.4252\n", "epoch: 3 step: 231, loss is 0.3643\n", "epoch: 3 step: 232, loss is 0.4818\n", "epoch: 3 step: 233, loss is 0.4397\n", "epoch: 3 step: 234, loss is 0.3876\n", "epoch: 3 step: 235, loss is 0.3596\n", "epoch: 3 step: 236, loss is 0.3529\n", "epoch: 3 step: 237, loss is 0.3215\n", "epoch: 3 step: 238, loss is 0.4018\n", "epoch: 3 step: 239, loss is 0.4951\n", "epoch: 3 step: 240, loss is 0.5848\n", "epoch: 3 step: 241, loss is 0.2801\n", "epoch: 3 step: 242, loss is 0.3817\n", "epoch: 3 step: 243, loss is 0.3129\n", "epoch: 3 step: 244, loss is 0.3563\n", "epoch: 3 step: 245, loss is 0.4328\n", "epoch: 3 step: 246, loss is 0.2599\n", "epoch: 3 step: 247, loss is 0.3628\n", "epoch: 3 step: 248, loss is 0.3745\n", "epoch: 3 step: 249, loss is 0.5442\n", "epoch: 3 step: 250, loss is 0.2922\n", "epoch: 3 step: 251, loss is 0.5088\n", "epoch: 3 step: 252, loss is 0.4104\n", "epoch: 3 step: 253, loss is 0.3428\n", "epoch: 3 step: 254, loss is 0.2948\n", "epoch: 3 step: 255, loss is 0.2938\n", "epoch: 3 step: 256, loss is 0.3375\n", "epoch: 3 step: 257, loss is 0.4268\n", "epoch: 3 step: 258, loss is 0.4184\n", "epoch: 3 step: 259, loss is 0.4208\n", "epoch: 3 step: 260, loss is 0.4031\n", "epoch: 3 step: 261, loss is 0.4611\n", "epoch: 3 step: 262, loss is 0.4319\n", "epoch: 3 step: 263, loss is 0.3944\n", "epoch: 3 step: 264, loss is 0.3305\n", "epoch: 3 step: 265, loss is 0.3527\n", "epoch: 3 step: 266, loss is 0.4057\n", "epoch: 3 step: 267, loss is 0.4273\n", "epoch: 3 step: 268, loss is 0.3185\n", "epoch: 3 step: 269, loss is 0.3514\n", "epoch: 3 step: 270, loss is 0.3194\n", "epoch: 3 step: 271, loss is 0.3234\n", "epoch: 3 step: 272, loss is 0.4830\n", "epoch: 3 step: 273, loss is 0.4117\n", "epoch: 3 step: 274, loss is 0.4786\n", "epoch: 3 step: 275, loss is 0.4281\n", "epoch: 3 step: 276, loss is 0.3829\n", "epoch: 3 step: 277, loss is 0.5034\n", "epoch: 3 step: 278, loss is 0.5044\n", "epoch: 3 step: 279, loss is 0.4408\n", "epoch: 3 step: 280, loss is 0.3188\n", "epoch: 3 step: 281, loss is 0.3911\n", "epoch: 3 step: 282, loss is 0.3954\n", "epoch: 3 step: 283, loss is 0.4993\n", "epoch: 3 step: 284, loss is 0.3837\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 3 step: 285, loss is 0.4163\n", "epoch: 3 step: 286, loss is 0.4400\n", "epoch: 3 step: 287, loss is 0.5866\n", "epoch: 3 step: 288, loss is 0.5641\n", "epoch: 3 step: 289, loss is 0.4612\n", "epoch: 3 step: 290, loss is 0.2980\n", "epoch: 3 step: 291, loss is 0.4731\n", "epoch: 3 step: 292, loss is 0.3319\n", "epoch: 3 step: 293, loss is 0.2109\n", "epoch: 3 step: 294, loss is 0.3556\n", "epoch: 3 step: 295, loss is 0.5077\n", "epoch: 3 step: 296, loss is 0.3730\n", "epoch: 3 step: 297, loss is 0.3788\n", "epoch: 3 step: 298, loss is 0.4189\n", "epoch: 3 step: 299, loss is 0.4771\n", "epoch: 3 step: 300, loss is 0.4764\n", "epoch: 3 step: 301, loss is 0.2127\n", "epoch: 3 step: 302, loss is 0.3632\n", "epoch: 3 step: 303, loss is 0.4322\n", "epoch: 3 step: 304, loss is 0.2149\n", "epoch: 3 step: 305, loss is 0.3922\n", "epoch: 3 step: 306, loss is 0.3648\n", "epoch: 3 step: 307, loss is 0.4253\n", "epoch: 3 step: 308, loss is 0.2997\n", "epoch: 3 step: 309, loss is 0.4857\n", "epoch: 3 step: 310, loss is 0.2400\n", "epoch: 3 step: 311, loss is 0.3372\n", "epoch: 3 step: 312, loss is 0.3999\n", "epoch: 3 step: 313, loss is 0.3966\n", "epoch: 3 step: 314, loss is 0.3356\n", "epoch: 3 step: 315, loss is 0.4338\n", "epoch: 3 step: 316, loss is 0.4492\n", "epoch: 3 step: 317, loss is 0.4842\n", "epoch: 3 step: 318, loss is 0.4107\n", "epoch: 3 step: 319, loss is 0.4075\n", "epoch: 3 step: 320, loss is 0.2865\n", "epoch: 3 step: 321, loss is 0.4206\n", "epoch: 3 step: 322, loss is 0.3023\n", "epoch: 3 step: 323, loss is 0.5861\n", "epoch: 3 step: 324, loss is 0.3894\n", "epoch: 3 step: 325, loss is 0.4065\n", "epoch: 3 step: 326, loss is 0.4846\n", "epoch: 3 step: 327, loss is 0.3179\n", "epoch: 3 step: 328, loss is 0.4151\n", "epoch: 3 step: 329, loss is 0.4456\n", "epoch: 3 step: 330, loss is 0.5323\n", "epoch: 3 step: 331, loss is 0.4364\n", "epoch: 3 step: 332, loss is 0.3513\n", "epoch: 3 step: 333, loss is 0.3349\n", "epoch: 3 step: 334, loss is 0.4467\n", "epoch: 3 step: 335, loss is 0.3192\n", "epoch: 3 step: 336, loss is 0.3861\n", "epoch: 3 step: 337, loss is 0.4852\n", "epoch: 3 step: 338, loss is 0.5865\n", "epoch: 3 step: 339, loss is 0.4505\n", "epoch: 3 step: 340, loss is 0.3992\n", "epoch: 3 step: 341, loss is 0.4544\n", "epoch: 3 step: 342, loss is 0.6408\n", "epoch: 3 step: 343, loss is 0.4806\n", "epoch: 3 step: 344, loss is 0.4758\n", "epoch: 3 step: 345, loss is 0.3838\n", "epoch: 3 step: 346, loss is 0.4273\n", "epoch: 3 step: 347, loss is 0.3675\n", "epoch: 3 step: 348, loss is 0.4613\n", "epoch: 3 step: 349, loss is 0.5186\n", "epoch: 3 step: 350, loss is 0.4531\n", "epoch: 3 step: 351, loss is 0.3558\n", "epoch: 3 step: 352, loss is 0.3800\n", "epoch: 3 step: 353, loss is 0.4185\n", "epoch: 3 step: 354, loss is 0.3551\n", "epoch: 3 step: 355, loss is 0.3627\n", "epoch: 3 step: 356, loss is 0.3571\n", "epoch: 3 step: 357, loss is 0.5939\n", "epoch: 3 step: 358, loss is 0.5010\n", "epoch: 3 step: 359, loss is 0.3568\n", "epoch: 3 step: 360, loss is 0.3379\n", "epoch: 3 step: 361, loss is 0.3807\n", "epoch: 3 step: 362, loss is 0.5156\n", "epoch: 3 step: 363, loss is 0.4275\n", "epoch: 3 step: 364, loss is 0.4519\n", "epoch: 3 step: 365, loss is 0.4699\n", "epoch: 3 step: 366, loss is 0.3991\n", "epoch: 3 step: 367, loss is 0.5582\n", "epoch: 3 step: 368, loss is 0.3483\n", "epoch: 3 step: 369, loss is 0.5089\n", "epoch: 3 step: 370, loss is 0.4907\n", "epoch: 3 step: 371, loss is 0.3668\n", "epoch: 3 step: 372, loss is 0.4605\n", "epoch: 3 step: 373, loss is 0.4048\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 3 step: 374, loss is 0.3921\n", "epoch: 3 step: 375, loss is 0.4149\n", "epoch: 3 step: 376, loss is 0.4907\n", "epoch: 3 step: 377, loss is 0.3688\n", "epoch: 3 step: 378, loss is 0.3472\n", "epoch: 3 step: 379, loss is 0.4601\n", "epoch: 3 step: 380, loss is 0.3989\n", "epoch: 3 step: 381, loss is 0.4383\n", "epoch: 3 step: 382, loss is 0.4026\n", "epoch: 3 step: 383, loss is 0.4012\n", "epoch: 3 step: 384, loss is 0.3780\n", "epoch: 3 step: 385, loss is 0.4996\n", "epoch: 3 step: 386, loss is 0.4128\n", "epoch: 3 step: 387, loss is 0.4403\n", "epoch: 3 step: 388, loss is 0.3133\n", "epoch: 3 step: 389, loss is 0.3768\n", "epoch: 3 step: 390, loss is 0.3408\n", "Epoch time: 41946.990, per step time: 107.556, avg loss: 0.403\n", "************************************************************\n", "epoch: 4 step: 1, loss is 0.4017\n", "epoch: 4 step: 2, loss is 0.4795\n", "epoch: 4 step: 3, loss is 0.2870\n", "epoch: 4 step: 4, loss is 0.4298\n", "epoch: 4 step: 5, loss is 0.3789\n", "epoch: 4 step: 6, loss is 0.3850\n", "epoch: 4 step: 7, loss is 0.5787\n", "epoch: 4 step: 8, loss is 0.4739\n", "epoch: 4 step: 9, loss is 0.3946\n", "epoch: 4 step: 10, loss is 0.4048\n", "epoch: 4 step: 11, loss is 0.2484\n", "epoch: 4 step: 12, loss is 0.2323\n", "epoch: 4 step: 13, loss is 0.4067\n", "epoch: 4 step: 14, loss is 0.3270\n", "epoch: 4 step: 15, loss is 0.4092\n", "epoch: 4 step: 16, loss is 0.3262\n", "epoch: 4 step: 17, loss is 0.3273\n", "epoch: 4 step: 18, loss is 0.3551\n", "epoch: 4 step: 19, loss is 0.2978\n", "epoch: 4 step: 20, loss is 0.3568\n", "epoch: 4 step: 21, loss is 0.3576\n", "epoch: 4 step: 22, loss is 0.4565\n", "epoch: 4 step: 23, loss is 0.3130\n", "epoch: 4 step: 24, loss is 0.3228\n", "epoch: 4 step: 25, loss is 0.4285\n", "epoch: 4 step: 26, loss is 0.4040\n", "epoch: 4 step: 27, loss is 0.2316\n", "epoch: 4 step: 28, loss is 0.2661\n", "epoch: 4 step: 29, loss is 0.3404\n", "epoch: 4 step: 30, loss is 0.4828\n", "epoch: 4 step: 31, loss is 0.3574\n", "epoch: 4 step: 32, loss is 0.5177\n", "epoch: 4 step: 33, loss is 0.4476\n", "epoch: 4 step: 34, loss is 0.4039\n", "epoch: 4 step: 35, loss is 0.4306\n", "epoch: 4 step: 36, loss is 0.3846\n", "epoch: 4 step: 37, loss is 0.3046\n", "epoch: 4 step: 38, loss is 0.3345\n", "epoch: 4 step: 39, loss is 0.4613\n", "epoch: 4 step: 40, loss is 0.4372\n", "epoch: 4 step: 41, loss is 0.3131\n", "epoch: 4 step: 42, loss is 0.3185\n", "epoch: 4 step: 43, loss is 0.4237\n", "epoch: 4 step: 44, loss is 0.3446\n", "epoch: 4 step: 45, loss is 0.3386\n", "epoch: 4 step: 46, loss is 0.2380\n", "epoch: 4 step: 47, loss is 0.2631\n", "epoch: 4 step: 48, loss is 0.3154\n", "epoch: 4 step: 49, loss is 0.3512\n", "epoch: 4 step: 50, loss is 0.3820\n", "epoch: 4 step: 51, loss is 0.4683\n", "epoch: 4 step: 52, loss is 0.3854\n", "epoch: 4 step: 53, loss is 0.4999\n", "epoch: 4 step: 54, loss is 0.5073\n", "epoch: 4 step: 55, loss is 0.4146\n", "epoch: 4 step: 56, loss is 0.4214\n", "epoch: 4 step: 57, loss is 0.3034\n", "epoch: 4 step: 58, loss is 0.3051\n", "epoch: 4 step: 59, loss is 0.3742\n", "epoch: 4 step: 60, loss is 0.4394\n", "epoch: 4 step: 61, loss is 0.2594\n", "epoch: 4 step: 62, loss is 0.4522\n", "epoch: 4 step: 63, loss is 0.4361\n", "epoch: 4 step: 64, loss is 0.3397\n", "epoch: 4 step: 65, loss is 0.2726\n", "epoch: 4 step: 66, loss is 0.3973\n", "epoch: 4 step: 67, loss is 0.3567\n", "epoch: 4 step: 68, loss is 0.3505\n", "epoch: 4 step: 69, loss is 0.3896\n", "epoch: 4 step: 70, loss is 0.3462\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 4 step: 71, loss is 0.3085\n", "epoch: 4 step: 72, loss is 0.2767\n", "epoch: 4 step: 73, loss is 0.3353\n", "epoch: 4 step: 74, loss is 0.4800\n", "epoch: 4 step: 75, loss is 0.2814\n", "epoch: 4 step: 76, loss is 0.4233\n", "epoch: 4 step: 77, loss is 0.2641\n", "epoch: 4 step: 78, loss is 0.3865\n", "epoch: 4 step: 79, loss is 0.2459\n", "epoch: 4 step: 80, loss is 0.4205\n", "epoch: 4 step: 81, loss is 0.4781\n", "epoch: 4 step: 82, loss is 0.5155\n", "epoch: 4 step: 83, loss is 0.3062\n", "epoch: 4 step: 84, loss is 0.4246\n", "epoch: 4 step: 85, loss is 0.4452\n", "epoch: 4 step: 86, loss is 0.4439\n", "epoch: 4 step: 87, loss is 0.3794\n", "epoch: 4 step: 88, loss is 0.4272\n", "epoch: 4 step: 89, loss is 0.3608\n", "epoch: 4 step: 90, loss is 0.3053\n", "epoch: 4 step: 91, loss is 0.3505\n", "epoch: 4 step: 92, loss is 0.2630\n", "epoch: 4 step: 93, loss is 0.4086\n", "epoch: 4 step: 94, loss is 0.3074\n", "epoch: 4 step: 95, loss is 0.2860\n", "epoch: 4 step: 96, loss is 0.3472\n", "epoch: 4 step: 97, loss is 0.4399\n", "epoch: 4 step: 98, loss is 0.2984\n", "epoch: 4 step: 99, loss is 0.5062\n", "epoch: 4 step: 100, loss is 0.5517\n", "epoch: 4 step: 101, loss is 0.5153\n", "epoch: 4 step: 102, loss is 0.4030\n", "epoch: 4 step: 103, loss is 0.3423\n", "epoch: 4 step: 104, loss is 0.5257\n", "epoch: 4 step: 105, loss is 0.3724\n", "epoch: 4 step: 106, loss is 0.3023\n", "epoch: 4 step: 107, loss is 0.3482\n", "epoch: 4 step: 108, loss is 0.3615\n", "epoch: 4 step: 109, loss is 0.4316\n", "epoch: 4 step: 110, loss is 0.3250\n", "epoch: 4 step: 111, loss is 0.4009\n", "epoch: 4 step: 112, loss is 0.3942\n", "epoch: 4 step: 113, loss is 0.2140\n", "epoch: 4 step: 114, loss is 0.4001\n", "epoch: 4 step: 115, loss is 0.4625\n", "epoch: 4 step: 116, loss is 0.3707\n", "epoch: 4 step: 117, loss is 0.5109\n", "epoch: 4 step: 118, loss is 0.3670\n", "epoch: 4 step: 119, loss is 0.3501\n", "epoch: 4 step: 120, loss is 0.3834\n", "epoch: 4 step: 121, loss is 0.3532\n", "epoch: 4 step: 122, loss is 0.3031\n", "epoch: 4 step: 123, loss is 0.3020\n", "epoch: 4 step: 124, loss is 0.2292\n", "epoch: 4 step: 125, loss is 0.4072\n", "epoch: 4 step: 126, loss is 0.3180\n", "epoch: 4 step: 127, loss is 0.3820\n", "epoch: 4 step: 128, loss is 0.4190\n", "epoch: 4 step: 129, loss is 0.2390\n", "epoch: 4 step: 130, loss is 0.3056\n", "epoch: 4 step: 131, loss is 0.3209\n", "epoch: 4 step: 132, loss is 0.3113\n", "epoch: 4 step: 133, loss is 0.2161\n", "epoch: 4 step: 134, loss is 0.3602\n", "epoch: 4 step: 135, loss is 0.3843\n", "epoch: 4 step: 136, loss is 0.4002\n", "epoch: 4 step: 137, loss is 0.3382\n", "epoch: 4 step: 138, loss is 0.4547\n", "epoch: 4 step: 139, loss is 0.4897\n", "epoch: 4 step: 140, loss is 0.2613\n", "epoch: 4 step: 141, loss is 0.3163\n", "epoch: 4 step: 142, loss is 0.3970\n", "epoch: 4 step: 143, loss is 0.4706\n", "epoch: 4 step: 144, loss is 0.2520\n", "epoch: 4 step: 145, loss is 0.2754\n", "epoch: 4 step: 146, loss is 0.3478\n", "epoch: 4 step: 147, loss is 0.3348\n", "epoch: 4 step: 148, loss is 0.4345\n", "epoch: 4 step: 149, loss is 0.2415\n", "epoch: 4 step: 150, loss is 0.4655\n", "epoch: 4 step: 151, loss is 0.3261\n", "epoch: 4 step: 152, loss is 0.5246\n", "epoch: 4 step: 153, loss is 0.4512\n", "epoch: 4 step: 154, loss is 0.2818\n", "epoch: 4 step: 155, loss is 0.4020\n", "epoch: 4 step: 156, loss is 0.3509\n", "epoch: 4 step: 157, loss is 0.5440\n", "epoch: 4 step: 158, loss is 0.3820\n", "epoch: 4 step: 159, loss is 0.3345\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 4 step: 160, loss is 0.4387\n", "epoch: 4 step: 161, loss is 0.3441\n", "epoch: 4 step: 162, loss is 0.3684\n", "epoch: 4 step: 163, loss is 0.3465\n", "epoch: 4 step: 164, loss is 0.5299\n", "epoch: 4 step: 165, loss is 0.5045\n", "epoch: 4 step: 166, loss is 0.3958\n", "epoch: 4 step: 167, loss is 0.3517\n", "epoch: 4 step: 168, loss is 0.4668\n", "epoch: 4 step: 169, loss is 0.2722\n", "epoch: 4 step: 170, loss is 0.4252\n", "epoch: 4 step: 171, loss is 0.4219\n", "epoch: 4 step: 172, loss is 0.4034\n", "epoch: 4 step: 173, loss is 0.4636\n", "epoch: 4 step: 174, loss is 0.3881\n", "epoch: 4 step: 175, loss is 0.3162\n", "epoch: 4 step: 176, loss is 0.3936\n", "epoch: 4 step: 177, loss is 0.3591\n", "epoch: 4 step: 178, loss is 0.3104\n", "epoch: 4 step: 179, loss is 0.2385\n", "epoch: 4 step: 180, loss is 0.2899\n", "epoch: 4 step: 181, loss is 0.3091\n", "epoch: 4 step: 182, loss is 0.4573\n", "epoch: 4 step: 183, loss is 0.4415\n", "epoch: 4 step: 184, loss is 0.2995\n", "epoch: 4 step: 185, loss is 0.2719\n", "epoch: 4 step: 186, loss is 0.3571\n", "epoch: 4 step: 187, loss is 0.3442\n", "epoch: 4 step: 188, loss is 0.3863\n", "epoch: 4 step: 189, loss is 0.3299\n", "epoch: 4 step: 190, loss is 0.2998\n", "epoch: 4 step: 191, loss is 0.3399\n", "epoch: 4 step: 192, loss is 0.2481\n", "epoch: 4 step: 193, loss is 0.3842\n", "epoch: 4 step: 194, loss is 0.3805\n", "epoch: 4 step: 195, loss is 0.4114\n", "epoch: 4 step: 196, loss is 0.2850\n", "epoch: 4 step: 197, loss is 0.2693\n", "epoch: 4 step: 198, loss is 0.2606\n", "epoch: 4 step: 199, loss is 0.3752\n", "epoch: 4 step: 200, loss is 0.4419\n", "epoch: 4 step: 201, loss is 0.3777\n", "epoch: 4 step: 202, loss is 0.4244\n", "epoch: 4 step: 203, loss is 0.3185\n", "epoch: 4 step: 204, loss is 0.3078\n", "epoch: 4 step: 205, loss is 0.3949\n", "epoch: 4 step: 206, loss is 0.3288\n", "epoch: 4 step: 207, loss is 0.4153\n", "epoch: 4 step: 208, loss is 0.2307\n", "epoch: 4 step: 209, loss is 0.3982\n", "epoch: 4 step: 210, loss is 0.3027\n", "epoch: 4 step: 211, loss is 0.3901\n", "epoch: 4 step: 212, loss is 0.4023\n", "epoch: 4 step: 213, loss is 0.2610\n", "epoch: 4 step: 214, loss is 0.3141\n", "epoch: 4 step: 215, loss is 0.2775\n", "epoch: 4 step: 216, loss is 0.4507\n", "epoch: 4 step: 217, loss is 0.3489\n", "epoch: 4 step: 218, loss is 0.4935\n", "epoch: 4 step: 219, loss is 0.3538\n", "epoch: 4 step: 220, loss is 0.3235\n", "epoch: 4 step: 221, loss is 0.2939\n", "epoch: 4 step: 222, loss is 0.3348\n", "epoch: 4 step: 223, loss is 0.3916\n", "epoch: 4 step: 224, loss is 0.4481\n", "epoch: 4 step: 225, loss is 0.2748\n", "epoch: 4 step: 226, loss is 0.3481\n", "epoch: 4 step: 227, loss is 0.4186\n", "epoch: 4 step: 228, loss is 0.4347\n", "epoch: 4 step: 229, loss is 0.3251\n", "epoch: 4 step: 230, loss is 0.3473\n", "epoch: 4 step: 231, loss is 0.3915\n", "epoch: 4 step: 232, loss is 0.2889\n", "epoch: 4 step: 233, loss is 0.2659\n", "epoch: 4 step: 234, loss is 0.3052\n", "epoch: 4 step: 235, loss is 0.4258\n", "epoch: 4 step: 236, loss is 0.3783\n", "epoch: 4 step: 237, loss is 0.4851\n", "epoch: 4 step: 238, loss is 0.3114\n", "epoch: 4 step: 239, loss is 0.2487\n", "epoch: 4 step: 240, loss is 0.4030\n", "epoch: 4 step: 241, loss is 0.4842\n", "epoch: 4 step: 242, loss is 0.4098\n", "epoch: 4 step: 243, loss is 0.2414\n", "epoch: 4 step: 244, loss is 0.5210\n", "epoch: 4 step: 245, loss is 0.3267\n", "epoch: 4 step: 246, loss is 0.4094\n", "epoch: 4 step: 247, loss is 0.3241\n", "epoch: 4 step: 248, loss is 0.4039\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 4 step: 249, loss is 0.2710\n", "epoch: 4 step: 250, loss is 0.3260\n", "epoch: 4 step: 251, loss is 0.3744\n", "epoch: 4 step: 252, loss is 0.2942\n", "epoch: 4 step: 253, loss is 0.4133\n", "epoch: 4 step: 254, loss is 0.2983\n", "epoch: 4 step: 255, loss is 0.4217\n", "epoch: 4 step: 256, loss is 0.3493\n", "epoch: 4 step: 257, loss is 0.2805\n", "epoch: 4 step: 258, loss is 0.3151\n", "epoch: 4 step: 259, loss is 0.3350\n", "epoch: 4 step: 260, loss is 0.5220\n", "epoch: 4 step: 261, loss is 0.2808\n", "epoch: 4 step: 262, loss is 0.2904\n", "epoch: 4 step: 263, loss is 0.4144\n", "epoch: 4 step: 264, loss is 0.3710\n", "epoch: 4 step: 265, loss is 0.2993\n", "epoch: 4 step: 266, loss is 0.3192\n", "epoch: 4 step: 267, loss is 0.2591\n", "epoch: 4 step: 268, loss is 0.4449\n", "epoch: 4 step: 269, loss is 0.3405\n", "epoch: 4 step: 270, loss is 0.3951\n", "epoch: 4 step: 271, loss is 0.3147\n", "epoch: 4 step: 272, loss is 0.3204\n", "epoch: 4 step: 273, loss is 0.5377\n", "epoch: 4 step: 274, loss is 0.3847\n", "epoch: 4 step: 275, loss is 0.4134\n", "epoch: 4 step: 276, loss is 0.3202\n", "epoch: 4 step: 277, loss is 0.3618\n", "epoch: 4 step: 278, loss is 0.4502\n", "epoch: 4 step: 279, loss is 0.3401\n", "epoch: 4 step: 280, loss is 0.4656\n", "epoch: 4 step: 281, loss is 0.4343\n", "epoch: 4 step: 282, loss is 0.3462\n", "epoch: 4 step: 283, loss is 0.3591\n", "epoch: 4 step: 284, loss is 0.2983\n", "epoch: 4 step: 285, loss is 0.4017\n", "epoch: 4 step: 286, loss is 0.2940\n", "epoch: 4 step: 287, loss is 0.4052\n", "epoch: 4 step: 288, loss is 0.2970\n", "epoch: 4 step: 289, loss is 0.4640\n", "epoch: 4 step: 290, loss is 0.2613\n", "epoch: 4 step: 291, loss is 0.2677\n", "epoch: 4 step: 292, loss is 0.3928\n", "epoch: 4 step: 293, loss is 0.3033\n", "epoch: 4 step: 294, loss is 0.3590\n", "epoch: 4 step: 295, loss is 0.6220\n", "epoch: 4 step: 296, loss is 0.4165\n", "epoch: 4 step: 297, loss is 0.3620\n", "epoch: 4 step: 298, loss is 0.3527\n", "epoch: 4 step: 299, loss is 0.3109\n", "epoch: 4 step: 300, loss is 0.4211\n", "epoch: 4 step: 301, loss is 0.3927\n", "epoch: 4 step: 302, loss is 0.3385\n", "epoch: 4 step: 303, loss is 0.3242\n", "epoch: 4 step: 304, loss is 0.3999\n", "epoch: 4 step: 305, loss is 0.2473\n", "epoch: 4 step: 306, loss is 0.4007\n", "epoch: 4 step: 307, loss is 0.3748\n", "epoch: 4 step: 308, loss is 0.3003\n", "epoch: 4 step: 309, loss is 0.4165\n", "epoch: 4 step: 310, loss is 0.2449\n", "epoch: 4 step: 311, loss is 0.3170\n", "epoch: 4 step: 312, loss is 0.3388\n", "epoch: 4 step: 313, loss is 0.5385\n", "epoch: 4 step: 314, loss is 0.3794\n", "epoch: 4 step: 315, loss is 0.2365\n", "epoch: 4 step: 316, loss is 0.4281\n", "epoch: 4 step: 317, loss is 0.3258\n", "epoch: 4 step: 318, loss is 0.4437\n", "epoch: 4 step: 319, loss is 0.3517\n", "epoch: 4 step: 320, loss is 0.3266\n", "epoch: 4 step: 321, loss is 0.3717\n", "epoch: 4 step: 322, loss is 0.4069\n", "epoch: 4 step: 323, loss is 0.3395\n", "epoch: 4 step: 324, loss is 0.4231\n", "epoch: 4 step: 325, loss is 0.4355\n", "epoch: 4 step: 326, loss is 0.2874\n", "epoch: 4 step: 327, loss is 0.3945\n", "epoch: 4 step: 328, loss is 0.3845\n", "epoch: 4 step: 329, loss is 0.4375\n", "epoch: 4 step: 330, loss is 0.3023\n", "epoch: 4 step: 331, loss is 0.4047\n", "epoch: 4 step: 332, loss is 0.3946\n", "epoch: 4 step: 333, loss is 0.3176\n", "epoch: 4 step: 334, loss is 0.4214\n", "epoch: 4 step: 335, loss is 0.4775\n", "epoch: 4 step: 336, loss is 0.3526\n", "epoch: 4 step: 337, loss is 0.4519\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 4 step: 338, loss is 0.4460\n", "epoch: 4 step: 339, loss is 0.3561\n", "epoch: 4 step: 340, loss is 0.5193\n", "epoch: 4 step: 341, loss is 0.4446\n", "epoch: 4 step: 342, loss is 0.3434\n", "epoch: 4 step: 343, loss is 0.3595\n", "epoch: 4 step: 344, loss is 0.4241\n", "epoch: 4 step: 345, loss is 0.2956\n", "epoch: 4 step: 346, loss is 0.3377\n", "epoch: 4 step: 347, loss is 0.3574\n", "epoch: 4 step: 348, loss is 0.4708\n", "epoch: 4 step: 349, loss is 0.4382\n", "epoch: 4 step: 350, loss is 0.3674\n", "epoch: 4 step: 351, loss is 0.5617\n", "epoch: 4 step: 352, loss is 0.3479\n", "epoch: 4 step: 353, loss is 0.4457\n", "epoch: 4 step: 354, loss is 0.4470\n", "epoch: 4 step: 355, loss is 0.3042\n", "epoch: 4 step: 356, loss is 0.4274\n", "epoch: 4 step: 357, loss is 0.3954\n", "epoch: 4 step: 358, loss is 0.3816\n", "epoch: 4 step: 359, loss is 0.3290\n", "epoch: 4 step: 360, loss is 0.3382\n", "epoch: 4 step: 361, loss is 0.4071\n", "epoch: 4 step: 362, loss is 0.3767\n", "epoch: 4 step: 363, loss is 0.4927\n", "epoch: 4 step: 364, loss is 0.3349\n", "epoch: 4 step: 365, loss is 0.3436\n", "epoch: 4 step: 366, loss is 0.2961\n", "epoch: 4 step: 367, loss is 0.2820\n", "epoch: 4 step: 368, loss is 0.3242\n", "epoch: 4 step: 369, loss is 0.3750\n", "epoch: 4 step: 370, loss is 0.4032\n", "epoch: 4 step: 371, loss is 0.2909\n", "epoch: 4 step: 372, loss is 0.3955\n", "epoch: 4 step: 373, loss is 0.2918\n", "epoch: 4 step: 374, loss is 0.3997\n", "epoch: 4 step: 375, loss is 0.3154\n", "epoch: 4 step: 376, loss is 0.3779\n", "epoch: 4 step: 377, loss is 0.3876\n", "epoch: 4 step: 378, loss is 0.5116\n", "epoch: 4 step: 379, loss is 0.2980\n", "epoch: 4 step: 380, loss is 0.2813\n", "epoch: 4 step: 381, loss is 0.2438\n", "epoch: 4 step: 382, loss is 0.3873\n", "epoch: 4 step: 383, loss is 0.3675\n", "epoch: 4 step: 384, loss is 0.4243\n", "epoch: 4 step: 385, loss is 0.3276\n", "epoch: 4 step: 386, loss is 0.2505\n", "epoch: 4 step: 387, loss is 0.2351\n", "epoch: 4 step: 388, loss is 0.2487\n", "epoch: 4 step: 389, loss is 0.3252\n", "epoch: 4 step: 390, loss is 0.3969\n", "Epoch time: 42451.503, per step time: 108.850, avg loss: 0.368\n", "************************************************************\n", "epoch: 5 step: 1, loss is 0.2794\n", "epoch: 5 step: 2, loss is 0.2933\n", "epoch: 5 step: 3, loss is 0.3252\n", "epoch: 5 step: 4, loss is 0.4135\n", "epoch: 5 step: 5, loss is 0.3011\n", "epoch: 5 step: 6, loss is 0.2266\n", "epoch: 5 step: 7, loss is 0.3133\n", "epoch: 5 step: 8, loss is 0.3449\n", "epoch: 5 step: 9, loss is 0.3031\n", "epoch: 5 step: 10, loss is 0.3289\n", "epoch: 5 step: 11, loss is 0.3923\n", "epoch: 5 step: 12, loss is 0.3127\n", "epoch: 5 step: 13, loss is 0.3678\n", "epoch: 5 step: 14, loss is 0.3622\n", "epoch: 5 step: 15, loss is 0.2448\n", "epoch: 5 step: 16, loss is 0.2788\n", "epoch: 5 step: 17, loss is 0.3236\n", "epoch: 5 step: 18, loss is 0.4522\n", "epoch: 5 step: 19, loss is 0.2819\n", "epoch: 5 step: 20, loss is 0.2288\n", "epoch: 5 step: 21, loss is 0.2689\n", "epoch: 5 step: 22, loss is 0.4091\n", "epoch: 5 step: 23, loss is 0.2462\n", "epoch: 5 step: 24, loss is 0.3900\n", "epoch: 5 step: 25, loss is 0.3287\n", "epoch: 5 step: 26, loss is 0.3620\n", "epoch: 5 step: 27, loss is 0.3002\n", "epoch: 5 step: 28, loss is 0.2733\n", "epoch: 5 step: 29, loss is 0.3498\n", "epoch: 5 step: 30, loss is 0.3848\n", "epoch: 5 step: 31, loss is 0.3515\n", "epoch: 5 step: 32, loss is 0.3267\n", "epoch: 5 step: 33, loss is 0.2962\n", "epoch: 5 step: 34, loss is 0.3273\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 5 step: 35, loss is 0.3577\n", "epoch: 5 step: 36, loss is 0.4371\n", "epoch: 5 step: 37, loss is 0.4086\n", "epoch: 5 step: 38, loss is 0.1705\n", "epoch: 5 step: 39, loss is 0.3365\n", "epoch: 5 step: 40, loss is 0.3910\n", "epoch: 5 step: 41, loss is 0.3509\n", "epoch: 5 step: 42, loss is 0.4014\n", "epoch: 5 step: 43, loss is 0.2674\n", "epoch: 5 step: 44, loss is 0.3730\n", "epoch: 5 step: 45, loss is 0.2710\n", "epoch: 5 step: 46, loss is 0.2464\n", "epoch: 5 step: 47, loss is 0.3998\n", "epoch: 5 step: 48, loss is 0.2825\n", "epoch: 5 step: 49, loss is 0.2899\n", "epoch: 5 step: 50, loss is 0.2653\n", "epoch: 5 step: 51, loss is 0.3137\n", "epoch: 5 step: 52, loss is 0.2977\n", "epoch: 5 step: 53, loss is 0.1626\n", "epoch: 5 step: 54, loss is 0.3451\n", "epoch: 5 step: 55, loss is 0.4533\n", "epoch: 5 step: 56, loss is 0.3027\n", "epoch: 5 step: 57, loss is 0.3573\n", "epoch: 5 step: 58, loss is 0.2549\n", "epoch: 5 step: 59, loss is 0.3431\n", "epoch: 5 step: 60, loss is 0.3799\n", "epoch: 5 step: 61, loss is 0.2788\n", "epoch: 5 step: 62, loss is 0.2534\n", "epoch: 5 step: 63, loss is 0.4903\n", "epoch: 5 step: 64, loss is 0.3201\n", "epoch: 5 step: 65, loss is 0.3645\n", "epoch: 5 step: 66, loss is 0.2357\n", "epoch: 5 step: 67, loss is 0.3705\n", "epoch: 5 step: 68, loss is 0.1633\n", "epoch: 5 step: 69, loss is 0.2591\n", "epoch: 5 step: 70, loss is 0.3557\n", "epoch: 5 step: 71, loss is 0.2731\n", "epoch: 5 step: 72, loss is 0.4700\n", "epoch: 5 step: 73, loss is 0.3538\n", "epoch: 5 step: 74, loss is 0.2912\n", "epoch: 5 step: 75, loss is 0.3697\n", "epoch: 5 step: 76, loss is 0.4126\n", "epoch: 5 step: 77, loss is 0.4306\n", "epoch: 5 step: 78, loss is 0.3097\n", "epoch: 5 step: 79, loss is 0.2506\n", "epoch: 5 step: 80, loss is 0.3555\n", "epoch: 5 step: 81, loss is 0.4372\n", "epoch: 5 step: 82, loss is 0.3791\n", "epoch: 5 step: 83, loss is 0.3631\n", "epoch: 5 step: 84, loss is 0.2663\n", "epoch: 5 step: 85, loss is 0.4309\n", "epoch: 5 step: 86, loss is 0.3595\n", "epoch: 5 step: 87, loss is 0.3064\n", "epoch: 5 step: 88, loss is 0.3514\n", "epoch: 5 step: 89, loss is 0.3699\n", "epoch: 5 step: 90, loss is 0.4920\n", "epoch: 5 step: 91, loss is 0.2617\n", "epoch: 5 step: 92, loss is 0.3189\n", "epoch: 5 step: 93, loss is 0.2781\n", "epoch: 5 step: 94, loss is 0.2895\n", "epoch: 5 step: 95, loss is 0.2069\n", "epoch: 5 step: 96, loss is 0.4565\n", "epoch: 5 step: 97, loss is 0.2529\n", "epoch: 5 step: 98, loss is 0.2671\n", "epoch: 5 step: 99, loss is 0.2349\n", "epoch: 5 step: 100, loss is 0.5263\n", "epoch: 5 step: 101, loss is 0.4659\n", "epoch: 5 step: 102, loss is 0.2615\n", "epoch: 5 step: 103, loss is 0.4434\n", "epoch: 5 step: 104, loss is 0.3079\n", "epoch: 5 step: 105, loss is 0.4543\n", "epoch: 5 step: 106, loss is 0.4415\n", "epoch: 5 step: 107, loss is 0.2911\n", "epoch: 5 step: 108, loss is 0.2849\n", "epoch: 5 step: 109, loss is 0.2857\n", "epoch: 5 step: 110, loss is 0.4117\n", "epoch: 5 step: 111, loss is 0.3222\n", "epoch: 5 step: 112, loss is 0.3745\n", "epoch: 5 step: 113, loss is 0.3251\n", "epoch: 5 step: 114, loss is 0.3649\n", "epoch: 5 step: 115, loss is 0.4835\n", "epoch: 5 step: 116, loss is 0.3027\n", "epoch: 5 step: 117, loss is 0.2808\n", "epoch: 5 step: 118, loss is 0.4715\n", "epoch: 5 step: 119, loss is 0.2866\n", "epoch: 5 step: 120, loss is 0.2574\n", "epoch: 5 step: 121, loss is 0.4101\n", "epoch: 5 step: 122, loss is 0.4093\n", "epoch: 5 step: 123, loss is 0.3165\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 5 step: 124, loss is 0.3165\n", "epoch: 5 step: 125, loss is 0.2910\n", "epoch: 5 step: 126, loss is 0.4151\n", "epoch: 5 step: 127, loss is 0.3650\n", "epoch: 5 step: 128, loss is 0.4466\n", "epoch: 5 step: 129, loss is 0.3491\n", "epoch: 5 step: 130, loss is 0.3943\n", "epoch: 5 step: 131, loss is 0.3831\n", "epoch: 5 step: 132, loss is 0.3353\n", "epoch: 5 step: 133, loss is 0.3608\n", "epoch: 5 step: 134, loss is 0.3089\n", "epoch: 5 step: 135, loss is 0.3661\n", "epoch: 5 step: 136, loss is 0.2462\n", "epoch: 5 step: 137, loss is 0.2555\n", "epoch: 5 step: 138, loss is 0.3958\n", "epoch: 5 step: 139, loss is 0.3909\n", "epoch: 5 step: 140, loss is 0.4445\n", "epoch: 5 step: 141, loss is 0.3978\n", "epoch: 5 step: 142, loss is 0.4142\n", "epoch: 5 step: 143, loss is 0.5226\n", "epoch: 5 step: 144, loss is 0.4125\n", "epoch: 5 step: 145, loss is 0.2795\n", "epoch: 5 step: 146, loss is 0.3510\n", "epoch: 5 step: 147, loss is 0.3275\n", "epoch: 5 step: 148, loss is 0.5054\n", "epoch: 5 step: 149, loss is 0.3694\n", "epoch: 5 step: 150, loss is 0.5045\n", "epoch: 5 step: 151, loss is 0.3543\n", "epoch: 5 step: 152, loss is 0.3545\n", "epoch: 5 step: 153, loss is 0.3695\n", "epoch: 5 step: 154, loss is 0.3324\n", "epoch: 5 step: 155, loss is 0.4030\n", "epoch: 5 step: 156, loss is 0.3399\n", "epoch: 5 step: 157, loss is 0.2697\n", "epoch: 5 step: 158, loss is 0.3390\n", "epoch: 5 step: 159, loss is 0.3495\n", "epoch: 5 step: 160, loss is 0.3949\n", "epoch: 5 step: 161, loss is 0.3042\n", "epoch: 5 step: 162, loss is 0.2852\n", "epoch: 5 step: 163, loss is 0.4251\n", "epoch: 5 step: 164, loss is 0.2808\n", "epoch: 5 step: 165, loss is 0.4844\n", "epoch: 5 step: 166, loss is 0.3811\n", "epoch: 5 step: 167, loss is 0.4935\n", "epoch: 5 step: 168, loss is 0.3312\n", "epoch: 5 step: 169, loss is 0.3287\n", "epoch: 5 step: 170, loss is 0.2893\n", "epoch: 5 step: 171, loss is 0.3934\n", "epoch: 5 step: 172, loss is 0.3728\n", "epoch: 5 step: 173, loss is 0.4014\n", "epoch: 5 step: 174, loss is 0.3923\n", "epoch: 5 step: 175, loss is 0.3733\n", "epoch: 5 step: 176, loss is 0.2801\n", "epoch: 5 step: 177, loss is 0.4638\n", "epoch: 5 step: 178, loss is 0.4426\n", "epoch: 5 step: 179, loss is 0.3452\n", "epoch: 5 step: 180, loss is 0.4646\n", "epoch: 5 step: 181, loss is 0.3066\n", "epoch: 5 step: 182, loss is 0.3812\n", "epoch: 5 step: 183, loss is 0.3036\n", "epoch: 5 step: 184, loss is 0.3178\n", "epoch: 5 step: 185, loss is 0.3505\n", "epoch: 5 step: 186, loss is 0.4441\n", "epoch: 5 step: 187, loss is 0.2443\n", "epoch: 5 step: 188, loss is 0.3056\n", "epoch: 5 step: 189, loss is 0.2921\n", "epoch: 5 step: 190, loss is 0.2108\n", "epoch: 5 step: 191, loss is 0.3682\n", "epoch: 5 step: 192, loss is 0.3154\n", "epoch: 5 step: 193, loss is 0.3327\n", "epoch: 5 step: 194, loss is 0.3686\n", "epoch: 5 step: 195, loss is 0.3824\n", "epoch: 5 step: 196, loss is 0.2827\n", "epoch: 5 step: 197, loss is 0.3519\n", "epoch: 5 step: 198, loss is 0.2818\n", "epoch: 5 step: 199, loss is 0.2671\n", "epoch: 5 step: 200, loss is 0.2776\n", "epoch: 5 step: 201, loss is 0.4823\n", "epoch: 5 step: 202, loss is 0.2648\n", "epoch: 5 step: 203, loss is 0.2620\n", "epoch: 5 step: 204, loss is 0.3181\n", "epoch: 5 step: 205, loss is 0.2479\n", "epoch: 5 step: 206, loss is 0.4319\n", "epoch: 5 step: 207, loss is 0.3991\n", "epoch: 5 step: 208, loss is 0.3004\n", "epoch: 5 step: 209, loss is 0.3004\n", "epoch: 5 step: 210, loss is 0.3069\n", "epoch: 5 step: 211, loss is 0.2957\n", "epoch: 5 step: 212, loss is 0.2999\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 5 step: 213, loss is 0.4016\n", "epoch: 5 step: 214, loss is 0.2758\n", "epoch: 5 step: 215, loss is 0.4611\n", "epoch: 5 step: 216, loss is 0.3102\n", "epoch: 5 step: 217, loss is 0.3919\n", "epoch: 5 step: 218, loss is 0.3644\n", "epoch: 5 step: 219, loss is 0.3343\n", "epoch: 5 step: 220, loss is 0.3409\n", "epoch: 5 step: 221, loss is 0.3408\n", "epoch: 5 step: 222, loss is 0.3310\n", "epoch: 5 step: 223, loss is 0.3425\n", "epoch: 5 step: 224, loss is 0.2430\n", "epoch: 5 step: 225, loss is 0.2700\n", "epoch: 5 step: 226, loss is 0.4033\n", "epoch: 5 step: 227, loss is 0.3329\n", "epoch: 5 step: 228, loss is 0.4596\n", "epoch: 5 step: 229, loss is 0.3272\n", "epoch: 5 step: 230, loss is 0.2274\n", "epoch: 5 step: 231, loss is 0.4503\n", "epoch: 5 step: 232, loss is 0.2505\n", "epoch: 5 step: 233, loss is 0.3719\n", "epoch: 5 step: 234, loss is 0.2949\n", "epoch: 5 step: 235, loss is 0.3854\n", "epoch: 5 step: 236, loss is 0.5405\n", "epoch: 5 step: 237, loss is 0.3014\n", "epoch: 5 step: 238, loss is 0.3945\n", "epoch: 5 step: 239, loss is 0.3244\n", "epoch: 5 step: 240, loss is 0.4346\n", "epoch: 5 step: 241, loss is 0.3247\n", "epoch: 5 step: 242, loss is 0.4067\n", "epoch: 5 step: 243, loss is 0.4058\n", "epoch: 5 step: 244, loss is 0.3316\n", "epoch: 5 step: 245, loss is 0.3552\n", "epoch: 5 step: 246, loss is 0.2829\n", "epoch: 5 step: 247, loss is 0.3828\n", "epoch: 5 step: 248, loss is 0.3679\n", "epoch: 5 step: 249, loss is 0.3295\n", "epoch: 5 step: 250, loss is 0.2944\n", "epoch: 5 step: 251, loss is 0.2622\n", "epoch: 5 step: 252, loss is 0.4662\n", "epoch: 5 step: 253, loss is 0.4145\n", "epoch: 5 step: 254, loss is 0.2235\n", "epoch: 5 step: 255, loss is 0.3826\n", "epoch: 5 step: 256, loss is 0.4591\n", "epoch: 5 step: 257, loss is 0.2777\n", "epoch: 5 step: 258, loss is 0.3017\n", "epoch: 5 step: 259, loss is 0.1980\n", "epoch: 5 step: 260, loss is 0.3733\n", "epoch: 5 step: 261, loss is 0.3896\n", "epoch: 5 step: 262, loss is 0.3417\n", "epoch: 5 step: 263, loss is 0.4144\n", "epoch: 5 step: 264, loss is 0.3417\n", "epoch: 5 step: 265, loss is 0.3956\n", "epoch: 5 step: 266, loss is 0.4007\n", "epoch: 5 step: 267, loss is 0.3253\n", "epoch: 5 step: 268, loss is 0.3239\n", "epoch: 5 step: 269, loss is 0.2131\n", "epoch: 5 step: 270, loss is 0.3470\n", "epoch: 5 step: 271, loss is 0.2773\n", "epoch: 5 step: 272, loss is 0.4068\n", "epoch: 5 step: 273, loss is 0.2524\n", "epoch: 5 step: 274, loss is 0.2715\n", "epoch: 5 step: 275, loss is 0.2724\n", "epoch: 5 step: 276, loss is 0.4075\n", "epoch: 5 step: 277, loss is 0.1439\n", "epoch: 5 step: 278, loss is 0.2628\n", "epoch: 5 step: 279, loss is 0.2270\n", "epoch: 5 step: 280, loss is 0.3230\n", "epoch: 5 step: 281, loss is 0.3329\n", "epoch: 5 step: 282, loss is 0.3126\n", "epoch: 5 step: 283, loss is 0.3559\n", "epoch: 5 step: 284, loss is 0.4573\n", "epoch: 5 step: 285, loss is 0.3536\n", "epoch: 5 step: 286, loss is 0.2524\n", "epoch: 5 step: 287, loss is 0.4055\n", "epoch: 5 step: 288, loss is 0.2159\n", "epoch: 5 step: 289, loss is 0.3166\n", "epoch: 5 step: 290, loss is 0.3783\n", "epoch: 5 step: 291, loss is 0.4178\n", "epoch: 5 step: 292, loss is 0.4205\n", "epoch: 5 step: 293, loss is 0.3483\n", "epoch: 5 step: 294, loss is 0.5168\n", "epoch: 5 step: 295, loss is 0.4163\n", "epoch: 5 step: 296, loss is 0.3834\n", "epoch: 5 step: 297, loss is 0.3833\n", "epoch: 5 step: 298, loss is 0.4084\n", "epoch: 5 step: 299, loss is 0.4530\n", "epoch: 5 step: 300, loss is 0.2934\n", "epoch: 5 step: 301, loss is 0.4108\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 5 step: 302, loss is 0.3439\n", "epoch: 5 step: 303, loss is 0.4070\n", "epoch: 5 step: 304, loss is 0.4360\n", "epoch: 5 step: 305, loss is 0.4695\n", "epoch: 5 step: 306, loss is 0.2571\n", "epoch: 5 step: 307, loss is 0.2597\n", "epoch: 5 step: 308, loss is 0.3709\n", "epoch: 5 step: 309, loss is 0.2729\n", "epoch: 5 step: 310, loss is 0.3060\n", "epoch: 5 step: 311, loss is 0.2724\n", "epoch: 5 step: 312, loss is 0.4042\n", "epoch: 5 step: 313, loss is 0.3170\n", "epoch: 5 step: 314, loss is 0.2852\n", "epoch: 5 step: 315, loss is 0.3810\n", "epoch: 5 step: 316, loss is 0.4999\n", "epoch: 5 step: 317, loss is 0.3802\n", "epoch: 5 step: 318, loss is 0.4756\n", "epoch: 5 step: 319, loss is 0.2718\n", "epoch: 5 step: 320, loss is 0.4197\n", "epoch: 5 step: 321, loss is 0.2601\n", "epoch: 5 step: 322, loss is 0.2091\n", "epoch: 5 step: 323, loss is 0.4082\n", "epoch: 5 step: 324, loss is 0.2823\n", "epoch: 5 step: 325, loss is 0.3926\n", "epoch: 5 step: 326, loss is 0.2773\n", "epoch: 5 step: 327, loss is 0.4278\n", "epoch: 5 step: 328, loss is 0.2811\n", "epoch: 5 step: 329, loss is 0.2949\n", "epoch: 5 step: 330, loss is 0.3619\n", "epoch: 5 step: 331, loss is 0.3774\n", "epoch: 5 step: 332, loss is 0.3439\n", "epoch: 5 step: 333, loss is 0.3816\n", "epoch: 5 step: 334, loss is 0.3978\n", "epoch: 5 step: 335, loss is 0.3064\n", "epoch: 5 step: 336, loss is 0.4427\n", "epoch: 5 step: 337, loss is 0.3247\n", "epoch: 5 step: 338, loss is 0.3244\n", "epoch: 5 step: 339, loss is 0.4572\n", "epoch: 5 step: 340, loss is 0.3603\n", "epoch: 5 step: 341, loss is 0.2594\n", "epoch: 5 step: 342, loss is 0.4625\n", "epoch: 5 step: 343, loss is 0.4464\n", "epoch: 5 step: 344, loss is 0.3788\n", "epoch: 5 step: 345, loss is 0.3054\n", "epoch: 5 step: 346, loss is 0.4174\n", "epoch: 5 step: 347, loss is 0.2062\n", "epoch: 5 step: 348, loss is 0.3455\n", "epoch: 5 step: 349, loss is 0.4392\n", "epoch: 5 step: 350, loss is 0.3018\n", "epoch: 5 step: 351, loss is 0.2346\n", "epoch: 5 step: 352, loss is 0.2619\n", "epoch: 5 step: 353, loss is 0.2922\n", "epoch: 5 step: 354, loss is 0.2231\n", "epoch: 5 step: 355, loss is 0.4164\n", "epoch: 5 step: 356, loss is 0.2650\n", "epoch: 5 step: 357, loss is 0.2103\n", "epoch: 5 step: 358, loss is 0.4690\n", "epoch: 5 step: 359, loss is 0.2352\n", "epoch: 5 step: 360, loss is 0.1806\n", "epoch: 5 step: 361, loss is 0.3843\n", "epoch: 5 step: 362, loss is 0.2840\n", "epoch: 5 step: 363, loss is 0.2744\n", "epoch: 5 step: 364, loss is 0.3938\n", "epoch: 5 step: 365, loss is 0.2933\n", "epoch: 5 step: 366, loss is 0.4054\n", "epoch: 5 step: 367, loss is 0.3868\n", "epoch: 5 step: 368, loss is 0.5758\n", "epoch: 5 step: 369, loss is 0.4107\n", "epoch: 5 step: 370, loss is 0.1999\n", "epoch: 5 step: 371, loss is 0.3547\n", "epoch: 5 step: 372, loss is 0.4353\n", "epoch: 5 step: 373, loss is 0.4284\n", "epoch: 5 step: 374, loss is 0.4428\n", "epoch: 5 step: 375, loss is 0.3787\n", "epoch: 5 step: 376, loss is 0.4395\n", "epoch: 5 step: 377, loss is 0.4732\n", "epoch: 5 step: 378, loss is 0.5450\n", "epoch: 5 step: 379, loss is 0.4199\n", "epoch: 5 step: 380, loss is 0.3545\n", "epoch: 5 step: 381, loss is 0.3200\n", "epoch: 5 step: 382, loss is 0.2886\n", "epoch: 5 step: 383, loss is 0.4360\n", "epoch: 5 step: 384, loss is 0.3312\n", "epoch: 5 step: 385, loss is 0.4088\n", "epoch: 5 step: 386, loss is 0.2987\n", "epoch: 5 step: 387, loss is 0.3314\n", "epoch: 5 step: 388, loss is 0.3461\n", "epoch: 5 step: 389, loss is 0.2056\n", "epoch: 5 step: 390, loss is 0.3620\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Epoch time: 40547.118, per step time: 103.967, avg loss: 0.346\n", "************************************************************\n", "epoch: 6 step: 1, loss is 0.3137\n", "epoch: 6 step: 2, loss is 0.3295\n", "epoch: 6 step: 3, loss is 0.4285\n", "epoch: 6 step: 4, loss is 0.2917\n", "epoch: 6 step: 5, loss is 0.3357\n", "epoch: 6 step: 6, loss is 0.3456\n", "epoch: 6 step: 7, loss is 0.4375\n", "epoch: 6 step: 8, loss is 0.3685\n", "epoch: 6 step: 9, loss is 0.2734\n", "epoch: 6 step: 10, loss is 0.2983\n", "epoch: 6 step: 11, loss is 0.3373\n", "epoch: 6 step: 12, loss is 0.3792\n", "epoch: 6 step: 13, loss is 0.2534\n", "epoch: 6 step: 14, loss is 0.2555\n", "epoch: 6 step: 15, loss is 0.2536\n", "epoch: 6 step: 16, loss is 0.2763\n", "epoch: 6 step: 17, loss is 0.3496\n", "epoch: 6 step: 18, loss is 0.2546\n", "epoch: 6 step: 19, loss is 0.4003\n", "epoch: 6 step: 20, loss is 0.4276\n", "epoch: 6 step: 21, loss is 0.3958\n", "epoch: 6 step: 22, loss is 0.2281\n", "epoch: 6 step: 23, loss is 0.3480\n", "epoch: 6 step: 24, loss is 0.3870\n", "epoch: 6 step: 25, loss is 0.2697\n", "epoch: 6 step: 26, loss is 0.2907\n", "epoch: 6 step: 27, loss is 0.3572\n", "epoch: 6 step: 28, loss is 0.3893\n", "epoch: 6 step: 29, loss is 0.2259\n", "epoch: 6 step: 30, loss is 0.3245\n", "epoch: 6 step: 31, loss is 0.3229\n", "epoch: 6 step: 32, loss is 0.4215\n", "epoch: 6 step: 33, loss is 0.3496\n", "epoch: 6 step: 34, loss is 0.2681\n", "epoch: 6 step: 35, loss is 0.2482\n", "epoch: 6 step: 36, loss is 0.2724\n", "epoch: 6 step: 37, loss is 0.2379\n", "epoch: 6 step: 38, loss is 0.3819\n", "epoch: 6 step: 39, loss is 0.3537\n", "epoch: 6 step: 40, loss is 0.4310\n", "epoch: 6 step: 41, loss is 0.2783\n", "epoch: 6 step: 42, loss is 0.2990\n", "epoch: 6 step: 43, loss is 0.2777\n", "epoch: 6 step: 44, loss is 0.3549\n", "epoch: 6 step: 45, loss is 0.3157\n", "epoch: 6 step: 46, loss is 0.3321\n", "epoch: 6 step: 47, loss is 0.3563\n", "epoch: 6 step: 48, loss is 0.4130\n", "epoch: 6 step: 49, loss is 0.3645\n", "epoch: 6 step: 50, loss is 0.2529\n", "epoch: 6 step: 51, loss is 0.2823\n", "epoch: 6 step: 52, loss is 0.3664\n", "epoch: 6 step: 53, loss is 0.2778\n", "epoch: 6 step: 54, loss is 0.2984\n", "epoch: 6 step: 55, loss is 0.2269\n", "epoch: 6 step: 56, loss is 0.4109\n", "epoch: 6 step: 57, loss is 0.4286\n", "epoch: 6 step: 58, loss is 0.2945\n", "epoch: 6 step: 59, loss is 0.4755\n", "epoch: 6 step: 60, loss is 0.4181\n", "epoch: 6 step: 61, loss is 0.4213\n", "epoch: 6 step: 62, loss is 0.1686\n", "epoch: 6 step: 63, loss is 0.2477\n", "epoch: 6 step: 64, loss is 0.2404\n", "epoch: 6 step: 65, loss is 0.3538\n", "epoch: 6 step: 66, loss is 0.2904\n", "epoch: 6 step: 67, loss is 0.4119\n", "epoch: 6 step: 68, loss is 0.3131\n", "epoch: 6 step: 69, loss is 0.4042\n", "epoch: 6 step: 70, loss is 0.4035\n", "epoch: 6 step: 71, loss is 0.3474\n", "epoch: 6 step: 72, loss is 0.4037\n", "epoch: 6 step: 73, loss is 0.2797\n", "epoch: 6 step: 74, loss is 0.3334\n", "epoch: 6 step: 75, loss is 0.2892\n", "epoch: 6 step: 76, loss is 0.4234\n", "epoch: 6 step: 77, loss is 0.2536\n", "epoch: 6 step: 78, loss is 0.3701\n", "epoch: 6 step: 79, loss is 0.4579\n", "epoch: 6 step: 80, loss is 0.3049\n", "epoch: 6 step: 81, loss is 0.3158\n", "epoch: 6 step: 82, loss is 0.4254\n", "epoch: 6 step: 83, loss is 0.2563\n", "epoch: 6 step: 84, loss is 0.3178\n", "epoch: 6 step: 85, loss is 0.3254\n", "epoch: 6 step: 86, loss is 0.2758\n", "epoch: 6 step: 87, loss is 0.4271\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 6 step: 88, loss is 0.3815\n", "epoch: 6 step: 89, loss is 0.3205\n", "epoch: 6 step: 90, loss is 0.1674\n", "epoch: 6 step: 91, loss is 0.3302\n", "epoch: 6 step: 92, loss is 0.3680\n", "epoch: 6 step: 93, loss is 0.3370\n", "epoch: 6 step: 94, loss is 0.3272\n", "epoch: 6 step: 95, loss is 0.3728\n", "epoch: 6 step: 96, loss is 0.2415\n", "epoch: 6 step: 97, loss is 0.3413\n", "epoch: 6 step: 98, loss is 0.2772\n", "epoch: 6 step: 99, loss is 0.3638\n", "epoch: 6 step: 100, loss is 0.4868\n", "epoch: 6 step: 101, loss is 0.2709\n", "epoch: 6 step: 102, loss is 0.3050\n", "epoch: 6 step: 103, loss is 0.3113\n", "epoch: 6 step: 104, loss is 0.3130\n", "epoch: 6 step: 105, loss is 0.2987\n", "epoch: 6 step: 106, loss is 0.2144\n", "epoch: 6 step: 107, loss is 0.4136\n", "epoch: 6 step: 108, loss is 0.2410\n", "epoch: 6 step: 109, loss is 0.3518\n", "epoch: 6 step: 110, loss is 0.3474\n", "epoch: 6 step: 111, loss is 0.2430\n", "epoch: 6 step: 112, loss is 0.3468\n", "epoch: 6 step: 113, loss is 0.3406\n", "epoch: 6 step: 114, loss is 0.3484\n", "epoch: 6 step: 115, loss is 0.3458\n", "epoch: 6 step: 116, loss is 0.4029\n", "epoch: 6 step: 117, loss is 0.3123\n", "epoch: 6 step: 118, loss is 0.2976\n", "epoch: 6 step: 119, loss is 0.2587\n", "epoch: 6 step: 120, loss is 0.2946\n", "epoch: 6 step: 121, loss is 0.5230\n", "epoch: 6 step: 122, loss is 0.2541\n", "epoch: 6 step: 123, loss is 0.4289\n", "epoch: 6 step: 124, loss is 0.3652\n", "epoch: 6 step: 125, loss is 0.2435\n", "epoch: 6 step: 126, loss is 0.3469\n", "epoch: 6 step: 127, loss is 0.3319\n", "epoch: 6 step: 128, loss is 0.3387\n", "epoch: 6 step: 129, loss is 0.2644\n", "epoch: 6 step: 130, loss is 0.2812\n", "epoch: 6 step: 131, loss is 0.2899\n", "epoch: 6 step: 132, loss is 0.2739\n", "epoch: 6 step: 133, loss is 0.1730\n", "epoch: 6 step: 134, loss is 0.3183\n", "epoch: 6 step: 135, loss is 0.3891\n", "epoch: 6 step: 136, loss is 0.3395\n", "epoch: 6 step: 137, loss is 0.2796\n", "epoch: 6 step: 138, loss is 0.4936\n", "epoch: 6 step: 139, loss is 0.4189\n", "epoch: 6 step: 140, loss is 0.3429\n", "epoch: 6 step: 141, loss is 0.2839\n", "epoch: 6 step: 142, loss is 0.3150\n", "epoch: 6 step: 143, loss is 0.3406\n", "epoch: 6 step: 144, loss is 0.3555\n", "epoch: 6 step: 145, loss is 0.2782\n", "epoch: 6 step: 146, loss is 0.2559\n", "epoch: 6 step: 147, loss is 0.3379\n", "epoch: 6 step: 148, loss is 0.3768\n", "epoch: 6 step: 149, loss is 0.3913\n", "epoch: 6 step: 150, loss is 0.2264\n", "epoch: 6 step: 151, loss is 0.2102\n", "epoch: 6 step: 152, loss is 0.3544\n", "epoch: 6 step: 153, loss is 0.2458\n", "epoch: 6 step: 154, loss is 0.2079\n", "epoch: 6 step: 155, loss is 0.5016\n", "epoch: 6 step: 156, loss is 0.3904\n", "epoch: 6 step: 157, loss is 0.2560\n", "epoch: 6 step: 158, loss is 0.3972\n", "epoch: 6 step: 159, loss is 0.3128\n", "epoch: 6 step: 160, loss is 0.3540\n", "epoch: 6 step: 161, loss is 0.3925\n", "epoch: 6 step: 162, loss is 0.3021\n", "epoch: 6 step: 163, loss is 0.3047\n", "epoch: 6 step: 164, loss is 0.2893\n", "epoch: 6 step: 165, loss is 0.2883\n", "epoch: 6 step: 166, loss is 0.3685\n", "epoch: 6 step: 167, loss is 0.4150\n", "epoch: 6 step: 168, loss is 0.3211\n", "epoch: 6 step: 169, loss is 0.2711\n", "epoch: 6 step: 170, loss is 0.3252\n", "epoch: 6 step: 171, loss is 0.3076\n", "epoch: 6 step: 172, loss is 0.3561\n", "epoch: 6 step: 173, loss is 0.2063\n", "epoch: 6 step: 174, loss is 0.3680\n", "epoch: 6 step: 175, loss is 0.3585\n", "epoch: 6 step: 176, loss is 0.2052\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 6 step: 177, loss is 0.3473\n", "epoch: 6 step: 178, loss is 0.4617\n", "epoch: 6 step: 179, loss is 0.2574\n", "epoch: 6 step: 180, loss is 0.2926\n", "epoch: 6 step: 181, loss is 0.2689\n", "epoch: 6 step: 182, loss is 0.2425\n", "epoch: 6 step: 183, loss is 0.4197\n", "epoch: 6 step: 184, loss is 0.3622\n", "epoch: 6 step: 185, loss is 0.3172\n", "epoch: 6 step: 186, loss is 0.2831\n", "epoch: 6 step: 187, loss is 0.4395\n", "epoch: 6 step: 188, loss is 0.3841\n", "epoch: 6 step: 189, loss is 0.4334\n", "epoch: 6 step: 190, loss is 0.5027\n", "epoch: 6 step: 191, loss is 0.5141\n", "epoch: 6 step: 192, loss is 0.3588\n", "epoch: 6 step: 193, loss is 0.3650\n", "epoch: 6 step: 194, loss is 0.3152\n", "epoch: 6 step: 195, loss is 0.3063\n", "epoch: 6 step: 196, loss is 0.3097\n", "epoch: 6 step: 197, loss is 0.3507\n", "epoch: 6 step: 198, loss is 0.2534\n", "epoch: 6 step: 199, loss is 0.4216\n", "epoch: 6 step: 200, loss is 0.4192\n", "epoch: 6 step: 201, loss is 0.3980\n", "epoch: 6 step: 202, loss is 0.3389\n", "epoch: 6 step: 203, loss is 0.3186\n", "epoch: 6 step: 204, loss is 0.5272\n", "epoch: 6 step: 205, loss is 0.4031\n", "epoch: 6 step: 206, loss is 0.3488\n", "epoch: 6 step: 207, loss is 0.3204\n", "epoch: 6 step: 208, loss is 0.3215\n", "epoch: 6 step: 209, loss is 0.3097\n", "epoch: 6 step: 210, loss is 0.2991\n", "epoch: 6 step: 211, loss is 0.2512\n", "epoch: 6 step: 212, loss is 0.2952\n", "epoch: 6 step: 213, loss is 0.3371\n", "epoch: 6 step: 214, loss is 0.3340\n", "epoch: 6 step: 215, loss is 0.2598\n", "epoch: 6 step: 216, loss is 0.3255\n", "epoch: 6 step: 217, loss is 0.3541\n", "epoch: 6 step: 218, loss is 0.3187\n", "epoch: 6 step: 219, loss is 0.2939\n", "epoch: 6 step: 220, loss is 0.2786\n", "epoch: 6 step: 221, loss is 0.2779\n", "epoch: 6 step: 222, loss is 0.4111\n", "epoch: 6 step: 223, loss is 0.3184\n", "epoch: 6 step: 224, loss is 0.1722\n", "epoch: 6 step: 225, loss is 0.2848\n", "epoch: 6 step: 226, loss is 0.3035\n", "epoch: 6 step: 227, loss is 0.4568\n", "epoch: 6 step: 228, loss is 0.2989\n", "epoch: 6 step: 229, loss is 0.2840\n", "epoch: 6 step: 230, loss is 0.3429\n", "epoch: 6 step: 231, loss is 0.3582\n", "epoch: 6 step: 232, loss is 0.2675\n", "epoch: 6 step: 233, loss is 0.2883\n", "epoch: 6 step: 234, loss is 0.3633\n", "epoch: 6 step: 235, loss is 0.3305\n", "epoch: 6 step: 236, loss is 0.2916\n", "epoch: 6 step: 237, loss is 0.3045\n", "epoch: 6 step: 238, loss is 0.2606\n", "epoch: 6 step: 239, loss is 0.2456\n", "epoch: 6 step: 240, loss is 0.2210\n", "epoch: 6 step: 241, loss is 0.3274\n", "epoch: 6 step: 242, loss is 0.4134\n", "epoch: 6 step: 243, loss is 0.4599\n", "epoch: 6 step: 244, loss is 0.5947\n", "epoch: 6 step: 245, loss is 0.2561\n", "epoch: 6 step: 246, loss is 0.2175\n", "epoch: 6 step: 247, loss is 0.3314\n", "epoch: 6 step: 248, loss is 0.2679\n", "epoch: 6 step: 249, loss is 0.3549\n", "epoch: 6 step: 250, loss is 0.2441\n", "epoch: 6 step: 251, loss is 0.2675\n", "epoch: 6 step: 252, loss is 0.3183\n", "epoch: 6 step: 253, loss is 0.3769\n", "epoch: 6 step: 254, loss is 0.2539\n", "epoch: 6 step: 255, loss is 0.4019\n", "epoch: 6 step: 256, loss is 0.3086\n", "epoch: 6 step: 257, loss is 0.4399\n", "epoch: 6 step: 258, loss is 0.2868\n", "epoch: 6 step: 259, loss is 0.3434\n", "epoch: 6 step: 260, loss is 0.2957\n", "epoch: 6 step: 261, loss is 0.2614\n", "epoch: 6 step: 262, loss is 0.2950\n", "epoch: 6 step: 263, loss is 0.2932\n", "epoch: 6 step: 264, loss is 0.3685\n", "epoch: 6 step: 265, loss is 0.2662\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 6 step: 266, loss is 0.1851\n", "epoch: 6 step: 267, loss is 0.3902\n", "epoch: 6 step: 268, loss is 0.1962\n", "epoch: 6 step: 269, loss is 0.2614\n", "epoch: 6 step: 270, loss is 0.2919\n", "epoch: 6 step: 271, loss is 0.4295\n", "epoch: 6 step: 272, loss is 0.3681\n", "epoch: 6 step: 273, loss is 0.2417\n", "epoch: 6 step: 274, loss is 0.3749\n", "epoch: 6 step: 275, loss is 0.3401\n", "epoch: 6 step: 276, loss is 0.3363\n", "epoch: 6 step: 277, loss is 0.3809\n", "epoch: 6 step: 278, loss is 0.2851\n", "epoch: 6 step: 279, loss is 0.3831\n", "epoch: 6 step: 280, loss is 0.3269\n", "epoch: 6 step: 281, loss is 0.2682\n", "epoch: 6 step: 282, loss is 0.2464\n", "epoch: 6 step: 283, loss is 0.3946\n", "epoch: 6 step: 284, loss is 0.3671\n", "epoch: 6 step: 285, loss is 0.2973\n", "epoch: 6 step: 286, loss is 0.3856\n", "epoch: 6 step: 287, loss is 0.4005\n", "epoch: 6 step: 288, loss is 0.3100\n", "epoch: 6 step: 289, loss is 0.4213\n", "epoch: 6 step: 290, loss is 0.2163\n", "epoch: 6 step: 291, loss is 0.2245\n", "epoch: 6 step: 292, loss is 0.2426\n", "epoch: 6 step: 293, loss is 0.3086\n", "epoch: 6 step: 294, loss is 0.3300\n", "epoch: 6 step: 295, loss is 0.4324\n", "epoch: 6 step: 296, loss is 0.4079\n", "epoch: 6 step: 297, loss is 0.3564\n", "epoch: 6 step: 298, loss is 0.3987\n", "epoch: 6 step: 299, loss is 0.3378\n", "epoch: 6 step: 300, loss is 0.4463\n", "epoch: 6 step: 301, loss is 0.3557\n", "epoch: 6 step: 302, loss is 0.4535\n", "epoch: 6 step: 303, loss is 0.3136\n", "epoch: 6 step: 304, loss is 0.2858\n", "epoch: 6 step: 305, loss is 0.4527\n", "epoch: 6 step: 306, loss is 0.4973\n", "epoch: 6 step: 307, loss is 0.3944\n", "epoch: 6 step: 308, loss is 0.3267\n", "epoch: 6 step: 309, loss is 0.3917\n", "epoch: 6 step: 310, loss is 0.2803\n", "epoch: 6 step: 311, loss is 0.4024\n", "epoch: 6 step: 312, loss is 0.4093\n", "epoch: 6 step: 313, loss is 0.3855\n", "epoch: 6 step: 314, loss is 0.3074\n", "epoch: 6 step: 315, loss is 0.2501\n", "epoch: 6 step: 316, loss is 0.3559\n", "epoch: 6 step: 317, loss is 0.3158\n", "epoch: 6 step: 318, loss is 0.2860\n", "epoch: 6 step: 319, loss is 0.1979\n", "epoch: 6 step: 320, loss is 0.2508\n", "epoch: 6 step: 321, loss is 0.3351\n", "epoch: 6 step: 322, loss is 0.3078\n", "epoch: 6 step: 323, loss is 0.2160\n", "epoch: 6 step: 324, loss is 0.2717\n", "epoch: 6 step: 325, loss is 0.2465\n", "epoch: 6 step: 326, loss is 0.4169\n", "epoch: 6 step: 327, loss is 0.2714\n", "epoch: 6 step: 328, loss is 0.2966\n", "epoch: 6 step: 329, loss is 0.2984\n", "epoch: 6 step: 330, loss is 0.2708\n", "epoch: 6 step: 331, loss is 0.3978\n", "epoch: 6 step: 332, loss is 0.3094\n", "epoch: 6 step: 333, loss is 0.3462\n", "epoch: 6 step: 334, loss is 0.2669\n", "epoch: 6 step: 335, loss is 0.4101\n", "epoch: 6 step: 336, loss is 0.3374\n", "epoch: 6 step: 337, loss is 0.4897\n", "epoch: 6 step: 338, loss is 0.4213\n", "epoch: 6 step: 339, loss is 0.3470\n", "epoch: 6 step: 340, loss is 0.3184\n", "epoch: 6 step: 341, loss is 0.2712\n", "epoch: 6 step: 342, loss is 0.3386\n", "epoch: 6 step: 343, loss is 0.2672\n", "epoch: 6 step: 344, loss is 0.2524\n", "epoch: 6 step: 345, loss is 0.4011\n", "epoch: 6 step: 346, loss is 0.2394\n", "epoch: 6 step: 347, loss is 0.3335\n", "epoch: 6 step: 348, loss is 0.4013\n", "epoch: 6 step: 349, loss is 0.2915\n", "epoch: 6 step: 350, loss is 0.3499\n", "epoch: 6 step: 351, loss is 0.2878\n", "epoch: 6 step: 352, loss is 0.3596\n", "epoch: 6 step: 353, loss is 0.2053\n", "epoch: 6 step: 354, loss is 0.3241\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 6 step: 355, loss is 0.4533\n", "epoch: 6 step: 356, loss is 0.2419\n", "epoch: 6 step: 357, loss is 0.2371\n", "epoch: 6 step: 358, loss is 0.3193\n", "epoch: 6 step: 359, loss is 0.4685\n", "epoch: 6 step: 360, loss is 0.3362\n", "epoch: 6 step: 361, loss is 0.4437\n", "epoch: 6 step: 362, loss is 0.3613\n", "epoch: 6 step: 363, loss is 0.4118\n", "epoch: 6 step: 364, loss is 0.3095\n", "epoch: 6 step: 365, loss is 0.2669\n", "epoch: 6 step: 366, loss is 0.2606\n", "epoch: 6 step: 367, loss is 0.3994\n", "epoch: 6 step: 368, loss is 0.2873\n", "epoch: 6 step: 369, loss is 0.2830\n", "epoch: 6 step: 370, loss is 0.2995\n", "epoch: 6 step: 371, loss is 0.2545\n", "epoch: 6 step: 372, loss is 0.2930\n", "epoch: 6 step: 373, loss is 0.3777\n", "epoch: 6 step: 374, loss is 0.5867\n", "epoch: 6 step: 375, loss is 0.2580\n", "epoch: 6 step: 376, loss is 0.1726\n", "epoch: 6 step: 377, loss is 0.2685\n", "epoch: 6 step: 378, loss is 0.2625\n", "epoch: 6 step: 379, loss is 0.2591\n", "epoch: 6 step: 380, loss is 0.3863\n", "epoch: 6 step: 381, loss is 0.2968\n", "epoch: 6 step: 382, loss is 0.3835\n", "epoch: 6 step: 383, loss is 0.4430\n", "epoch: 6 step: 384, loss is 0.4552\n", "epoch: 6 step: 385, loss is 0.2496\n", "epoch: 6 step: 386, loss is 0.2851\n", "epoch: 6 step: 387, loss is 0.2592\n", "epoch: 6 step: 388, loss is 0.3486\n", "epoch: 6 step: 389, loss is 0.4242\n", "epoch: 6 step: 390, loss is 0.4188\n", "Epoch time: 41775.770, per step time: 107.117, avg loss: 0.330\n", "************************************************************\n", "epoch: 7 step: 1, loss is 0.4987\n", "epoch: 7 step: 2, loss is 0.2668\n", "epoch: 7 step: 3, loss is 0.2438\n", "epoch: 7 step: 4, loss is 0.2162\n", "epoch: 7 step: 5, loss is 0.2195\n", "epoch: 7 step: 6, loss is 0.3050\n", "epoch: 7 step: 7, loss is 0.2998\n", "epoch: 7 step: 8, loss is 0.2066\n", "epoch: 7 step: 9, loss is 0.2900\n", "epoch: 7 step: 10, loss is 0.3204\n", "epoch: 7 step: 11, loss is 0.3092\n", "epoch: 7 step: 12, loss is 0.2089\n", "epoch: 7 step: 13, loss is 0.4390\n", "epoch: 7 step: 14, loss is 0.2447\n", "epoch: 7 step: 15, loss is 0.3001\n", "epoch: 7 step: 16, loss is 0.2784\n", "epoch: 7 step: 17, loss is 0.3556\n", "epoch: 7 step: 18, loss is 0.4071\n", "epoch: 7 step: 19, loss is 0.3229\n", "epoch: 7 step: 20, loss is 0.3676\n", "epoch: 7 step: 21, loss is 0.4012\n", "epoch: 7 step: 22, loss is 0.2647\n", "epoch: 7 step: 23, loss is 0.2700\n", "epoch: 7 step: 24, loss is 0.2553\n", "epoch: 7 step: 25, loss is 0.3872\n", "epoch: 7 step: 26, loss is 0.2646\n", "epoch: 7 step: 27, loss is 0.4048\n", "epoch: 7 step: 28, loss is 0.2702\n", "epoch: 7 step: 29, loss is 0.2565\n", "epoch: 7 step: 30, loss is 0.3814\n", "epoch: 7 step: 31, loss is 0.2905\n", "epoch: 7 step: 32, loss is 0.3505\n", "epoch: 7 step: 33, loss is 0.2309\n", "epoch: 7 step: 34, loss is 0.2800\n", "epoch: 7 step: 35, loss is 0.2286\n", "epoch: 7 step: 36, loss is 0.2181\n", "epoch: 7 step: 37, loss is 0.3667\n", "epoch: 7 step: 38, loss is 0.3457\n", "epoch: 7 step: 39, loss is 0.3112\n", "epoch: 7 step: 40, loss is 0.2804\n", "epoch: 7 step: 41, loss is 0.2552\n", "epoch: 7 step: 42, loss is 0.1920\n", "epoch: 7 step: 43, loss is 0.3377\n", "epoch: 7 step: 44, loss is 0.2705\n", "epoch: 7 step: 45, loss is 0.4264\n", "epoch: 7 step: 46, loss is 0.2829\n", "epoch: 7 step: 47, loss is 0.4340\n", "epoch: 7 step: 48, loss is 0.2982\n", "epoch: 7 step: 49, loss is 0.2619\n", "epoch: 7 step: 50, loss is 0.3331\n", "epoch: 7 step: 51, loss is 0.2737\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 7 step: 52, loss is 0.3062\n", "epoch: 7 step: 53, loss is 0.3455\n", "epoch: 7 step: 54, loss is 0.3581\n", "epoch: 7 step: 55, loss is 0.2514\n", "epoch: 7 step: 56, loss is 0.3478\n", "epoch: 7 step: 57, loss is 0.2962\n", "epoch: 7 step: 58, loss is 0.2631\n", "epoch: 7 step: 59, loss is 0.2864\n", "epoch: 7 step: 60, loss is 0.3093\n", "epoch: 7 step: 61, loss is 0.2864\n", "epoch: 7 step: 62, loss is 0.1889\n", "epoch: 7 step: 63, loss is 0.3674\n", "epoch: 7 step: 64, loss is 0.3365\n", "epoch: 7 step: 65, loss is 0.3307\n", "epoch: 7 step: 66, loss is 0.1550\n", "epoch: 7 step: 67, loss is 0.2388\n", "epoch: 7 step: 68, loss is 0.3041\n", "epoch: 7 step: 69, loss is 0.3472\n", "epoch: 7 step: 70, loss is 0.3063\n", "epoch: 7 step: 71, loss is 0.2721\n", "epoch: 7 step: 72, loss is 0.2984\n", "epoch: 7 step: 73, loss is 0.2822\n", "epoch: 7 step: 74, loss is 0.2518\n", "epoch: 7 step: 75, loss is 0.3445\n", "epoch: 7 step: 76, loss is 0.2901\n", "epoch: 7 step: 77, loss is 0.3076\n", "epoch: 7 step: 78, loss is 0.1980\n", "epoch: 7 step: 79, loss is 0.1895\n", "epoch: 7 step: 80, loss is 0.2033\n", "epoch: 7 step: 81, loss is 0.2264\n", "epoch: 7 step: 82, loss is 0.2937\n", "epoch: 7 step: 83, loss is 0.2607\n", "epoch: 7 step: 84, loss is 0.4120\n", "epoch: 7 step: 85, loss is 0.2139\n", "epoch: 7 step: 86, loss is 0.2820\n", "epoch: 7 step: 87, loss is 0.4323\n", "epoch: 7 step: 88, loss is 0.3326\n", "epoch: 7 step: 89, loss is 0.3487\n", "epoch: 7 step: 90, loss is 0.3475\n", "epoch: 7 step: 91, loss is 0.3121\n", "epoch: 7 step: 92, loss is 0.3437\n", "epoch: 7 step: 93, loss is 0.3428\n", "epoch: 7 step: 94, loss is 0.3187\n", "epoch: 7 step: 95, loss is 0.2734\n", "epoch: 7 step: 96, loss is 0.4287\n", "epoch: 7 step: 97, loss is 0.2319\n", "epoch: 7 step: 98, loss is 0.2512\n", "epoch: 7 step: 99, loss is 0.3681\n", "epoch: 7 step: 100, loss is 0.2600\n", "epoch: 7 step: 101, loss is 0.3838\n", "epoch: 7 step: 102, loss is 0.2613\n", "epoch: 7 step: 103, loss is 0.2161\n", "epoch: 7 step: 104, loss is 0.2999\n", "epoch: 7 step: 105, loss is 0.2319\n", "epoch: 7 step: 106, loss is 0.3333\n", "epoch: 7 step: 107, loss is 0.2740\n", "epoch: 7 step: 108, loss is 0.2087\n", "epoch: 7 step: 109, loss is 0.3952\n", "epoch: 7 step: 110, loss is 0.1982\n", "epoch: 7 step: 111, loss is 0.3236\n", "epoch: 7 step: 112, loss is 0.3696\n", "epoch: 7 step: 113, loss is 0.2700\n", "epoch: 7 step: 114, loss is 0.2315\n", "epoch: 7 step: 115, loss is 0.3591\n", "epoch: 7 step: 116, loss is 0.3878\n", "epoch: 7 step: 117, loss is 0.2875\n", "epoch: 7 step: 118, loss is 0.2651\n", "epoch: 7 step: 119, loss is 0.3032\n", "epoch: 7 step: 120, loss is 0.3698\n", "epoch: 7 step: 121, loss is 0.4825\n", "epoch: 7 step: 122, loss is 0.3069\n", "epoch: 7 step: 123, loss is 0.3896\n", "epoch: 7 step: 124, loss is 0.3294\n", "epoch: 7 step: 125, loss is 0.2650\n", "epoch: 7 step: 126, loss is 0.3385\n", "epoch: 7 step: 127, loss is 0.3434\n", "epoch: 7 step: 128, loss is 0.3783\n", "epoch: 7 step: 129, loss is 0.4386\n", "epoch: 7 step: 130, loss is 0.2633\n", "epoch: 7 step: 131, loss is 0.3878\n", "epoch: 7 step: 132, loss is 0.2874\n", "epoch: 7 step: 133, loss is 0.4297\n", "epoch: 7 step: 134, loss is 0.4489\n", "epoch: 7 step: 135, loss is 0.4091\n", "epoch: 7 step: 136, loss is 0.3105\n", "epoch: 7 step: 137, loss is 0.3260\n", "epoch: 7 step: 138, loss is 0.4096\n", "epoch: 7 step: 139, loss is 0.3988\n", "epoch: 7 step: 140, loss is 0.1529\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 7 step: 141, loss is 0.4725\n", "epoch: 7 step: 142, loss is 0.3928\n", "epoch: 7 step: 143, loss is 0.3646\n", "epoch: 7 step: 144, loss is 0.2601\n", "epoch: 7 step: 145, loss is 0.4328\n", "epoch: 7 step: 146, loss is 0.4251\n", "epoch: 7 step: 147, loss is 0.2112\n", "epoch: 7 step: 148, loss is 0.3383\n", "epoch: 7 step: 149, loss is 0.3793\n", "epoch: 7 step: 150, loss is 0.2300\n", "epoch: 7 step: 151, loss is 0.3427\n", "epoch: 7 step: 152, loss is 0.3089\n", "epoch: 7 step: 153, loss is 0.3507\n", "epoch: 7 step: 154, loss is 0.2947\n", "epoch: 7 step: 155, loss is 0.2489\n", "epoch: 7 step: 156, loss is 0.2677\n", "epoch: 7 step: 157, loss is 0.3559\n", "epoch: 7 step: 158, loss is 0.4911\n", "epoch: 7 step: 159, loss is 0.1923\n", "epoch: 7 step: 160, loss is 0.2644\n", "epoch: 7 step: 161, loss is 0.2804\n", "epoch: 7 step: 162, loss is 0.4733\n", "epoch: 7 step: 163, loss is 0.3742\n", "epoch: 7 step: 164, loss is 0.1808\n", "epoch: 7 step: 165, loss is 0.3073\n", "epoch: 7 step: 166, loss is 0.2948\n", "epoch: 7 step: 167, loss is 0.2632\n", "epoch: 7 step: 168, loss is 0.3022\n", "epoch: 7 step: 169, loss is 0.2658\n", "epoch: 7 step: 170, loss is 0.2519\n", "epoch: 7 step: 171, loss is 0.1923\n", "epoch: 7 step: 172, loss is 0.4174\n", "epoch: 7 step: 173, loss is 0.2779\n", "epoch: 7 step: 174, loss is 0.2294\n", "epoch: 7 step: 175, loss is 0.3028\n", "epoch: 7 step: 176, loss is 0.2897\n", "epoch: 7 step: 177, loss is 0.3320\n", "epoch: 7 step: 178, loss is 0.4117\n", "epoch: 7 step: 179, loss is 0.2853\n", "epoch: 7 step: 180, loss is 0.2863\n", "epoch: 7 step: 181, loss is 0.2929\n", "epoch: 7 step: 182, loss is 0.3603\n", "epoch: 7 step: 183, loss is 0.3064\n", "epoch: 7 step: 184, loss is 0.3416\n", "epoch: 7 step: 185, loss is 0.1937\n", "epoch: 7 step: 186, loss is 0.3261\n", "epoch: 7 step: 187, loss is 0.4091\n", "epoch: 7 step: 188, loss is 0.3246\n", "epoch: 7 step: 189, loss is 0.2380\n", "epoch: 7 step: 190, loss is 0.3734\n", "epoch: 7 step: 191, loss is 0.2739\n", "epoch: 7 step: 192, loss is 0.1707\n", "epoch: 7 step: 193, loss is 0.2889\n", "epoch: 7 step: 194, loss is 0.3508\n", "epoch: 7 step: 195, loss is 0.3550\n", "epoch: 7 step: 196, loss is 0.3134\n", "epoch: 7 step: 197, loss is 0.2662\n", "epoch: 7 step: 198, loss is 0.1943\n", "epoch: 7 step: 199, loss is 0.2413\n", "epoch: 7 step: 200, loss is 0.4060\n", "epoch: 7 step: 201, loss is 0.2927\n", "epoch: 7 step: 202, loss is 0.4597\n", "epoch: 7 step: 203, loss is 0.1949\n", "epoch: 7 step: 204, loss is 0.2847\n", "epoch: 7 step: 205, loss is 0.2219\n", "epoch: 7 step: 206, loss is 0.2121\n", "epoch: 7 step: 207, loss is 0.2721\n", "epoch: 7 step: 208, loss is 0.3978\n", "epoch: 7 step: 209, loss is 0.3549\n", "epoch: 7 step: 210, loss is 0.2148\n", "epoch: 7 step: 211, loss is 0.3941\n", "epoch: 7 step: 212, loss is 0.3572\n", "epoch: 7 step: 213, loss is 0.4223\n", "epoch: 7 step: 214, loss is 0.3817\n", "epoch: 7 step: 215, loss is 0.2850\n", "epoch: 7 step: 216, loss is 0.3105\n", "epoch: 7 step: 217, loss is 0.2596\n", "epoch: 7 step: 218, loss is 0.2437\n", "epoch: 7 step: 219, loss is 0.3108\n", "epoch: 7 step: 220, loss is 0.2695\n", "epoch: 7 step: 221, loss is 0.1840\n", "epoch: 7 step: 222, loss is 0.3094\n", "epoch: 7 step: 223, loss is 0.3207\n", "epoch: 7 step: 224, loss is 0.2268\n", "epoch: 7 step: 225, loss is 0.2396\n", "epoch: 7 step: 226, loss is 0.1836\n", "epoch: 7 step: 227, loss is 0.2902\n", "epoch: 7 step: 228, loss is 0.3813\n", "epoch: 7 step: 229, loss is 0.2926\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 7 step: 230, loss is 0.4031\n", "epoch: 7 step: 231, loss is 0.2659\n", "epoch: 7 step: 232, loss is 0.4359\n", "epoch: 7 step: 233, loss is 0.2296\n", "epoch: 7 step: 234, loss is 0.3760\n", "epoch: 7 step: 235, loss is 0.1930\n", "epoch: 7 step: 236, loss is 0.4012\n", "epoch: 7 step: 237, loss is 0.1525\n", "epoch: 7 step: 238, loss is 0.4822\n", "epoch: 7 step: 239, loss is 0.2978\n", "epoch: 7 step: 240, loss is 0.2879\n", "epoch: 7 step: 241, loss is 0.3184\n", "epoch: 7 step: 242, loss is 0.3067\n", "epoch: 7 step: 243, loss is 0.3059\n", "epoch: 7 step: 244, loss is 0.3247\n", "epoch: 7 step: 245, loss is 0.5435\n", "epoch: 7 step: 246, loss is 0.3728\n", "epoch: 7 step: 247, loss is 0.3015\n", "epoch: 7 step: 248, loss is 0.2837\n", "epoch: 7 step: 249, loss is 0.2077\n", "epoch: 7 step: 250, loss is 0.1852\n", "epoch: 7 step: 251, loss is 0.2704\n", "epoch: 7 step: 252, loss is 0.3132\n", "epoch: 7 step: 253, loss is 0.2244\n", "epoch: 7 step: 254, loss is 0.2337\n", "epoch: 7 step: 255, loss is 0.2662\n", "epoch: 7 step: 256, loss is 0.1683\n", "epoch: 7 step: 257, loss is 0.3610\n", "epoch: 7 step: 258, loss is 0.2154\n", "epoch: 7 step: 259, loss is 0.3245\n", "epoch: 7 step: 260, loss is 0.3826\n", "epoch: 7 step: 261, loss is 0.4108\n", "epoch: 7 step: 262, loss is 0.2967\n", "epoch: 7 step: 263, loss is 0.2311\n", "epoch: 7 step: 264, loss is 0.3229\n", "epoch: 7 step: 265, loss is 0.3456\n", "epoch: 7 step: 266, loss is 0.2595\n", "epoch: 7 step: 267, loss is 0.2446\n", "epoch: 7 step: 268, loss is 0.2589\n", "epoch: 7 step: 269, loss is 0.3324\n", "epoch: 7 step: 270, loss is 0.2709\n", "epoch: 7 step: 271, loss is 0.3636\n", "epoch: 7 step: 272, loss is 0.3574\n", "epoch: 7 step: 273, loss is 0.3321\n", "epoch: 7 step: 274, loss is 0.2917\n", "epoch: 7 step: 275, loss is 0.2740\n", "epoch: 7 step: 276, loss is 0.2684\n", "epoch: 7 step: 277, loss is 0.2436\n", "epoch: 7 step: 278, loss is 0.4741\n", "epoch: 7 step: 279, loss is 0.3996\n", "epoch: 7 step: 280, loss is 0.3023\n", "epoch: 7 step: 281, loss is 0.2293\n", "epoch: 7 step: 282, loss is 0.3209\n", "epoch: 7 step: 283, loss is 0.3115\n", "epoch: 7 step: 284, loss is 0.2205\n", "epoch: 7 step: 285, loss is 0.2650\n", "epoch: 7 step: 286, loss is 0.3380\n", "epoch: 7 step: 287, loss is 0.4386\n", "epoch: 7 step: 288, loss is 0.3113\n", "epoch: 7 step: 289, loss is 0.3227\n", "epoch: 7 step: 290, loss is 0.2071\n", "epoch: 7 step: 291, loss is 0.3814\n", "epoch: 7 step: 292, loss is 0.2602\n", "epoch: 7 step: 293, loss is 0.2281\n", "epoch: 7 step: 294, loss is 0.4244\n", "epoch: 7 step: 295, loss is 0.3539\n", "epoch: 7 step: 296, loss is 0.3055\n", "epoch: 7 step: 297, loss is 0.2855\n", "epoch: 7 step: 298, loss is 0.3432\n", "epoch: 7 step: 299, loss is 0.2286\n", "epoch: 7 step: 300, loss is 0.3493\n", "epoch: 7 step: 301, loss is 0.4564\n", "epoch: 7 step: 302, loss is 0.2489\n", "epoch: 7 step: 303, loss is 0.2173\n", "epoch: 7 step: 304, loss is 0.3805\n", "epoch: 7 step: 305, loss is 0.1876\n", "epoch: 7 step: 306, loss is 0.4118\n", "epoch: 7 step: 307, loss is 0.2634\n", "epoch: 7 step: 308, loss is 0.3567\n", "epoch: 7 step: 309, loss is 0.4348\n", "epoch: 7 step: 310, loss is 0.2597\n", "epoch: 7 step: 311, loss is 0.2622\n", "epoch: 7 step: 312, loss is 0.3840\n", "epoch: 7 step: 313, loss is 0.2901\n", "epoch: 7 step: 314, loss is 0.3276\n", "epoch: 7 step: 315, loss is 0.2987\n", "epoch: 7 step: 316, loss is 0.2979\n", "epoch: 7 step: 317, loss is 0.3587\n", "epoch: 7 step: 318, loss is 0.3245\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 7 step: 319, loss is 0.2874\n", "epoch: 7 step: 320, loss is 0.2773\n", "epoch: 7 step: 321, loss is 0.3119\n", "epoch: 7 step: 322, loss is 0.5180\n", "epoch: 7 step: 323, loss is 0.2819\n", "epoch: 7 step: 324, loss is 0.2582\n", "epoch: 7 step: 325, loss is 0.3137\n", "epoch: 7 step: 326, loss is 0.3719\n", "epoch: 7 step: 327, loss is 0.2965\n", "epoch: 7 step: 328, loss is 0.2923\n", "epoch: 7 step: 329, loss is 0.2939\n", "epoch: 7 step: 330, loss is 0.2711\n", "epoch: 7 step: 331, loss is 0.2564\n", "epoch: 7 step: 332, loss is 0.2319\n", "epoch: 7 step: 333, loss is 0.2975\n", "epoch: 7 step: 334, loss is 0.6099\n", "epoch: 7 step: 335, loss is 0.3109\n", "epoch: 7 step: 336, loss is 0.1355\n", "epoch: 7 step: 337, loss is 0.4506\n", "epoch: 7 step: 338, loss is 0.4515\n", "epoch: 7 step: 339, loss is 0.3207\n", "epoch: 7 step: 340, loss is 0.3045\n", "epoch: 7 step: 341, loss is 0.2666\n", "epoch: 7 step: 342, loss is 0.4119\n", "epoch: 7 step: 343, loss is 0.2923\n", "epoch: 7 step: 344, loss is 0.3069\n", "epoch: 7 step: 345, loss is 0.2237\n", "epoch: 7 step: 346, loss is 0.2427\n", "epoch: 7 step: 347, loss is 0.2578\n", "epoch: 7 step: 348, loss is 0.3885\n", "epoch: 7 step: 349, loss is 0.2785\n", "epoch: 7 step: 350, loss is 0.3561\n", "epoch: 7 step: 351, loss is 0.4515\n", "epoch: 7 step: 352, loss is 0.2931\n", "epoch: 7 step: 353, loss is 0.3824\n", "epoch: 7 step: 354, loss is 0.1658\n", "epoch: 7 step: 355, loss is 0.4529\n", "epoch: 7 step: 356, loss is 0.3766\n", "epoch: 7 step: 357, loss is 0.2821\n", "epoch: 7 step: 358, loss is 0.2354\n", "epoch: 7 step: 359, loss is 0.3754\n", "epoch: 7 step: 360, loss is 0.3338\n", "epoch: 7 step: 361, loss is 0.3404\n", "epoch: 7 step: 362, loss is 0.5074\n", "epoch: 7 step: 363, loss is 0.3289\n", "epoch: 7 step: 364, loss is 0.2627\n", "epoch: 7 step: 365, loss is 0.3471\n", "epoch: 7 step: 366, loss is 0.3044\n", "epoch: 7 step: 367, loss is 0.4036\n", "epoch: 7 step: 368, loss is 0.3972\n", "epoch: 7 step: 369, loss is 0.3652\n", "epoch: 7 step: 370, loss is 0.3068\n", "epoch: 7 step: 371, loss is 0.2776\n", "epoch: 7 step: 372, loss is 0.3689\n", "epoch: 7 step: 373, loss is 0.3331\n", "epoch: 7 step: 374, loss is 0.3642\n", "epoch: 7 step: 375, loss is 0.4690\n", "epoch: 7 step: 376, loss is 0.3052\n", "epoch: 7 step: 377, loss is 0.2689\n", "epoch: 7 step: 378, loss is 0.5337\n", "epoch: 7 step: 379, loss is 0.2856\n", "epoch: 7 step: 380, loss is 0.2056\n", "epoch: 7 step: 381, loss is 0.3496\n", "epoch: 7 step: 382, loss is 0.3747\n", "epoch: 7 step: 383, loss is 0.2499\n", "epoch: 7 step: 384, loss is 0.3007\n", "epoch: 7 step: 385, loss is 0.2983\n", "epoch: 7 step: 386, loss is 0.3484\n", "epoch: 7 step: 387, loss is 0.3087\n", "epoch: 7 step: 388, loss is 0.3337\n", "epoch: 7 step: 389, loss is 0.2782\n", "epoch: 7 step: 390, loss is 0.2050\n", "Epoch time: 42367.284, per step time: 108.634, avg loss: 0.312\n", "************************************************************\n", "epoch: 8 step: 1, loss is 0.2149\n", "epoch: 8 step: 2, loss is 0.1804\n", "epoch: 8 step: 3, loss is 0.3627\n", "epoch: 8 step: 4, loss is 0.3586\n", "epoch: 8 step: 5, loss is 0.2930\n", "epoch: 8 step: 6, loss is 0.2007\n", "epoch: 8 step: 7, loss is 0.2223\n", "epoch: 8 step: 8, loss is 0.2357\n", "epoch: 8 step: 9, loss is 0.3872\n", "epoch: 8 step: 10, loss is 0.1634\n", "epoch: 8 step: 11, loss is 0.2364\n", "epoch: 8 step: 12, loss is 0.4116\n", "epoch: 8 step: 13, loss is 0.2491\n", "epoch: 8 step: 14, loss is 0.3110\n", "epoch: 8 step: 15, loss is 0.2004\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 8 step: 16, loss is 0.2551\n", "epoch: 8 step: 17, loss is 0.3402\n", "epoch: 8 step: 18, loss is 0.2975\n", "epoch: 8 step: 19, loss is 0.2487\n", "epoch: 8 step: 20, loss is 0.2542\n", "epoch: 8 step: 21, loss is 0.2751\n", "epoch: 8 step: 22, loss is 0.3212\n", "epoch: 8 step: 23, loss is 0.2760\n", "epoch: 8 step: 24, loss is 0.1505\n", "epoch: 8 step: 25, loss is 0.2349\n", "epoch: 8 step: 26, loss is 0.1072\n", "epoch: 8 step: 27, loss is 0.3493\n", "epoch: 8 step: 28, loss is 0.1981\n", "epoch: 8 step: 29, loss is 0.2218\n", "epoch: 8 step: 30, loss is 0.2380\n", "epoch: 8 step: 31, loss is 0.2702\n", "epoch: 8 step: 32, loss is 0.2819\n", "epoch: 8 step: 33, loss is 0.3173\n", "epoch: 8 step: 34, loss is 0.2883\n", "epoch: 8 step: 35, loss is 0.3038\n", "epoch: 8 step: 36, loss is 0.3776\n", "epoch: 8 step: 37, loss is 0.3619\n", "epoch: 8 step: 38, loss is 0.3471\n", "epoch: 8 step: 39, loss is 0.2261\n", "epoch: 8 step: 40, loss is 0.2389\n", "epoch: 8 step: 41, loss is 0.2973\n", "epoch: 8 step: 42, loss is 0.3369\n", "epoch: 8 step: 43, loss is 0.5723\n", "epoch: 8 step: 44, loss is 0.3082\n", "epoch: 8 step: 45, loss is 0.3245\n", "epoch: 8 step: 46, loss is 0.3054\n", "epoch: 8 step: 47, loss is 0.2204\n", "epoch: 8 step: 48, loss is 0.4341\n", "epoch: 8 step: 49, loss is 0.2574\n", "epoch: 8 step: 50, loss is 0.3625\n", "epoch: 8 step: 51, loss is 0.3555\n", "epoch: 8 step: 52, loss is 0.2120\n", "epoch: 8 step: 53, loss is 0.2403\n", "epoch: 8 step: 54, loss is 0.2480\n", "epoch: 8 step: 55, loss is 0.4171\n", "epoch: 8 step: 56, loss is 0.3163\n", "epoch: 8 step: 57, loss is 0.3176\n", "epoch: 8 step: 58, loss is 0.2448\n", "epoch: 8 step: 59, loss is 0.3658\n", "epoch: 8 step: 60, loss is 0.3966\n", "epoch: 8 step: 61, loss is 0.3659\n", "epoch: 8 step: 62, loss is 0.2222\n", "epoch: 8 step: 63, loss is 0.3557\n", "epoch: 8 step: 64, loss is 0.2123\n", "epoch: 8 step: 65, loss is 0.2045\n", "epoch: 8 step: 66, loss is 0.2570\n", "epoch: 8 step: 67, loss is 0.2672\n", "epoch: 8 step: 68, loss is 0.1659\n", "epoch: 8 step: 69, loss is 0.2854\n", "epoch: 8 step: 70, loss is 0.2377\n", "epoch: 8 step: 71, loss is 0.2993\n", "epoch: 8 step: 72, loss is 0.2682\n", "epoch: 8 step: 73, loss is 0.1733\n", "epoch: 8 step: 74, loss is 0.2731\n", "epoch: 8 step: 75, loss is 0.2913\n", "epoch: 8 step: 76, loss is 0.1981\n", "epoch: 8 step: 77, loss is 0.2849\n", "epoch: 8 step: 78, loss is 0.3997\n", "epoch: 8 step: 79, loss is 0.2753\n", "epoch: 8 step: 80, loss is 0.3147\n", "epoch: 8 step: 81, loss is 0.3199\n", "epoch: 8 step: 82, loss is 0.2713\n", "epoch: 8 step: 83, loss is 0.2855\n", "epoch: 8 step: 84, loss is 0.2076\n", "epoch: 8 step: 85, loss is 0.3363\n", "epoch: 8 step: 86, loss is 0.3122\n", "epoch: 8 step: 87, loss is 0.2516\n", "epoch: 8 step: 88, loss is 0.2329\n", "epoch: 8 step: 89, loss is 0.2841\n", "epoch: 8 step: 90, loss is 0.2238\n", "epoch: 8 step: 91, loss is 0.2369\n", "epoch: 8 step: 92, loss is 0.2746\n", "epoch: 8 step: 93, loss is 0.3308\n", "epoch: 8 step: 94, loss is 0.3584\n", "epoch: 8 step: 95, loss is 0.3276\n", "epoch: 8 step: 96, loss is 0.3361\n", "epoch: 8 step: 97, loss is 0.2652\n", "epoch: 8 step: 98, loss is 0.2178\n", "epoch: 8 step: 99, loss is 0.2998\n", "epoch: 8 step: 100, loss is 0.2527\n", "epoch: 8 step: 101, loss is 0.3188\n", "epoch: 8 step: 102, loss is 0.2340\n", "epoch: 8 step: 103, loss is 0.1899\n", "epoch: 8 step: 104, loss is 0.3204\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 8 step: 105, loss is 0.3339\n", "epoch: 8 step: 106, loss is 0.3085\n", "epoch: 8 step: 107, loss is 0.3561\n", "epoch: 8 step: 108, loss is 0.3255\n", "epoch: 8 step: 109, loss is 0.3709\n", "epoch: 8 step: 110, loss is 0.2567\n", "epoch: 8 step: 111, loss is 0.2285\n", "epoch: 8 step: 112, loss is 0.1699\n", "epoch: 8 step: 113, loss is 0.2693\n", "epoch: 8 step: 114, loss is 0.4444\n", "epoch: 8 step: 115, loss is 0.2116\n", "epoch: 8 step: 116, loss is 0.3997\n", "epoch: 8 step: 117, loss is 0.2387\n", "epoch: 8 step: 118, loss is 0.2712\n", "epoch: 8 step: 119, loss is 0.2482\n", "epoch: 8 step: 120, loss is 0.2702\n", "epoch: 8 step: 121, loss is 0.4016\n", "epoch: 8 step: 122, loss is 0.3797\n", "epoch: 8 step: 123, loss is 0.1121\n", "epoch: 8 step: 124, loss is 0.2173\n", "epoch: 8 step: 125, loss is 0.2104\n", "epoch: 8 step: 126, loss is 0.2904\n", "epoch: 8 step: 127, loss is 0.2524\n", "epoch: 8 step: 128, loss is 0.2956\n", "epoch: 8 step: 129, loss is 0.3088\n", "epoch: 8 step: 130, loss is 0.2754\n", "epoch: 8 step: 131, loss is 0.2397\n", "epoch: 8 step: 132, loss is 0.3058\n", "epoch: 8 step: 133, loss is 0.1613\n", "epoch: 8 step: 134, loss is 0.2912\n", "epoch: 8 step: 135, loss is 0.2714\n", "epoch: 8 step: 136, loss is 0.2966\n", "epoch: 8 step: 137, loss is 0.4892\n", "epoch: 8 step: 138, loss is 0.4067\n", "epoch: 8 step: 139, loss is 0.3947\n", "epoch: 8 step: 140, loss is 0.2636\n", "epoch: 8 step: 141, loss is 0.2913\n", "epoch: 8 step: 142, loss is 0.3560\n", "epoch: 8 step: 143, loss is 0.1532\n", "epoch: 8 step: 144, loss is 0.1977\n", "epoch: 8 step: 145, loss is 0.2216\n", "epoch: 8 step: 146, loss is 0.3060\n", "epoch: 8 step: 147, loss is 0.2543\n", "epoch: 8 step: 148, loss is 0.2818\n", "epoch: 8 step: 149, loss is 0.3537\n", "epoch: 8 step: 150, loss is 0.2540\n", "epoch: 8 step: 151, loss is 0.2113\n", "epoch: 8 step: 152, loss is 0.3518\n", "epoch: 8 step: 153, loss is 0.2428\n", "epoch: 8 step: 154, loss is 0.2941\n", "epoch: 8 step: 155, loss is 0.3129\n", "epoch: 8 step: 156, loss is 0.3826\n", "epoch: 8 step: 157, loss is 0.2870\n", "epoch: 8 step: 158, loss is 0.3251\n", "epoch: 8 step: 159, loss is 0.4708\n", "epoch: 8 step: 160, loss is 0.3849\n", "epoch: 8 step: 161, loss is 0.3747\n", "epoch: 8 step: 162, loss is 0.2592\n", "epoch: 8 step: 163, loss is 0.3399\n", "epoch: 8 step: 164, loss is 0.3366\n", "epoch: 8 step: 165, loss is 0.2238\n", "epoch: 8 step: 166, loss is 0.2818\n", "epoch: 8 step: 167, loss is 0.3048\n", "epoch: 8 step: 168, loss is 0.2822\n", "epoch: 8 step: 169, loss is 0.2954\n", "epoch: 8 step: 170, loss is 0.2159\n", "epoch: 8 step: 171, loss is 0.2859\n", "epoch: 8 step: 172, loss is 0.3350\n", "epoch: 8 step: 173, loss is 0.2139\n", "epoch: 8 step: 174, loss is 0.3930\n", "epoch: 8 step: 175, loss is 0.2229\n", "epoch: 8 step: 176, loss is 0.3234\n", "epoch: 8 step: 177, loss is 0.2304\n", "epoch: 8 step: 178, loss is 0.3864\n", "epoch: 8 step: 179, loss is 0.3090\n", "epoch: 8 step: 180, loss is 0.2704\n", "epoch: 8 step: 181, loss is 0.3385\n", "epoch: 8 step: 182, loss is 0.2771\n", "epoch: 8 step: 183, loss is 0.3193\n", "epoch: 8 step: 184, loss is 0.1769\n", "epoch: 8 step: 185, loss is 0.2449\n", "epoch: 8 step: 186, loss is 0.2875\n", "epoch: 8 step: 187, loss is 0.2144\n", "epoch: 8 step: 188, loss is 0.4234\n", "epoch: 8 step: 189, loss is 0.2382\n", "epoch: 8 step: 190, loss is 0.2586\n", "epoch: 8 step: 191, loss is 0.3665\n", "epoch: 8 step: 192, loss is 0.2088\n", "epoch: 8 step: 193, loss is 0.3332\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 8 step: 194, loss is 0.2501\n", "epoch: 8 step: 195, loss is 0.1891\n", "epoch: 8 step: 196, loss is 0.2274\n", "epoch: 8 step: 197, loss is 0.3215\n", "epoch: 8 step: 198, loss is 0.2382\n", "epoch: 8 step: 199, loss is 0.3136\n", "epoch: 8 step: 200, loss is 0.3687\n", "epoch: 8 step: 201, loss is 0.1899\n", "epoch: 8 step: 202, loss is 0.2513\n", "epoch: 8 step: 203, loss is 0.2842\n", "epoch: 8 step: 204, loss is 0.2917\n", "epoch: 8 step: 205, loss is 0.2588\n", "epoch: 8 step: 206, loss is 0.3324\n", "epoch: 8 step: 207, loss is 0.3042\n", "epoch: 8 step: 208, loss is 0.2606\n", "epoch: 8 step: 209, loss is 0.3536\n", "epoch: 8 step: 210, loss is 0.4595\n", "epoch: 8 step: 211, loss is 0.2538\n", "epoch: 8 step: 212, loss is 0.3812\n", "epoch: 8 step: 213, loss is 0.1679\n", "epoch: 8 step: 214, loss is 0.1868\n", "epoch: 8 step: 215, loss is 0.4198\n", "epoch: 8 step: 216, loss is 0.3415\n", "epoch: 8 step: 217, loss is 0.2309\n", "epoch: 8 step: 218, loss is 0.3316\n", "epoch: 8 step: 219, loss is 0.3680\n", "epoch: 8 step: 220, loss is 0.2453\n", "epoch: 8 step: 221, loss is 0.4186\n", "epoch: 8 step: 222, loss is 0.2608\n", "epoch: 8 step: 223, loss is 0.3379\n", "epoch: 8 step: 224, loss is 0.2239\n", "epoch: 8 step: 225, loss is 0.3269\n", "epoch: 8 step: 226, loss is 0.1936\n", "epoch: 8 step: 227, loss is 0.2899\n", "epoch: 8 step: 228, loss is 0.2795\n", "epoch: 8 step: 229, loss is 0.2784\n", "epoch: 8 step: 230, loss is 0.3530\n", "epoch: 8 step: 231, loss is 0.2883\n", "epoch: 8 step: 232, loss is 0.3957\n", "epoch: 8 step: 233, loss is 0.1569\n", "epoch: 8 step: 234, loss is 0.3854\n", "epoch: 8 step: 235, loss is 0.2987\n", "epoch: 8 step: 236, loss is 0.4343\n", "epoch: 8 step: 237, loss is 0.2411\n", "epoch: 8 step: 238, loss is 0.2459\n", "epoch: 8 step: 239, loss is 0.3338\n", "epoch: 8 step: 240, loss is 0.3082\n", "epoch: 8 step: 241, loss is 0.2265\n", "epoch: 8 step: 242, loss is 0.2507\n", "epoch: 8 step: 243, loss is 0.3032\n", "epoch: 8 step: 244, loss is 0.3334\n", "epoch: 8 step: 245, loss is 0.4204\n", "epoch: 8 step: 246, loss is 0.2962\n", "epoch: 8 step: 247, loss is 0.3268\n", "epoch: 8 step: 248, loss is 0.3063\n", "epoch: 8 step: 249, loss is 0.2344\n", "epoch: 8 step: 250, loss is 0.3675\n", "epoch: 8 step: 251, loss is 0.2744\n", "epoch: 8 step: 252, loss is 0.4469\n", "epoch: 8 step: 253, loss is 0.3931\n", "epoch: 8 step: 254, loss is 0.2097\n", "epoch: 8 step: 255, loss is 0.2915\n", "epoch: 8 step: 256, loss is 0.2605\n", "epoch: 8 step: 257, loss is 0.1835\n", "epoch: 8 step: 258, loss is 0.3082\n", "epoch: 8 step: 259, loss is 0.1538\n", "epoch: 8 step: 260, loss is 0.2970\n", "epoch: 8 step: 261, loss is 0.2292\n", "epoch: 8 step: 262, loss is 0.2763\n", "epoch: 8 step: 263, loss is 0.4960\n", "epoch: 8 step: 264, loss is 0.3799\n", "epoch: 8 step: 265, loss is 0.3887\n", "epoch: 8 step: 266, loss is 0.2376\n", "epoch: 8 step: 267, loss is 0.2944\n", "epoch: 8 step: 268, loss is 0.2557\n", "epoch: 8 step: 269, loss is 0.3924\n", "epoch: 8 step: 270, loss is 0.2742\n", "epoch: 8 step: 271, loss is 0.3677\n", "epoch: 8 step: 272, loss is 0.3184\n", "epoch: 8 step: 273, loss is 0.2249\n", "epoch: 8 step: 274, loss is 0.3460\n", "epoch: 8 step: 275, loss is 0.2943\n", "epoch: 8 step: 276, loss is 0.3249\n", "epoch: 8 step: 277, loss is 0.3228\n", "epoch: 8 step: 278, loss is 0.1978\n", "epoch: 8 step: 279, loss is 0.2511\n", "epoch: 8 step: 280, loss is 0.2804\n", "epoch: 8 step: 281, loss is 0.2771\n", "epoch: 8 step: 282, loss is 0.2485\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 8 step: 283, loss is 0.3052\n", "epoch: 8 step: 284, loss is 0.3046\n", "epoch: 8 step: 285, loss is 0.3282\n", "epoch: 8 step: 286, loss is 0.2687\n", "epoch: 8 step: 287, loss is 0.2085\n", "epoch: 8 step: 288, loss is 0.2500\n", "epoch: 8 step: 289, loss is 0.2477\n", "epoch: 8 step: 290, loss is 0.1799\n", "epoch: 8 step: 291, loss is 0.3890\n", "epoch: 8 step: 292, loss is 0.2363\n", "epoch: 8 step: 293, loss is 0.3996\n", "epoch: 8 step: 294, loss is 0.3036\n", "epoch: 8 step: 295, loss is 0.3625\n", "epoch: 8 step: 296, loss is 0.3306\n", "epoch: 8 step: 297, loss is 0.2989\n", "epoch: 8 step: 298, loss is 0.3709\n", "epoch: 8 step: 299, loss is 0.4077\n", "epoch: 8 step: 300, loss is 0.3659\n", "epoch: 8 step: 301, loss is 0.3173\n", "epoch: 8 step: 302, loss is 0.2164\n", "epoch: 8 step: 303, loss is 0.2811\n", "epoch: 8 step: 304, loss is 0.2248\n", "epoch: 8 step: 305, loss is 0.3226\n", "epoch: 8 step: 306, loss is 0.4554\n", "epoch: 8 step: 307, loss is 0.2045\n", "epoch: 8 step: 308, loss is 0.2654\n", "epoch: 8 step: 309, loss is 0.3877\n", "epoch: 8 step: 310, loss is 0.3128\n", "epoch: 8 step: 311, loss is 0.3225\n", "epoch: 8 step: 312, loss is 0.2464\n", "epoch: 8 step: 313, loss is 0.2058\n", "epoch: 8 step: 314, loss is 0.2562\n", "epoch: 8 step: 315, loss is 0.2906\n", "epoch: 8 step: 316, loss is 0.2278\n", "epoch: 8 step: 317, loss is 0.5644\n", "epoch: 8 step: 318, loss is 0.2196\n", "epoch: 8 step: 319, loss is 0.2686\n", "epoch: 8 step: 320, loss is 0.4012\n", "epoch: 8 step: 321, loss is 0.3391\n", "epoch: 8 step: 322, loss is 0.2743\n", "epoch: 8 step: 323, loss is 0.4422\n", "epoch: 8 step: 324, loss is 0.3312\n", "epoch: 8 step: 325, loss is 0.4168\n", "epoch: 8 step: 326, loss is 0.2627\n", "epoch: 8 step: 327, loss is 0.3838\n", "epoch: 8 step: 328, loss is 0.3179\n", "epoch: 8 step: 329, loss is 0.3666\n", "epoch: 8 step: 330, loss is 0.3488\n", "epoch: 8 step: 331, loss is 0.2525\n", "epoch: 8 step: 332, loss is 0.2915\n", "epoch: 8 step: 333, loss is 0.2774\n", "epoch: 8 step: 334, loss is 0.2881\n", "epoch: 8 step: 335, loss is 0.3295\n", "epoch: 8 step: 336, loss is 0.2187\n", "epoch: 8 step: 337, loss is 0.2379\n", "epoch: 8 step: 338, loss is 0.3931\n", "epoch: 8 step: 339, loss is 0.2094\n", "epoch: 8 step: 340, loss is 0.2684\n", "epoch: 8 step: 341, loss is 0.3613\n", "epoch: 8 step: 342, loss is 0.2116\n", "epoch: 8 step: 343, loss is 0.4666\n", "epoch: 8 step: 344, loss is 0.2186\n", "epoch: 8 step: 345, loss is 0.3330\n", "epoch: 8 step: 346, loss is 0.2798\n", "epoch: 8 step: 347, loss is 0.1680\n", "epoch: 8 step: 348, loss is 0.2947\n", "epoch: 8 step: 349, loss is 0.1921\n", "epoch: 8 step: 350, loss is 0.2572\n", "epoch: 8 step: 351, loss is 0.3251\n", "epoch: 8 step: 352, loss is 0.1561\n", "epoch: 8 step: 353, loss is 0.3842\n", "epoch: 8 step: 354, loss is 0.3143\n", "epoch: 8 step: 355, loss is 0.3157\n", "epoch: 8 step: 356, loss is 0.2084\n", "epoch: 8 step: 357, loss is 0.3469\n", "epoch: 8 step: 358, loss is 0.2570\n", "epoch: 8 step: 359, loss is 0.1771\n", "epoch: 8 step: 360, loss is 0.4097\n", "epoch: 8 step: 361, loss is 0.2052\n", "epoch: 8 step: 362, loss is 0.2419\n", "epoch: 8 step: 363, loss is 0.2891\n", "epoch: 8 step: 364, loss is 0.3674\n", "epoch: 8 step: 365, loss is 0.3137\n", "epoch: 8 step: 366, loss is 0.3452\n", "epoch: 8 step: 367, loss is 0.3247\n", "epoch: 8 step: 368, loss is 0.2509\n", "epoch: 8 step: 369, loss is 0.3878\n", "epoch: 8 step: 370, loss is 0.3596\n", "epoch: 8 step: 371, loss is 0.3270\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 8 step: 372, loss is 0.2237\n", "epoch: 8 step: 373, loss is 0.1964\n", "epoch: 8 step: 374, loss is 0.3240\n", "epoch: 8 step: 375, loss is 0.4185\n", "epoch: 8 step: 376, loss is 0.2762\n", "epoch: 8 step: 377, loss is 0.2433\n", "epoch: 8 step: 378, loss is 0.3024\n", "epoch: 8 step: 379, loss is 0.3009\n", "epoch: 8 step: 380, loss is 0.3313\n", "epoch: 8 step: 381, loss is 0.2318\n", "epoch: 8 step: 382, loss is 0.2963\n", "epoch: 8 step: 383, loss is 0.3568\n", "epoch: 8 step: 384, loss is 0.2718\n", "epoch: 8 step: 385, loss is 0.3772\n", "epoch: 8 step: 386, loss is 0.4922\n", "epoch: 8 step: 387, loss is 0.4117\n", "epoch: 8 step: 388, loss is 0.3131\n", "epoch: 8 step: 389, loss is 0.3322\n", "epoch: 8 step: 390, loss is 0.2457\n", "Epoch time: 41559.509, per step time: 106.563, avg loss: 0.294\n", "************************************************************\n", "epoch: 9 step: 1, loss is 0.2256\n", "epoch: 9 step: 2, loss is 0.3673\n", "epoch: 9 step: 3, loss is 0.3487\n", "epoch: 9 step: 4, loss is 0.2746\n", "epoch: 9 step: 5, loss is 0.2949\n", "epoch: 9 step: 6, loss is 0.2162\n", "epoch: 9 step: 7, loss is 0.2553\n", "epoch: 9 step: 8, loss is 0.2775\n", "epoch: 9 step: 9, loss is 0.2729\n", "epoch: 9 step: 10, loss is 0.3049\n", "epoch: 9 step: 11, loss is 0.2232\n", "epoch: 9 step: 12, loss is 0.4350\n", "epoch: 9 step: 13, loss is 0.2641\n", "epoch: 9 step: 14, loss is 0.2723\n", "epoch: 9 step: 15, loss is 0.3581\n", "epoch: 9 step: 16, loss is 0.3240\n", "epoch: 9 step: 17, loss is 0.2842\n", "epoch: 9 step: 18, loss is 0.2179\n", "epoch: 9 step: 19, loss is 0.2201\n", "epoch: 9 step: 20, loss is 0.2116\n", "epoch: 9 step: 21, loss is 0.2918\n", "epoch: 9 step: 22, loss is 0.3158\n", "epoch: 9 step: 23, loss is 0.2919\n", "epoch: 9 step: 24, loss is 0.3004\n", "epoch: 9 step: 25, loss is 0.1961\n", "epoch: 9 step: 26, loss is 0.1507\n", "epoch: 9 step: 27, loss is 0.2368\n", "epoch: 9 step: 28, loss is 0.2472\n", "epoch: 9 step: 29, loss is 0.3680\n", "epoch: 9 step: 30, loss is 0.2974\n", "epoch: 9 step: 31, loss is 0.4239\n", "epoch: 9 step: 32, loss is 0.2210\n", "epoch: 9 step: 33, loss is 0.2801\n", "epoch: 9 step: 34, loss is 0.3228\n", "epoch: 9 step: 35, loss is 0.2770\n", "epoch: 9 step: 36, loss is 0.2428\n", "epoch: 9 step: 37, loss is 0.3188\n", "epoch: 9 step: 38, loss is 0.3796\n", "epoch: 9 step: 39, loss is 0.3048\n", "epoch: 9 step: 40, loss is 0.3629\n", "epoch: 9 step: 41, loss is 0.2277\n", "epoch: 9 step: 42, loss is 0.3251\n", "epoch: 9 step: 43, loss is 0.2962\n", "epoch: 9 step: 44, loss is 0.3035\n", "epoch: 9 step: 45, loss is 0.2271\n", "epoch: 9 step: 46, loss is 0.3214\n", "epoch: 9 step: 47, loss is 0.3241\n", "epoch: 9 step: 48, loss is 0.2813\n", "epoch: 9 step: 49, loss is 0.2779\n", "epoch: 9 step: 50, loss is 0.3609\n", "epoch: 9 step: 51, loss is 0.2184\n", "epoch: 9 step: 52, loss is 0.2971\n", "epoch: 9 step: 53, loss is 0.2773\n", "epoch: 9 step: 54, loss is 0.2829\n", "epoch: 9 step: 55, loss is 0.2038\n", "epoch: 9 step: 56, loss is 0.1633\n", "epoch: 9 step: 57, loss is 0.3691\n", "epoch: 9 step: 58, loss is 0.2271\n", "epoch: 9 step: 59, loss is 0.2663\n", "epoch: 9 step: 60, loss is 0.4288\n", "epoch: 9 step: 61, loss is 0.2189\n", "epoch: 9 step: 62, loss is 0.4068\n", "epoch: 9 step: 63, loss is 0.2435\n", "epoch: 9 step: 64, loss is 0.3208\n", "epoch: 9 step: 65, loss is 0.1461\n", "epoch: 9 step: 66, loss is 0.2150\n", "epoch: 9 step: 67, loss is 0.3100\n", "epoch: 9 step: 68, loss is 0.2170\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 9 step: 69, loss is 0.4718\n", "epoch: 9 step: 70, loss is 0.4030\n", "epoch: 9 step: 71, loss is 0.3980\n", "epoch: 9 step: 72, loss is 0.2488\n", "epoch: 9 step: 73, loss is 0.1879\n", "epoch: 9 step: 74, loss is 0.3052\n", "epoch: 9 step: 75, loss is 0.1858\n", "epoch: 9 step: 76, loss is 0.1737\n", "epoch: 9 step: 77, loss is 0.3333\n", "epoch: 9 step: 78, loss is 0.1959\n", "epoch: 9 step: 79, loss is 0.2411\n", "epoch: 9 step: 80, loss is 0.2749\n", "epoch: 9 step: 81, loss is 0.1702\n", "epoch: 9 step: 82, loss is 0.1831\n", "epoch: 9 step: 83, loss is 0.3682\n", "epoch: 9 step: 84, loss is 0.1844\n", "epoch: 9 step: 85, loss is 0.2799\n", "epoch: 9 step: 86, loss is 0.2805\n", "epoch: 9 step: 87, loss is 0.3685\n", "epoch: 9 step: 88, loss is 0.2802\n", "epoch: 9 step: 89, loss is 0.1326\n", "epoch: 9 step: 90, loss is 0.1912\n", "epoch: 9 step: 91, loss is 0.3006\n", "epoch: 9 step: 92, loss is 0.1286\n", "epoch: 9 step: 93, loss is 0.2179\n", "epoch: 9 step: 94, loss is 0.1999\n", "epoch: 9 step: 95, loss is 0.2278\n", "epoch: 9 step: 96, loss is 0.1420\n", "epoch: 9 step: 97, loss is 0.1676\n", "epoch: 9 step: 98, loss is 0.2984\n", "epoch: 9 step: 99, loss is 0.2156\n", "epoch: 9 step: 100, loss is 0.2189\n", "epoch: 9 step: 101, loss is 0.2909\n", "epoch: 9 step: 102, loss is 0.3303\n", "epoch: 9 step: 103, loss is 0.4217\n", "epoch: 9 step: 104, loss is 0.2753\n", "epoch: 9 step: 105, loss is 0.2595\n", "epoch: 9 step: 106, loss is 0.2275\n", "epoch: 9 step: 107, loss is 0.3049\n", "epoch: 9 step: 108, loss is 0.3463\n", "epoch: 9 step: 109, loss is 0.2354\n", "epoch: 9 step: 110, loss is 0.2470\n", "epoch: 9 step: 111, loss is 0.2685\n", "epoch: 9 step: 112, loss is 0.2859\n", "epoch: 9 step: 113, loss is 0.2302\n", "epoch: 9 step: 114, loss is 0.2259\n", "epoch: 9 step: 115, loss is 0.2267\n", "epoch: 9 step: 116, loss is 0.2309\n", "epoch: 9 step: 117, loss is 0.3122\n", "epoch: 9 step: 118, loss is 0.2515\n", "epoch: 9 step: 119, loss is 0.2786\n", "epoch: 9 step: 120, loss is 0.2677\n", "epoch: 9 step: 121, loss is 0.3950\n", "epoch: 9 step: 122, loss is 0.2902\n", "epoch: 9 step: 123, loss is 0.2933\n", "epoch: 9 step: 124, loss is 0.3831\n", "epoch: 9 step: 125, loss is 0.2204\n", "epoch: 9 step: 126, loss is 0.3225\n", "epoch: 9 step: 127, loss is 0.3021\n", "epoch: 9 step: 128, loss is 0.3702\n", "epoch: 9 step: 129, loss is 0.3515\n", "epoch: 9 step: 130, loss is 0.2547\n", "epoch: 9 step: 131, loss is 0.2681\n", "epoch: 9 step: 132, loss is 0.3002\n", "epoch: 9 step: 133, loss is 0.3737\n", "epoch: 9 step: 134, loss is 0.2523\n", "epoch: 9 step: 135, loss is 0.3247\n", "epoch: 9 step: 136, loss is 0.3409\n", "epoch: 9 step: 137, loss is 0.3709\n", "epoch: 9 step: 138, loss is 0.1743\n", "epoch: 9 step: 139, loss is 0.3687\n", "epoch: 9 step: 140, loss is 0.3255\n", "epoch: 9 step: 141, loss is 0.2741\n", "epoch: 9 step: 142, loss is 0.1603\n", "epoch: 9 step: 143, loss is 0.3056\n", "epoch: 9 step: 144, loss is 0.3297\n", "epoch: 9 step: 145, loss is 0.2882\n", "epoch: 9 step: 146, loss is 0.3367\n", "epoch: 9 step: 147, loss is 0.1517\n", "epoch: 9 step: 148, loss is 0.2856\n", "epoch: 9 step: 149, loss is 0.3148\n", "epoch: 9 step: 150, loss is 0.2960\n", "epoch: 9 step: 151, loss is 0.2638\n", "epoch: 9 step: 152, loss is 0.1726\n", "epoch: 9 step: 153, loss is 0.3240\n", "epoch: 9 step: 154, loss is 0.2530\n", "epoch: 9 step: 155, loss is 0.2303\n", "epoch: 9 step: 156, loss is 0.2816\n", "epoch: 9 step: 157, loss is 0.3392\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 9 step: 158, loss is 0.2664\n", "epoch: 9 step: 159, loss is 0.4234\n", "epoch: 9 step: 160, loss is 0.2787\n", "epoch: 9 step: 161, loss is 0.3272\n", "epoch: 9 step: 162, loss is 0.3409\n", "epoch: 9 step: 163, loss is 0.3722\n", "epoch: 9 step: 164, loss is 0.2464\n", "epoch: 9 step: 165, loss is 0.1451\n", "epoch: 9 step: 166, loss is 0.3036\n", "epoch: 9 step: 167, loss is 0.2150\n", "epoch: 9 step: 168, loss is 0.2903\n", "epoch: 9 step: 169, loss is 0.4836\n", "epoch: 9 step: 170, loss is 0.2690\n", "epoch: 9 step: 171, loss is 0.3030\n", "epoch: 9 step: 172, loss is 0.2788\n", "epoch: 9 step: 173, loss is 0.3095\n", "epoch: 9 step: 174, loss is 0.3485\n", "epoch: 9 step: 175, loss is 0.3854\n", "epoch: 9 step: 176, loss is 0.2738\n", "epoch: 9 step: 177, loss is 0.2012\n", "epoch: 9 step: 178, loss is 0.1913\n", "epoch: 9 step: 179, loss is 0.1811\n", "epoch: 9 step: 180, loss is 0.2216\n", "epoch: 9 step: 181, loss is 0.3418\n", "epoch: 9 step: 182, loss is 0.4854\n", "epoch: 9 step: 183, loss is 0.3358\n", "epoch: 9 step: 184, loss is 0.1935\n", "epoch: 9 step: 185, loss is 0.3501\n", "epoch: 9 step: 186, loss is 0.2153\n", "epoch: 9 step: 187, loss is 0.2664\n", "epoch: 9 step: 188, loss is 0.1765\n", "epoch: 9 step: 189, loss is 0.1346\n", "epoch: 9 step: 190, loss is 0.1991\n", "epoch: 9 step: 191, loss is 0.2464\n", "epoch: 9 step: 192, loss is 0.2229\n", "epoch: 9 step: 193, loss is 0.3363\n", "epoch: 9 step: 194, loss is 0.2198\n", "epoch: 9 step: 195, loss is 0.1779\n", "epoch: 9 step: 196, loss is 0.1399\n", "epoch: 9 step: 197, loss is 0.3189\n", "epoch: 9 step: 198, loss is 0.2123\n", "epoch: 9 step: 199, loss is 0.3724\n", "epoch: 9 step: 200, loss is 0.2345\n", "epoch: 9 step: 201, loss is 0.2212\n", "epoch: 9 step: 202, loss is 0.3194\n", "epoch: 9 step: 203, loss is 0.1540\n", "epoch: 9 step: 204, loss is 0.3313\n", "epoch: 9 step: 205, loss is 0.2585\n", "epoch: 9 step: 206, loss is 0.1736\n", "epoch: 9 step: 207, loss is 0.3516\n", "epoch: 9 step: 208, loss is 0.4077\n", "epoch: 9 step: 209, loss is 0.2779\n", "epoch: 9 step: 210, loss is 0.2984\n", "epoch: 9 step: 211, loss is 0.3921\n", "epoch: 9 step: 212, loss is 0.2446\n", "epoch: 9 step: 213, loss is 0.2475\n", "epoch: 9 step: 214, loss is 0.2972\n", "epoch: 9 step: 215, loss is 0.2834\n", "epoch: 9 step: 216, loss is 0.2070\n", "epoch: 9 step: 217, loss is 0.3333\n", "epoch: 9 step: 218, loss is 0.2225\n", "epoch: 9 step: 219, loss is 0.3896\n", "epoch: 9 step: 220, loss is 0.2675\n", "epoch: 9 step: 221, loss is 0.2908\n", "epoch: 9 step: 222, loss is 0.4031\n", "epoch: 9 step: 223, loss is 0.1974\n", "epoch: 9 step: 224, loss is 0.3648\n", "epoch: 9 step: 225, loss is 0.3166\n", "epoch: 9 step: 226, loss is 0.2183\n", "epoch: 9 step: 227, loss is 0.3256\n", "epoch: 9 step: 228, loss is 0.2786\n", "epoch: 9 step: 229, loss is 0.3497\n", "epoch: 9 step: 230, loss is 0.3478\n", "epoch: 9 step: 231, loss is 0.3882\n", "epoch: 9 step: 232, loss is 0.2460\n", "epoch: 9 step: 233, loss is 0.1955\n", "epoch: 9 step: 234, loss is 0.2888\n", "epoch: 9 step: 235, loss is 0.2994\n", "epoch: 9 step: 236, loss is 0.3871\n", "epoch: 9 step: 237, loss is 0.3991\n", "epoch: 9 step: 238, loss is 0.3099\n", "epoch: 9 step: 239, loss is 0.3141\n", "epoch: 9 step: 240, loss is 0.3390\n", "epoch: 9 step: 241, loss is 0.2310\n", "epoch: 9 step: 242, loss is 0.2700\n", "epoch: 9 step: 243, loss is 0.2811\n", "epoch: 9 step: 244, loss is 0.2345\n", "epoch: 9 step: 245, loss is 0.2672\n", "epoch: 9 step: 246, loss is 0.1876\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 9 step: 247, loss is 0.3666\n", "epoch: 9 step: 248, loss is 0.2445\n", "epoch: 9 step: 249, loss is 0.2603\n", "epoch: 9 step: 250, loss is 0.2571\n", "epoch: 9 step: 251, loss is 0.4252\n", "epoch: 9 step: 252, loss is 0.3173\n", "epoch: 9 step: 253, loss is 0.2151\n", "epoch: 9 step: 254, loss is 0.3287\n", "epoch: 9 step: 255, loss is 0.2224\n", "epoch: 9 step: 256, loss is 0.2287\n", "epoch: 9 step: 257, loss is 0.2828\n", "epoch: 9 step: 258, loss is 0.4278\n", "epoch: 9 step: 259, loss is 0.2781\n", "epoch: 9 step: 260, loss is 0.2918\n", "epoch: 9 step: 261, loss is 0.2349\n", "epoch: 9 step: 262, loss is 0.3005\n", "epoch: 9 step: 263, loss is 0.2941\n", "epoch: 9 step: 264, loss is 0.2351\n", "epoch: 9 step: 265, loss is 0.3136\n", "epoch: 9 step: 266, loss is 0.3938\n", "epoch: 9 step: 267, loss is 0.1917\n", "epoch: 9 step: 268, loss is 0.2223\n", "epoch: 9 step: 269, loss is 0.1965\n", "epoch: 9 step: 270, loss is 0.2173\n", "epoch: 9 step: 271, loss is 0.3242\n", "epoch: 9 step: 272, loss is 0.2942\n", "epoch: 9 step: 273, loss is 0.3043\n", "epoch: 9 step: 274, loss is 0.5046\n", "epoch: 9 step: 275, loss is 0.2275\n", "epoch: 9 step: 276, loss is 0.2391\n", "epoch: 9 step: 277, loss is 0.2364\n", "epoch: 9 step: 278, loss is 0.2180\n", "epoch: 9 step: 279, loss is 0.2443\n", "epoch: 9 step: 280, loss is 0.3269\n", "epoch: 9 step: 281, loss is 0.2290\n", "epoch: 9 step: 282, loss is 0.2864\n", "epoch: 9 step: 283, loss is 0.5133\n", "epoch: 9 step: 284, loss is 0.3965\n", "epoch: 9 step: 285, loss is 0.2694\n", "epoch: 9 step: 286, loss is 0.2299\n", "epoch: 9 step: 287, loss is 0.2477\n", "epoch: 9 step: 288, loss is 0.2881\n", "epoch: 9 step: 289, loss is 0.2389\n", "epoch: 9 step: 290, loss is 0.1957\n", "epoch: 9 step: 291, loss is 0.4758\n", "epoch: 9 step: 292, loss is 0.2147\n", "epoch: 9 step: 293, loss is 0.1834\n", "epoch: 9 step: 294, loss is 0.3235\n", "epoch: 9 step: 295, loss is 0.2626\n", "epoch: 9 step: 296, loss is 0.2007\n", "epoch: 9 step: 297, loss is 0.3185\n", "epoch: 9 step: 298, loss is 0.2742\n", "epoch: 9 step: 299, loss is 0.3474\n", "epoch: 9 step: 300, loss is 0.4156\n", "epoch: 9 step: 301, loss is 0.3393\n", "epoch: 9 step: 302, loss is 0.2162\n", "epoch: 9 step: 303, loss is 0.3120\n", "epoch: 9 step: 304, loss is 0.3075\n", "epoch: 9 step: 305, loss is 0.2437\n", "epoch: 9 step: 306, loss is 0.1778\n", "epoch: 9 step: 307, loss is 0.3741\n", "epoch: 9 step: 308, loss is 0.2621\n", "epoch: 9 step: 309, loss is 0.2012\n", "epoch: 9 step: 310, loss is 0.2965\n", "epoch: 9 step: 311, loss is 0.2786\n", "epoch: 9 step: 312, loss is 0.3387\n", "epoch: 9 step: 313, loss is 0.1744\n", "epoch: 9 step: 314, loss is 0.1716\n", "epoch: 9 step: 315, loss is 0.2732\n", "epoch: 9 step: 316, loss is 0.2169\n", "epoch: 9 step: 317, loss is 0.2133\n", "epoch: 9 step: 318, loss is 0.2757\n", "epoch: 9 step: 319, loss is 0.2565\n", "epoch: 9 step: 320, loss is 0.3456\n", "epoch: 9 step: 321, loss is 0.1643\n", "epoch: 9 step: 322, loss is 0.2130\n", "epoch: 9 step: 323, loss is 0.2580\n", "epoch: 9 step: 324, loss is 0.4480\n", "epoch: 9 step: 325, loss is 0.1572\n", "epoch: 9 step: 326, loss is 0.2302\n", "epoch: 9 step: 327, loss is 0.3327\n", "epoch: 9 step: 328, loss is 0.2224\n", "epoch: 9 step: 329, loss is 0.1517\n", "epoch: 9 step: 330, loss is 0.3094\n", "epoch: 9 step: 331, loss is 0.3399\n", "epoch: 9 step: 332, loss is 0.3457\n", "epoch: 9 step: 333, loss is 0.4346\n", "epoch: 9 step: 334, loss is 0.3131\n", "epoch: 9 step: 335, loss is 0.2407\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 9 step: 336, loss is 0.2749\n", "epoch: 9 step: 337, loss is 0.1938\n", "epoch: 9 step: 338, loss is 0.2136\n", "epoch: 9 step: 339, loss is 0.1703\n", "epoch: 9 step: 340, loss is 0.1344\n", "epoch: 9 step: 341, loss is 0.2446\n", "epoch: 9 step: 342, loss is 0.2180\n", "epoch: 9 step: 343, loss is 0.3273\n", "epoch: 9 step: 344, loss is 0.3550\n", "epoch: 9 step: 345, loss is 0.2465\n", "epoch: 9 step: 346, loss is 0.2084\n", "epoch: 9 step: 347, loss is 0.3962\n", "epoch: 9 step: 348, loss is 0.2505\n", "epoch: 9 step: 349, loss is 0.2329\n", "epoch: 9 step: 350, loss is 0.3404\n", "epoch: 9 step: 351, loss is 0.3228\n", "epoch: 9 step: 352, loss is 0.2663\n", "epoch: 9 step: 353, loss is 0.2314\n", "epoch: 9 step: 354, loss is 0.4019\n", "epoch: 9 step: 355, loss is 0.2190\n", "epoch: 9 step: 356, loss is 0.2142\n", "epoch: 9 step: 357, loss is 0.2802\n", "epoch: 9 step: 358, loss is 0.2102\n", "epoch: 9 step: 359, loss is 0.1795\n", "epoch: 9 step: 360, loss is 0.2005\n", "epoch: 9 step: 361, loss is 0.2372\n", "epoch: 9 step: 362, loss is 0.1931\n", "epoch: 9 step: 363, loss is 0.3196\n", "epoch: 9 step: 364, loss is 0.2563\n", "epoch: 9 step: 365, loss is 0.2488\n", "epoch: 9 step: 366, loss is 0.2499\n", "epoch: 9 step: 367, loss is 0.1904\n", "epoch: 9 step: 368, loss is 0.2042\n", "epoch: 9 step: 369, loss is 0.3357\n", "epoch: 9 step: 370, loss is 0.3050\n", "epoch: 9 step: 371, loss is 0.3618\n", "epoch: 9 step: 372, loss is 0.2830\n", "epoch: 9 step: 373, loss is 0.3102\n", "epoch: 9 step: 374, loss is 0.1494\n", "epoch: 9 step: 375, loss is 0.3108\n", "epoch: 9 step: 376, loss is 0.2621\n", "epoch: 9 step: 377, loss is 0.3015\n", "epoch: 9 step: 378, loss is 0.3440\n", "epoch: 9 step: 379, loss is 0.2310\n", "epoch: 9 step: 380, loss is 0.4890\n", "epoch: 9 step: 381, loss is 0.3627\n", "epoch: 9 step: 382, loss is 0.2582\n", "epoch: 9 step: 383, loss is 0.3308\n", "epoch: 9 step: 384, loss is 0.2705\n", "epoch: 9 step: 385, loss is 0.2209\n", "epoch: 9 step: 386, loss is 0.3860\n", "epoch: 9 step: 387, loss is 0.3459\n", "epoch: 9 step: 388, loss is 0.1994\n", "epoch: 9 step: 389, loss is 0.2605\n", "epoch: 9 step: 390, loss is 0.3933\n", "Epoch time: 41044.824, per step time: 105.243, avg loss: 0.279\n", "************************************************************\n", "epoch: 10 step: 1, loss is 0.2735\n", "epoch: 10 step: 2, loss is 0.2958\n", "epoch: 10 step: 3, loss is 0.3449\n", "epoch: 10 step: 4, loss is 0.2454\n", "epoch: 10 step: 5, loss is 0.2612\n", "epoch: 10 step: 6, loss is 0.1682\n", "epoch: 10 step: 7, loss is 0.3401\n", "epoch: 10 step: 8, loss is 0.2339\n", "epoch: 10 step: 9, loss is 0.1695\n", "epoch: 10 step: 10, loss is 0.2723\n", "epoch: 10 step: 11, loss is 0.1482\n", "epoch: 10 step: 12, loss is 0.4558\n", "epoch: 10 step: 13, loss is 0.2686\n", "epoch: 10 step: 14, loss is 0.2011\n", "epoch: 10 step: 15, loss is 0.2906\n", "epoch: 10 step: 16, loss is 0.2876\n", "epoch: 10 step: 17, loss is 0.1365\n", "epoch: 10 step: 18, loss is 0.1849\n", "epoch: 10 step: 19, loss is 0.2352\n", "epoch: 10 step: 20, loss is 0.3400\n", "epoch: 10 step: 21, loss is 0.2153\n", "epoch: 10 step: 22, loss is 0.3523\n", "epoch: 10 step: 23, loss is 0.2171\n", "epoch: 10 step: 24, loss is 0.1697\n", "epoch: 10 step: 25, loss is 0.2121\n", "epoch: 10 step: 26, loss is 0.2590\n", "epoch: 10 step: 27, loss is 0.1709\n", "epoch: 10 step: 28, loss is 0.2462\n", "epoch: 10 step: 29, loss is 0.2153\n", "epoch: 10 step: 30, loss is 0.2079\n", "epoch: 10 step: 31, loss is 0.3354\n", "epoch: 10 step: 32, loss is 0.2214\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 10 step: 33, loss is 0.2019\n", "epoch: 10 step: 34, loss is 0.2363\n", "epoch: 10 step: 35, loss is 0.1242\n", "epoch: 10 step: 36, loss is 0.1880\n", "epoch: 10 step: 37, loss is 0.2874\n", "epoch: 10 step: 38, loss is 0.1517\n", "epoch: 10 step: 39, loss is 0.2969\n", "epoch: 10 step: 40, loss is 0.2387\n", "epoch: 10 step: 41, loss is 0.1753\n", "epoch: 10 step: 42, loss is 0.1604\n", "epoch: 10 step: 43, loss is 0.2058\n", "epoch: 10 step: 44, loss is 0.1899\n", "epoch: 10 step: 45, loss is 0.1511\n", "epoch: 10 step: 46, loss is 0.2173\n", "epoch: 10 step: 47, loss is 0.1632\n", "epoch: 10 step: 48, loss is 0.3122\n", "epoch: 10 step: 49, loss is 0.3052\n", "epoch: 10 step: 50, loss is 0.3136\n", "epoch: 10 step: 51, loss is 0.3212\n", "epoch: 10 step: 52, loss is 0.3128\n", "epoch: 10 step: 53, loss is 0.2322\n", "epoch: 10 step: 54, loss is 0.1590\n", "epoch: 10 step: 55, loss is 0.2994\n", "epoch: 10 step: 56, loss is 0.1690\n", "epoch: 10 step: 57, loss is 0.2279\n", "epoch: 10 step: 58, loss is 0.2540\n", "epoch: 10 step: 59, loss is 0.3558\n", "epoch: 10 step: 60, loss is 0.2341\n", "epoch: 10 step: 61, loss is 0.2298\n", "epoch: 10 step: 62, loss is 0.3778\n", "epoch: 10 step: 63, loss is 0.3423\n", "epoch: 10 step: 64, loss is 0.3083\n", "epoch: 10 step: 65, loss is 0.2735\n", "epoch: 10 step: 66, loss is 0.2864\n", "epoch: 10 step: 67, loss is 0.1541\n", "epoch: 10 step: 68, loss is 0.2601\n", "epoch: 10 step: 69, loss is 0.1962\n", "epoch: 10 step: 70, loss is 0.3097\n", "epoch: 10 step: 71, loss is 0.3367\n", "epoch: 10 step: 72, loss is 0.1662\n", "epoch: 10 step: 73, loss is 0.2811\n", "epoch: 10 step: 74, loss is 0.2674\n", "epoch: 10 step: 75, loss is 0.1980\n", "epoch: 10 step: 76, loss is 0.3432\n", "epoch: 10 step: 77, loss is 0.2632\n", "epoch: 10 step: 78, loss is 0.3397\n", "epoch: 10 step: 79, loss is 0.2095\n", "epoch: 10 step: 80, loss is 0.2881\n", "epoch: 10 step: 81, loss is 0.2335\n", "epoch: 10 step: 82, loss is 0.2270\n", "epoch: 10 step: 83, loss is 0.2386\n", "epoch: 10 step: 84, loss is 0.3727\n", "epoch: 10 step: 85, loss is 0.2267\n", "epoch: 10 step: 86, loss is 0.3805\n", "epoch: 10 step: 87, loss is 0.2122\n", "epoch: 10 step: 88, loss is 0.2837\n", "epoch: 10 step: 89, loss is 0.2378\n", "epoch: 10 step: 90, loss is 0.2685\n", "epoch: 10 step: 91, loss is 0.2153\n", "epoch: 10 step: 92, loss is 0.1842\n", "epoch: 10 step: 93, loss is 0.2125\n", "epoch: 10 step: 94, loss is 0.2021\n", "epoch: 10 step: 95, loss is 0.3926\n", "epoch: 10 step: 96, loss is 0.1395\n", "epoch: 10 step: 97, loss is 0.1523\n", "epoch: 10 step: 98, loss is 0.1938\n", "epoch: 10 step: 99, loss is 0.2635\n", "epoch: 10 step: 100, loss is 0.2527\n", "epoch: 10 step: 101, loss is 0.2829\n", "epoch: 10 step: 102, loss is 0.2359\n", "epoch: 10 step: 103, loss is 0.0937\n", "epoch: 10 step: 104, loss is 0.1952\n", "epoch: 10 step: 105, loss is 0.2002\n", "epoch: 10 step: 106, loss is 0.3605\n", "epoch: 10 step: 107, loss is 0.3041\n", "epoch: 10 step: 108, loss is 0.2202\n", "epoch: 10 step: 109, loss is 0.2284\n", "epoch: 10 step: 110, loss is 0.2802\n", "epoch: 10 step: 111, loss is 0.2795\n", "epoch: 10 step: 112, loss is 0.2365\n", "epoch: 10 step: 113, loss is 0.3807\n", "epoch: 10 step: 114, loss is 0.2560\n", "epoch: 10 step: 115, loss is 0.2673\n", "epoch: 10 step: 116, loss is 0.3012\n", "epoch: 10 step: 117, loss is 0.2159\n", "epoch: 10 step: 118, loss is 0.1535\n", "epoch: 10 step: 119, loss is 0.2864\n", "epoch: 10 step: 120, loss is 0.2596\n", "epoch: 10 step: 121, loss is 0.3524\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 10 step: 122, loss is 0.3619\n", "epoch: 10 step: 123, loss is 0.2152\n", "epoch: 10 step: 124, loss is 0.3646\n", "epoch: 10 step: 125, loss is 0.2300\n", "epoch: 10 step: 126, loss is 0.2405\n", "epoch: 10 step: 127, loss is 0.2607\n", "epoch: 10 step: 128, loss is 0.3845\n", "epoch: 10 step: 129, loss is 0.4600\n", "epoch: 10 step: 130, loss is 0.3505\n", "epoch: 10 step: 131, loss is 0.1911\n", "epoch: 10 step: 132, loss is 0.1612\n", "epoch: 10 step: 133, loss is 0.3517\n", "epoch: 10 step: 134, loss is 0.2793\n", "epoch: 10 step: 135, loss is 0.1697\n", "epoch: 10 step: 136, loss is 0.1566\n", "epoch: 10 step: 137, loss is 0.3282\n", "epoch: 10 step: 138, loss is 0.3097\n", "epoch: 10 step: 139, loss is 0.2631\n", "epoch: 10 step: 140, loss is 0.3907\n", "epoch: 10 step: 141, loss is 0.3358\n", "epoch: 10 step: 142, loss is 0.3061\n", "epoch: 10 step: 143, loss is 0.1727\n", "epoch: 10 step: 144, loss is 0.2522\n", "epoch: 10 step: 145, loss is 0.3008\n", "epoch: 10 step: 146, loss is 0.3309\n", "epoch: 10 step: 147, loss is 0.3308\n", "epoch: 10 step: 148, loss is 0.2165\n", "epoch: 10 step: 149, loss is 0.2901\n", "epoch: 10 step: 150, loss is 0.2647\n", "epoch: 10 step: 151, loss is 0.3280\n", "epoch: 10 step: 152, loss is 0.2017\n", "epoch: 10 step: 153, loss is 0.2675\n", "epoch: 10 step: 154, loss is 0.2361\n", "epoch: 10 step: 155, loss is 0.3119\n", "epoch: 10 step: 156, loss is 0.3522\n", "epoch: 10 step: 157, loss is 0.1649\n", "epoch: 10 step: 158, loss is 0.3038\n", "epoch: 10 step: 159, loss is 0.3336\n", "epoch: 10 step: 160, loss is 0.3087\n", "epoch: 10 step: 161, loss is 0.2617\n", "epoch: 10 step: 162, loss is 0.3109\n", "epoch: 10 step: 163, loss is 0.2865\n", "epoch: 10 step: 164, loss is 0.2566\n", "epoch: 10 step: 165, loss is 0.1423\n", "epoch: 10 step: 166, loss is 0.2079\n", "epoch: 10 step: 167, loss is 0.2017\n", "epoch: 10 step: 168, loss is 0.2564\n", "epoch: 10 step: 169, loss is 0.2955\n", "epoch: 10 step: 170, loss is 0.2940\n", "epoch: 10 step: 171, loss is 0.2015\n", "epoch: 10 step: 172, loss is 0.2100\n", "epoch: 10 step: 173, loss is 0.3030\n", "epoch: 10 step: 174, loss is 0.1818\n", "epoch: 10 step: 175, loss is 0.3993\n", "epoch: 10 step: 176, loss is 0.2567\n", "epoch: 10 step: 177, loss is 0.1747\n", "epoch: 10 step: 178, loss is 0.2136\n", "epoch: 10 step: 179, loss is 0.3743\n", "epoch: 10 step: 180, loss is 0.2902\n", "epoch: 10 step: 181, loss is 0.3440\n", "epoch: 10 step: 182, loss is 0.1998\n", "epoch: 10 step: 183, loss is 0.2522\n", "epoch: 10 step: 184, loss is 0.2341\n", "epoch: 10 step: 185, loss is 0.4920\n", "epoch: 10 step: 186, loss is 0.2786\n", "epoch: 10 step: 187, loss is 0.2460\n", "epoch: 10 step: 188, loss is 0.2580\n", "epoch: 10 step: 189, loss is 0.3025\n", "epoch: 10 step: 190, loss is 0.4090\n", "epoch: 10 step: 191, loss is 0.3260\n", "epoch: 10 step: 192, loss is 0.3987\n", "epoch: 10 step: 193, loss is 0.2152\n", "epoch: 10 step: 194, loss is 0.3381\n", "epoch: 10 step: 195, loss is 0.2607\n", "epoch: 10 step: 196, loss is 0.4350\n", "epoch: 10 step: 197, loss is 0.2947\n", "epoch: 10 step: 198, loss is 0.3505\n", "epoch: 10 step: 199, loss is 0.2185\n", "epoch: 10 step: 200, loss is 0.1370\n", "epoch: 10 step: 201, loss is 0.2361\n", "epoch: 10 step: 202, loss is 0.3012\n", "epoch: 10 step: 203, loss is 0.4109\n", "epoch: 10 step: 204, loss is 0.1969\n", "epoch: 10 step: 205, loss is 0.2397\n", "epoch: 10 step: 206, loss is 0.1650\n", "epoch: 10 step: 207, loss is 0.1021\n", "epoch: 10 step: 208, loss is 0.2504\n", "epoch: 10 step: 209, loss is 0.3086\n", "epoch: 10 step: 210, loss is 0.5832\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 10 step: 211, loss is 0.3747\n", "epoch: 10 step: 212, loss is 0.1915\n", "epoch: 10 step: 213, loss is 0.2435\n", "epoch: 10 step: 214, loss is 0.1964\n", "epoch: 10 step: 215, loss is 0.1412\n", "epoch: 10 step: 216, loss is 0.3663\n", "epoch: 10 step: 217, loss is 0.2127\n", "epoch: 10 step: 218, loss is 0.3638\n", "epoch: 10 step: 219, loss is 0.2969\n", "epoch: 10 step: 220, loss is 0.2878\n", "epoch: 10 step: 221, loss is 0.3518\n", "epoch: 10 step: 222, loss is 0.2342\n", "epoch: 10 step: 223, loss is 0.2159\n", "epoch: 10 step: 224, loss is 0.3619\n", "epoch: 10 step: 225, loss is 0.2785\n", "epoch: 10 step: 226, loss is 0.2721\n", "epoch: 10 step: 227, loss is 0.2554\n", "epoch: 10 step: 228, loss is 0.3147\n", "epoch: 10 step: 229, loss is 0.2355\n", "epoch: 10 step: 230, loss is 0.2799\n", "epoch: 10 step: 231, loss is 0.3037\n", "epoch: 10 step: 232, loss is 0.3153\n", "epoch: 10 step: 233, loss is 0.2251\n", "epoch: 10 step: 234, loss is 0.3054\n", "epoch: 10 step: 235, loss is 0.2202\n", "epoch: 10 step: 236, loss is 0.3073\n", "epoch: 10 step: 237, loss is 0.2066\n", "epoch: 10 step: 238, loss is 0.1443\n", "epoch: 10 step: 239, loss is 0.2317\n", "epoch: 10 step: 240, loss is 0.3590\n", "epoch: 10 step: 241, loss is 0.2146\n", "epoch: 10 step: 242, loss is 0.3797\n", "epoch: 10 step: 243, loss is 0.2756\n", "epoch: 10 step: 244, loss is 0.1608\n", "epoch: 10 step: 245, loss is 0.2442\n", "epoch: 10 step: 246, loss is 0.2288\n", "epoch: 10 step: 247, loss is 0.2711\n", "epoch: 10 step: 248, loss is 0.0924\n", "epoch: 10 step: 249, loss is 0.3406\n", "epoch: 10 step: 250, loss is 0.2317\n", "epoch: 10 step: 251, loss is 0.2523\n", "epoch: 10 step: 252, loss is 0.2392\n", "epoch: 10 step: 253, loss is 0.2634\n", "epoch: 10 step: 254, loss is 0.3347\n", "epoch: 10 step: 255, loss is 0.2345\n", "epoch: 10 step: 256, loss is 0.3497\n", "epoch: 10 step: 257, loss is 0.2975\n", "epoch: 10 step: 258, loss is 0.2213\n", "epoch: 10 step: 259, loss is 0.2213\n", "epoch: 10 step: 260, loss is 0.3164\n", "epoch: 10 step: 261, loss is 0.2560\n", "epoch: 10 step: 262, loss is 0.1884\n", "epoch: 10 step: 263, loss is 0.3105\n", "epoch: 10 step: 264, loss is 0.2927\n", "epoch: 10 step: 265, loss is 0.2530\n", "epoch: 10 step: 266, loss is 0.3810\n", "epoch: 10 step: 267, loss is 0.2432\n", "epoch: 10 step: 268, loss is 0.3442\n", "epoch: 10 step: 269, loss is 0.2244\n", "epoch: 10 step: 270, loss is 0.3054\n", "epoch: 10 step: 271, loss is 0.2844\n", "epoch: 10 step: 272, loss is 0.3220\n", "epoch: 10 step: 273, loss is 0.2778\n", "epoch: 10 step: 274, loss is 0.2705\n", "epoch: 10 step: 275, loss is 0.1720\n", "epoch: 10 step: 276, loss is 0.1866\n", "epoch: 10 step: 277, loss is 0.3264\n", "epoch: 10 step: 278, loss is 0.3074\n", "epoch: 10 step: 279, loss is 0.1466\n", "epoch: 10 step: 280, loss is 0.1658\n", "epoch: 10 step: 281, loss is 0.2875\n", "epoch: 10 step: 282, loss is 0.2496\n", "epoch: 10 step: 283, loss is 0.2294\n", "epoch: 10 step: 284, loss is 0.2058\n", "epoch: 10 step: 285, loss is 0.2605\n", "epoch: 10 step: 286, loss is 0.3054\n", "epoch: 10 step: 287, loss is 0.2496\n", "epoch: 10 step: 288, loss is 0.1728\n", "epoch: 10 step: 289, loss is 0.3792\n", "epoch: 10 step: 290, loss is 0.1727\n", "epoch: 10 step: 291, loss is 0.2272\n", "epoch: 10 step: 292, loss is 0.2899\n", "epoch: 10 step: 293, loss is 0.3781\n", "epoch: 10 step: 294, loss is 0.2894\n", "epoch: 10 step: 295, loss is 0.2592\n", "epoch: 10 step: 296, loss is 0.2395\n", "epoch: 10 step: 297, loss is 0.2941\n", "epoch: 10 step: 298, loss is 0.2771\n", "epoch: 10 step: 299, loss is 0.2782\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 10 step: 300, loss is 0.2784\n", "epoch: 10 step: 301, loss is 0.2806\n", "epoch: 10 step: 302, loss is 0.2436\n", "epoch: 10 step: 303, loss is 0.3769\n", "epoch: 10 step: 304, loss is 0.3425\n", "epoch: 10 step: 305, loss is 0.2269\n", "epoch: 10 step: 306, loss is 0.4220\n", "epoch: 10 step: 307, loss is 0.2467\n", "epoch: 10 step: 308, loss is 0.1316\n", "epoch: 10 step: 309, loss is 0.1762\n", "epoch: 10 step: 310, loss is 0.3126\n", "epoch: 10 step: 311, loss is 0.3991\n", "epoch: 10 step: 312, loss is 0.1567\n", "epoch: 10 step: 313, loss is 0.2893\n", "epoch: 10 step: 314, loss is 0.1417\n", "epoch: 10 step: 315, loss is 0.2252\n", "epoch: 10 step: 316, loss is 0.2381\n", "epoch: 10 step: 317, loss is 0.2423\n", "epoch: 10 step: 318, loss is 0.2374\n", "epoch: 10 step: 319, loss is 0.2307\n", "epoch: 10 step: 320, loss is 0.0773\n", "epoch: 10 step: 321, loss is 0.2638\n", "epoch: 10 step: 322, loss is 0.2122\n", "epoch: 10 step: 323, loss is 0.3638\n", "epoch: 10 step: 324, loss is 0.2257\n", "epoch: 10 step: 325, loss is 0.1227\n", "epoch: 10 step: 326, loss is 0.2076\n", "epoch: 10 step: 327, loss is 0.3363\n", "epoch: 10 step: 328, loss is 0.2720\n", "epoch: 10 step: 329, loss is 0.3177\n", "epoch: 10 step: 330, loss is 0.3589\n", "epoch: 10 step: 331, loss is 0.2251\n", "epoch: 10 step: 332, loss is 0.2356\n", "epoch: 10 step: 333, loss is 0.2400\n", "epoch: 10 step: 334, loss is 0.2644\n", "epoch: 10 step: 335, loss is 0.1769\n", "epoch: 10 step: 336, loss is 0.2161\n", "epoch: 10 step: 337, loss is 0.2156\n", "epoch: 10 step: 338, loss is 0.1552\n", "epoch: 10 step: 339, loss is 0.3564\n", "epoch: 10 step: 340, loss is 0.3401\n", "epoch: 10 step: 341, loss is 0.2185\n", "epoch: 10 step: 342, loss is 0.1962\n", "epoch: 10 step: 343, loss is 0.2351\n", "epoch: 10 step: 344, loss is 0.2256\n", "epoch: 10 step: 345, loss is 0.3031\n", "epoch: 10 step: 346, loss is 0.3497\n", "epoch: 10 step: 347, loss is 0.3768\n", "epoch: 10 step: 348, loss is 0.2074\n", "epoch: 10 step: 349, loss is 0.1948\n", "epoch: 10 step: 350, loss is 0.2780\n", "epoch: 10 step: 351, loss is 0.2888\n", "epoch: 10 step: 352, loss is 0.2742\n", "epoch: 10 step: 353, loss is 0.3123\n", "epoch: 10 step: 354, loss is 0.3578\n", "epoch: 10 step: 355, loss is 0.1633\n", "epoch: 10 step: 356, loss is 0.2015\n", "epoch: 10 step: 357, loss is 0.2081\n", "epoch: 10 step: 358, loss is 0.2807\n", "epoch: 10 step: 359, loss is 0.2153\n", "epoch: 10 step: 360, loss is 0.3053\n", "epoch: 10 step: 361, loss is 0.3514\n", "epoch: 10 step: 362, loss is 0.2499\n", "epoch: 10 step: 363, loss is 0.2624\n", "epoch: 10 step: 364, loss is 0.2889\n", "epoch: 10 step: 365, loss is 0.2481\n", "epoch: 10 step: 366, loss is 0.2942\n", "epoch: 10 step: 367, loss is 0.3332\n", "epoch: 10 step: 368, loss is 0.3419\n", "epoch: 10 step: 369, loss is 0.1517\n", "epoch: 10 step: 370, loss is 0.2912\n", "epoch: 10 step: 371, loss is 0.2824\n", "epoch: 10 step: 372, loss is 0.2197\n", "epoch: 10 step: 373, loss is 0.4275\n", "epoch: 10 step: 374, loss is 0.3104\n", "epoch: 10 step: 375, loss is 0.1147\n", "epoch: 10 step: 376, loss is 0.2216\n", "epoch: 10 step: 377, loss is 0.2799\n", "epoch: 10 step: 378, loss is 0.2447\n", "epoch: 10 step: 379, loss is 0.2776\n", "epoch: 10 step: 380, loss is 0.3090\n", "epoch: 10 step: 381, loss is 0.2692\n", "epoch: 10 step: 382, loss is 0.3088\n", "epoch: 10 step: 383, loss is 0.2008\n", "epoch: 10 step: 384, loss is 0.1450\n", "epoch: 10 step: 385, loss is 0.2522\n", "epoch: 10 step: 386, loss is 0.2532\n", "epoch: 10 step: 387, loss is 0.3558\n", "epoch: 10 step: 388, loss is 0.2641\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "epoch: 10 step: 389, loss is 0.2334\n", "epoch: 10 step: 390, loss is 0.1966\n", "Epoch time: 43320.815, per step time: 111.079, avg loss: 0.262\n", "************************************************************\n", "============== Training Success ==============\n" ] } ], "source": [ "from mindspore import Model\n", "from mindspore.train.callback import CheckpointConfig, ModelCheckpoint, TimeMonitor, LossMonitor\n", "from mindspore.nn import Accuracy\n", "\n", "\n", "model = Model(network, loss, opt, {'acc': Accuracy()})\n", "loss_cb = LossMonitor()\n", "print(\"============== Starting Training ==============\")\n", "config_ck = CheckpointConfig(save_checkpoint_steps=cfg.save_checkpoint_steps,\n", " keep_checkpoint_max=cfg.keep_checkpoint_max)\n", "ckpoint_cb = ModelCheckpoint(prefix=\"lstm\", directory=args.ckpt_path, config=config_ck)\n", "time_cb = TimeMonitor(data_size=ds_train.get_dataset_size())\n", "if args.device_target == \"CPU\":\n", " model.train(cfg.num_epochs, ds_train, callbacks=[time_cb, ckpoint_cb, loss_cb], dataset_sink_mode=False)\n", "else:\n", " model.train(cfg.num_epochs, ds_train, callbacks=[time_cb, ckpoint_cb, loss_cb])\n", "print(\"============== Training Success ==============\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 模型验证\n", "\n", "创建并加载验证数据集(`ds_eval`),加载由**训练**保存的CheckPoint文件,进行验证,查看模型质量,此步骤用时约30秒。" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "============== Starting Testing ==============\n", "============== {'acc': 0.8495592948717948} ==============\n" ] } ], "source": [ "from mindspore.train.serialization import load_checkpoint, load_param_into_net\n", "\n", "\n", "args.ckpt_path = f'./lstm-{cfg.num_epochs}_390.ckpt'\n", "print(\"============== Starting Testing ==============\")\n", "ds_eval = lstm_create_dataset(args.preprocess_path, cfg.batch_size, training=False)\n", "param_dict = load_checkpoint(args.ckpt_path)\n", "load_param_into_net(network, param_dict)\n", "if args.device_target == \"CPU\":\n", " acc = model.eval(ds_eval, dataset_sink_mode=False)\n", "else:\n", " acc = model.eval(ds_eval)\n", "print(\"============== {} ==============\".format(acc))\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 训练结果评价\n", "\n", "根据以上一段代码的输出可以看到,在经历了10轮epoch之后,使用验证的数据集,对文本的情感分析正确率在85%左右,达到一个基本满意的结果。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 总结\n", "\n", "以上便完成了MindSpore自然语言处理应用的体验,我们通过本次体验全面了解了如何使用MindSpore进行自然语言中处理情感分类问题,理解了如何通过定义和初始化基于LSTM的`SentimentNet`网络进行训练模型及验证正确率。" ] } ], "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.5" } }, "nbformat": 4, "nbformat_minor": 4 }