In [1]:
from google.colab import drive
drive.mount('/content/gdrive')
import os
os.chdir('/content/gdrive/My Drive/finch/tensorflow2/text_classification/imdb/main')
Drive already mounted at /content/gdrive; to attempt to forcibly remount, call drive.mount("/content/gdrive", force_remount=True).
In [2]:
%tensorflow_version 2.x
!pip install tensorflow-addons
!pip install transformers
Requirement already satisfied: tensorflow-addons in /usr/local/lib/python3.6/dist-packages (0.8.3)
Requirement already satisfied: typeguard in /usr/local/lib/python3.6/dist-packages (from tensorflow-addons) (2.7.1)
Requirement already satisfied: transformers in /usr/local/lib/python3.6/dist-packages (3.0.2)
Requirement already satisfied: packaging in /usr/local/lib/python3.6/dist-packages (from transformers) (20.4)
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from transformers) (2.23.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from transformers) (1.18.5)
Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.6/dist-packages (from transformers) (4.41.1)
Requirement already satisfied: sacremoses in /usr/local/lib/python3.6/dist-packages (from transformers) (0.0.43)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.6/dist-packages (from transformers) (2019.12.20)
Requirement already satisfied: dataclasses; python_version < "3.7" in /usr/local/lib/python3.6/dist-packages (from transformers) (0.7)
Requirement already satisfied: filelock in /usr/local/lib/python3.6/dist-packages (from transformers) (3.0.12)
Requirement already satisfied: tokenizers==0.8.1.rc1 in /usr/local/lib/python3.6/dist-packages (from transformers) (0.8.1rc1)
Requirement already satisfied: sentencepiece!=0.1.92 in /usr/local/lib/python3.6/dist-packages (from transformers) (0.1.91)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.6/dist-packages (from packaging->transformers) (2.4.7)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from packaging->transformers) (1.12.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (2.10)
Requirement already satisfied: click in /usr/local/lib/python3.6/dist-packages (from sacremoses->transformers) (7.1.2)
Requirement already satisfied: joblib in /usr/local/lib/python3.6/dist-packages (from sacremoses->transformers) (0.16.0)
In [3]:
from transformers import BertTokenizer, TFBertModel

import tensorflow as tf
import tensorflow_addons as tfa
import numpy as np
import pprint
import logging
import time

print("TensorFlow Version", tf.__version__)
print('GPU Enabled:', tf.test.is_gpu_available())
TensorFlow Version 2.2.0
WARNING:tensorflow:From <ipython-input-3-0175c78ad17c>:11: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
GPU Enabled: True
In [4]:
params = {
  'train_paths': [
    '../data/train_bt_part1.txt',
    '../data/train_bt_part2.txt',
    '../data/train_bt_part3.txt',
    '../data/train_bt_part4.txt',
    '../data/train_bt_part5.txt',
    '../data/train_bt_part6.txt',
  ],
  'test_paths': [
    '../data/test.txt',
  ],
  'pretrain_path': 'bert-base-uncased',
  'num_samples': 25000 * 2,
  'batch_size': 12,
  'max_len': 256,
  'num_patience': 5,
  'init_lr': 1e-5,
  'max_lr': 3e-5,
}
In [5]:
tokenizer = BertTokenizer.from_pretrained(params['pretrain_path'],
                                          lowercase = True,
                                          add_special_tokens = True)
In [6]:
def data_generator(f_paths, params):
  for f_path in f_paths:
    with open(f_path) as f:
      print('Reading', f_path)
      for line in f:
        line = line.rstrip()
        label, text = line.split('\t')
        text = ['[CLS]'] + tokenizer.tokenize(text) + ['[SEP]']
        if len(text) > params['max_len']:
          _max_len = params['max_len'] // 2
          text = text[:_max_len] + text[-_max_len:]
        seg = [0] * len(text)
        text = tokenizer.convert_tokens_to_ids(text)
        y = int(label)
        yield text, seg, y


def dataset(is_training, params):
  _shapes = ([None], [None], ())
  _types = (tf.int32, tf.int32, tf.int32)
  _pads = (0, 0, -1)
  
  if is_training:
    ds = tf.data.Dataset.from_generator(
      lambda: data_generator(params['train_paths'], params),
      output_shapes = _shapes,
      output_types = _types,)
    ds = ds.shuffle(params['num_samples'])
    ds = ds.padded_batch(params['batch_size'], _shapes, _pads)
    ds = ds.prefetch(tf.data.experimental.AUTOTUNE)
  else:
    ds = tf.data.Dataset.from_generator(
      lambda: data_generator(params['test_paths'], params),
      output_shapes = _shapes,
      output_types = _types,)
    ds = ds.padded_batch(params['batch_size'], _shapes, _pads)
    ds = ds.prefetch(tf.data.experimental.AUTOTUNE)
  
  return ds
In [7]:
# input stream ids check
text, seg, _ = next(data_generator(params['train_paths'], params))
print(text)
print(seg)
Reading ../data/train_bt_part1.txt
[101, 1045, 2876, 1005, 1056, 9278, 2023, 2028, 2130, 2006, 7922, 12635, 2305, 102]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
In [8]:
class BertFinetune(tf.keras.Model):
  def __init__(self, params):
    super(BertFinetune, self).__init__()
    self.bert = TFBertModel.from_pretrained(params['pretrain_path'],
                                            trainable = True)
    self.drop_1 = tf.keras.layers.Dropout(.1)
    self.fc = tf.keras.layers.Dense(300, tf.nn.swish, name='down_stream/fc')
    self.drop_2 = tf.keras.layers.Dropout(.1)
    self.out = tf.keras.layers.Dense(2, name='down_stream/out')

  def call(self, bert_inputs, training):
    bert_inputs = [tf.cast(inp, tf.int32) for inp in bert_inputs]
    x = self.bert(bert_inputs, training=training)[1]
    x = self.drop_1(x, training=training)
    x = self.fc(x)
    x = self.drop_2(x, training=training)
    x = self.out(x)
    return x
In [ ]:
model = BertFinetune(params)
model.build([[None, None], [None, None], [None, None]])
pprint.pprint([(v.name, v.shape) for v in model.trainable_variables])

step_size = 2 * params['num_samples'] // params['batch_size']
decay_lr = tfa.optimizers.Triangular2CyclicalLearningRate(
  initial_learning_rate = params['init_lr'],
  maximal_learning_rate = params['max_lr'],
  step_size = step_size,)
optim = tf.optimizers.Adam(params['init_lr'])
global_step = 0

best_acc = .0
count = 0

t0 = time.time()
logger = logging.getLogger('tensorflow')
logger.setLevel(logging.INFO)

while True:
  # TRAINING
  for (text, seg, labels) in dataset(is_training=True, params=params):
    with tf.GradientTape() as tape:
      logits = model([text, tf.sign(text), seg], training=True)
      loss = tf.compat.v1.losses.softmax_cross_entropy(
        tf.one_hot(labels, 2, dtype=tf.float32),
        logits = logits,
        label_smoothing = .2,)
      
    optim.lr.assign(decay_lr(global_step))
    grads = tape.gradient(loss, model.trainable_variables)
    grads, _ = tf.clip_by_global_norm(grads, 5.)
    optim.apply_gradients(zip(grads, model.trainable_variables))
    
    if global_step % 100 == 0:
      logger.info("Step {} | Loss: {:.4f} | Spent: {:.1f} secs | LR: {:.6f}".format(
          global_step, loss.numpy().item(), time.time()-t0, optim.lr.numpy().item()))
      t0 = time.time()
    global_step += 1
  
  # EVALUATION
  m = tf.keras.metrics.Accuracy()

  for (text, seg, labels) in dataset(is_training=False, params=params):
    logits = model([text, tf.sign(text), seg], training=False)
    m.update_state(y_true=labels, y_pred=tf.argmax(logits, -1))

  acc = m.result().numpy()
  logger.info("Evaluation: Testing Accuracy: {:.3f}".format(acc))

  if acc > best_acc:
    best_acc = acc
    # you can save model here
    count = 0
  else:
    count += 1
  logger.info("Best Accuracy: {:.3f}".format(best_acc))

  if count == params['num_patience']:
    print(params['num_patience'], "times not improve the best result, therefore stop training")
    break
Some weights of the model checkpoint at bert-base-uncased were not used when initializing TFBertModel: ['nsp___cls', 'mlm___cls']
- This IS expected if you are initializing TFBertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPretraining model).
- This IS NOT expected if you are initializing TFBertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
All the weights of TFBertModel were initialized from the model checkpoint at bert-base-uncased.
If your task is similar to the task the model of the ckeckpoint was trained on, you can already use TFBertModel for predictions without further training.
[('tf_bert_model/bert/embeddings/word_embeddings/weight:0',
  TensorShape([30522, 768])),
 ('tf_bert_model/bert/embeddings/position_embeddings/embeddings:0',
  TensorShape([512, 768])),
 ('tf_bert_model/bert/embeddings/token_type_embeddings/embeddings:0',
  TensorShape([2, 768])),
 ('tf_bert_model/bert/embeddings/LayerNorm/gamma:0', TensorShape([768])),
 ('tf_bert_model/bert/embeddings/LayerNorm/beta:0', TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._0/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._0/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._0/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._0/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._1/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._1/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._1/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._1/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._2/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._2/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._2/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._2/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._3/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._3/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._3/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._3/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._4/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._4/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._4/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._4/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._5/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._5/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._5/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._5/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._6/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._6/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._6/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._6/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._7/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._7/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._7/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._7/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._8/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._8/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._8/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._8/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._9/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._9/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._9/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._9/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._10/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._10/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._10/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._10/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/query/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/query/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/key/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/key/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/value/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/self/value/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/output/dense/kernel:0',
  TensorShape([768, 768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/attention/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/intermediate/dense/kernel:0',
  TensorShape([768, 3072])),
 ('tf_bert_model/bert/encoder/layer_._11/intermediate/dense/bias:0',
  TensorShape([3072])),
 ('tf_bert_model/bert/encoder/layer_._11/output/dense/kernel:0',
  TensorShape([3072, 768])),
 ('tf_bert_model/bert/encoder/layer_._11/output/dense/bias:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/output/LayerNorm/gamma:0',
  TensorShape([768])),
 ('tf_bert_model/bert/encoder/layer_._11/output/LayerNorm/beta:0',
  TensorShape([768])),
 ('tf_bert_model/bert/pooler/dense/kernel:0', TensorShape([768, 768])),
 ('tf_bert_model/bert/pooler/dense/bias:0', TensorShape([768])),
 ('down_stream/fc/kernel:0', TensorShape([768, 300])),
 ('down_stream/fc/bias:0', TensorShape([300])),
 ('down_stream/out/kernel:0', TensorShape([300, 2])),
 ('down_stream/out/bias:0', TensorShape([2]))]
Reading ../data/train_bt_part1.txt
Reading ../data/train_bt_part2.txt
Reading ../data/train_bt_part3.txt
Reading ../data/train_bt_part4.txt
Reading ../data/train_bt_part5.txt
Reading ../data/train_bt_part6.txt
INFO:tensorflow:Step 0 | Loss: 0.9532 | Spent: 161.5 secs | LR: 0.000010
INFO:tensorflow:Step 100 | Loss: 0.4915 | Spent: 84.3 secs | LR: 0.000010
INFO:tensorflow:Step 200 | Loss: 0.4351 | Spent: 84.0 secs | LR: 0.000010
INFO:tensorflow:Step 300 | Loss: 0.8057 | Spent: 84.0 secs | LR: 0.000011
INFO:tensorflow:Step 400 | Loss: 0.5274 | Spent: 83.8 secs | LR: 0.000011
INFO:tensorflow:Step 500 | Loss: 0.7116 | Spent: 83.8 secs | LR: 0.000011
INFO:tensorflow:Step 600 | Loss: 0.4689 | Spent: 83.8 secs | LR: 0.000011
INFO:tensorflow:Step 700 | Loss: 0.5618 | Spent: 83.7 secs | LR: 0.000012
INFO:tensorflow:Step 800 | Loss: 0.3837 | Spent: 83.6 secs | LR: 0.000012
INFO:tensorflow:Step 900 | Loss: 0.4295 | Spent: 83.5 secs | LR: 0.000012
INFO:tensorflow:Step 1000 | Loss: 0.5409 | Spent: 83.7 secs | LR: 0.000012
INFO:tensorflow:Step 1100 | Loss: 0.3591 | Spent: 83.6 secs | LR: 0.000013
INFO:tensorflow:Step 1200 | Loss: 0.3741 | Spent: 83.9 secs | LR: 0.000013
INFO:tensorflow:Step 1300 | Loss: 0.6995 | Spent: 83.8 secs | LR: 0.000013
INFO:tensorflow:Step 1400 | Loss: 0.4641 | Spent: 83.7 secs | LR: 0.000013
INFO:tensorflow:Step 1500 | Loss: 0.6029 | Spent: 83.9 secs | LR: 0.000014
INFO:tensorflow:Step 1600 | Loss: 0.5146 | Spent: 83.8 secs | LR: 0.000014
INFO:tensorflow:Step 1700 | Loss: 0.5033 | Spent: 83.8 secs | LR: 0.000014
INFO:tensorflow:Step 1800 | Loss: 0.4652 | Spent: 83.9 secs | LR: 0.000014
INFO:tensorflow:Step 1900 | Loss: 0.4828 | Spent: 83.8 secs | LR: 0.000015
INFO:tensorflow:Step 2000 | Loss: 0.4119 | Spent: 83.9 secs | LR: 0.000015
INFO:tensorflow:Step 2100 | Loss: 0.3507 | Spent: 83.9 secs | LR: 0.000015
INFO:tensorflow:Step 2200 | Loss: 0.4811 | Spent: 83.6 secs | LR: 0.000015
INFO:tensorflow:Step 2300 | Loss: 0.4251 | Spent: 83.8 secs | LR: 0.000016
INFO:tensorflow:Step 2400 | Loss: 0.4113 | Spent: 83.7 secs | LR: 0.000016
INFO:tensorflow:Step 2500 | Loss: 0.3462 | Spent: 83.8 secs | LR: 0.000016
INFO:tensorflow:Step 2600 | Loss: 0.4569 | Spent: 83.7 secs | LR: 0.000016
INFO:tensorflow:Step 2700 | Loss: 0.3432 | Spent: 83.7 secs | LR: 0.000016
INFO:tensorflow:Step 2800 | Loss: 0.4555 | Spent: 83.3 secs | LR: 0.000017
INFO:tensorflow:Step 2900 | Loss: 0.4898 | Spent: 83.5 secs | LR: 0.000017
INFO:tensorflow:Step 3000 | Loss: 0.3708 | Spent: 83.5 secs | LR: 0.000017
INFO:tensorflow:Step 3100 | Loss: 0.3864 | Spent: 83.6 secs | LR: 0.000017
INFO:tensorflow:Step 3200 | Loss: 0.3331 | Spent: 83.3 secs | LR: 0.000018
INFO:tensorflow:Step 3300 | Loss: 0.4306 | Spent: 83.5 secs | LR: 0.000018
INFO:tensorflow:Step 3400 | Loss: 0.4688 | Spent: 83.3 secs | LR: 0.000018
INFO:tensorflow:Step 3500 | Loss: 0.3335 | Spent: 83.5 secs | LR: 0.000018
INFO:tensorflow:Step 3600 | Loss: 0.5810 | Spent: 83.7 secs | LR: 0.000019
INFO:tensorflow:Step 3700 | Loss: 0.5849 | Spent: 83.3 secs | LR: 0.000019
INFO:tensorflow:Step 3800 | Loss: 0.3325 | Spent: 83.7 secs | LR: 0.000019
INFO:tensorflow:Step 3900 | Loss: 0.3306 | Spent: 83.4 secs | LR: 0.000019
INFO:tensorflow:Step 4000 | Loss: 0.3443 | Spent: 83.5 secs | LR: 0.000020
INFO:tensorflow:Step 4100 | Loss: 0.3787 | Spent: 83.3 secs | LR: 0.000020
Reading ../data/test.txt
INFO:tensorflow:Evaluation: Testing Accuracy: 0.938
INFO:tensorflow:Best Accuracy: 0.938
Reading ../data/train_bt_part1.txt
Reading ../data/train_bt_part2.txt
Reading ../data/train_bt_part3.txt
Reading ../data/train_bt_part4.txt
Reading ../data/train_bt_part5.txt
Reading ../data/train_bt_part6.txt
INFO:tensorflow:Step 4200 | Loss: 0.3426 | Spent: 711.8 secs | LR: 0.000020
INFO:tensorflow:Step 4300 | Loss: 0.3395 | Spent: 83.4 secs | LR: 0.000020
INFO:tensorflow:Step 4400 | Loss: 0.3284 | Spent: 83.5 secs | LR: 0.000021
INFO:tensorflow:Step 4500 | Loss: 0.3335 | Spent: 83.7 secs | LR: 0.000021
INFO:tensorflow:Step 4600 | Loss: 0.3545 | Spent: 83.7 secs | LR: 0.000021
INFO:tensorflow:Step 4700 | Loss: 0.4640 | Spent: 83.6 secs | LR: 0.000021
INFO:tensorflow:Step 4800 | Loss: 0.4347 | Spent: 83.6 secs | LR: 0.000022
INFO:tensorflow:Step 4900 | Loss: 0.3383 | Spent: 83.6 secs | LR: 0.000022
INFO:tensorflow:Step 5000 | Loss: 0.3312 | Spent: 83.7 secs | LR: 0.000022
INFO:tensorflow:Step 5100 | Loss: 0.4914 | Spent: 83.3 secs | LR: 0.000022
INFO:tensorflow:Step 5200 | Loss: 0.3925 | Spent: 83.5 secs | LR: 0.000022
INFO:tensorflow:Step 5300 | Loss: 0.4301 | Spent: 83.6 secs | LR: 0.000023
INFO:tensorflow:Step 5400 | Loss: 0.3266 | Spent: 83.3 secs | LR: 0.000023
INFO:tensorflow:Step 5500 | Loss: 0.3602 | Spent: 83.6 secs | LR: 0.000023
INFO:tensorflow:Step 5600 | Loss: 0.4258 | Spent: 83.4 secs | LR: 0.000023
INFO:tensorflow:Step 5700 | Loss: 0.3338 | Spent: 83.5 secs | LR: 0.000024
INFO:tensorflow:Step 5800 | Loss: 0.4832 | Spent: 83.7 secs | LR: 0.000024
INFO:tensorflow:Step 5900 | Loss: 0.3293 | Spent: 83.4 secs | LR: 0.000024
INFO:tensorflow:Step 6000 | Loss: 0.4269 | Spent: 83.4 secs | LR: 0.000024
INFO:tensorflow:Step 6100 | Loss: 0.3698 | Spent: 83.3 secs | LR: 0.000025
INFO:tensorflow:Step 6200 | Loss: 0.3412 | Spent: 83.4 secs | LR: 0.000025
INFO:tensorflow:Step 6300 | Loss: 0.3302 | Spent: 83.7 secs | LR: 0.000025
INFO:tensorflow:Step 6400 | Loss: 0.4071 | Spent: 83.5 secs | LR: 0.000025
INFO:tensorflow:Step 6500 | Loss: 0.4257 | Spent: 83.6 secs | LR: 0.000026
INFO:tensorflow:Step 6600 | Loss: 0.3856 | Spent: 83.7 secs | LR: 0.000026
INFO:tensorflow:Step 6700 | Loss: 0.4835 | Spent: 83.6 secs | LR: 0.000026
INFO:tensorflow:Step 6800 | Loss: 0.3802 | Spent: 83.5 secs | LR: 0.000026
INFO:tensorflow:Step 6900 | Loss: 0.4362 | Spent: 83.5 secs | LR: 0.000027
INFO:tensorflow:Step 7000 | Loss: 0.3332 | Spent: 83.6 secs | LR: 0.000027
INFO:tensorflow:Step 7100 | Loss: 0.4517 | Spent: 83.7 secs | LR: 0.000027
INFO:tensorflow:Step 7200 | Loss: 0.3346 | Spent: 83.4 secs | LR: 0.000027
INFO:tensorflow:Step 7300 | Loss: 0.3289 | Spent: 83.4 secs | LR: 0.000028
INFO:tensorflow:Step 7400 | Loss: 0.4561 | Spent: 83.5 secs | LR: 0.000028
INFO:tensorflow:Step 7500 | Loss: 0.4088 | Spent: 83.3 secs | LR: 0.000028
INFO:tensorflow:Step 7600 | Loss: 0.3728 | Spent: 83.4 secs | LR: 0.000028
INFO:tensorflow:Step 7700 | Loss: 0.3878 | Spent: 83.6 secs | LR: 0.000028
INFO:tensorflow:Step 7800 | Loss: 0.3287 | Spent: 83.4 secs | LR: 0.000029
INFO:tensorflow:Step 7900 | Loss: 0.3501 | Spent: 83.4 secs | LR: 0.000029
INFO:tensorflow:Step 8000 | Loss: 0.4411 | Spent: 83.5 secs | LR: 0.000029
INFO:tensorflow:Step 8100 | Loss: 0.4668 | Spent: 83.4 secs | LR: 0.000029
INFO:tensorflow:Step 8200 | Loss: 0.5002 | Spent: 83.4 secs | LR: 0.000030
INFO:tensorflow:Step 8300 | Loss: 0.3426 | Spent: 83.6 secs | LR: 0.000030
Reading ../data/test.txt
INFO:tensorflow:Evaluation: Testing Accuracy: 0.925
INFO:tensorflow:Best Accuracy: 0.938
Reading ../data/train_bt_part1.txt
Reading ../data/train_bt_part2.txt
Reading ../data/train_bt_part3.txt
Reading ../data/train_bt_part4.txt
Reading ../data/train_bt_part5.txt
Reading ../data/train_bt_part6.txt
INFO:tensorflow:Step 8400 | Loss: 0.3782 | Spent: 711.6 secs | LR: 0.000030
INFO:tensorflow:Step 8500 | Loss: 0.3477 | Spent: 83.5 secs | LR: 0.000030
INFO:tensorflow:Step 8600 | Loss: 0.4388 | Spent: 83.5 secs | LR: 0.000029
INFO:tensorflow:Step 8700 | Loss: 0.3257 | Spent: 83.6 secs | LR: 0.000029
INFO:tensorflow:Step 8800 | Loss: 0.3300 | Spent: 83.4 secs | LR: 0.000029
INFO:tensorflow:Step 8900 | Loss: 0.3551 | Spent: 83.4 secs | LR: 0.000029
INFO:tensorflow:Step 9000 | Loss: 0.3287 | Spent: 83.6 secs | LR: 0.000028
INFO:tensorflow:Step 9100 | Loss: 0.3283 | Spent: 83.2 secs | LR: 0.000028
INFO:tensorflow:Step 9200 | Loss: 0.3769 | Spent: 83.3 secs | LR: 0.000028
INFO:tensorflow:Step 9300 | Loss: 0.4496 | Spent: 83.5 secs | LR: 0.000028
INFO:tensorflow:Step 9400 | Loss: 0.3375 | Spent: 83.7 secs | LR: 0.000027
INFO:tensorflow:Step 9500 | Loss: 0.4315 | Spent: 83.5 secs | LR: 0.000027
INFO:tensorflow:Step 9600 | Loss: 0.3938 | Spent: 83.4 secs | LR: 0.000027
INFO:tensorflow:Step 9700 | Loss: 0.3263 | Spent: 83.5 secs | LR: 0.000027
INFO:tensorflow:Step 9800 | Loss: 0.3427 | Spent: 83.6 secs | LR: 0.000026
INFO:tensorflow:Step 9900 | Loss: 0.3275 | Spent: 83.5 secs | LR: 0.000026
INFO:tensorflow:Step 10000 | Loss: 0.3258 | Spent: 83.5 secs | LR: 0.000026
INFO:tensorflow:Step 10100 | Loss: 0.3267 | Spent: 83.5 secs | LR: 0.000026
INFO:tensorflow:Step 10200 | Loss: 0.3326 | Spent: 83.7 secs | LR: 0.000026
INFO:tensorflow:Step 10300 | Loss: 0.4221 | Spent: 83.4 secs | LR: 0.000025
INFO:tensorflow:Step 10400 | Loss: 0.3741 | Spent: 83.4 secs | LR: 0.000025
INFO:tensorflow:Step 10500 | Loss: 0.4243 | Spent: 83.7 secs | LR: 0.000025
INFO:tensorflow:Step 10600 | Loss: 0.3417 | Spent: 83.4 secs | LR: 0.000025
INFO:tensorflow:Step 10700 | Loss: 0.3272 | Spent: 83.6 secs | LR: 0.000024
INFO:tensorflow:Step 10800 | Loss: 0.3295 | Spent: 83.7 secs | LR: 0.000024
INFO:tensorflow:Step 10900 | Loss: 0.3266 | Spent: 83.4 secs | LR: 0.000024
INFO:tensorflow:Step 11000 | Loss: 0.3707 | Spent: 83.7 secs | LR: 0.000024
INFO:tensorflow:Step 11100 | Loss: 0.3259 | Spent: 83.5 secs | LR: 0.000023
INFO:tensorflow:Step 11200 | Loss: 0.3273 | Spent: 83.4 secs | LR: 0.000023
INFO:tensorflow:Step 11300 | Loss: 0.3877 | Spent: 83.6 secs | LR: 0.000023
INFO:tensorflow:Step 11400 | Loss: 0.3260 | Spent: 83.5 secs | LR: 0.000023
INFO:tensorflow:Step 11500 | Loss: 0.3276 | Spent: 83.4 secs | LR: 0.000022
INFO:tensorflow:Step 11600 | Loss: 0.3260 | Spent: 83.6 secs | LR: 0.000022
INFO:tensorflow:Step 11700 | Loss: 0.5391 | Spent: 83.6 secs | LR: 0.000022
INFO:tensorflow:Step 11800 | Loss: 0.4428 | Spent: 83.5 secs | LR: 0.000022
INFO:tensorflow:Step 11900 | Loss: 0.4807 | Spent: 83.2 secs | LR: 0.000021
INFO:tensorflow:Step 12000 | Loss: 0.3273 | Spent: 83.6 secs | LR: 0.000021
INFO:tensorflow:Step 12100 | Loss: 0.3261 | Spent: 83.5 secs | LR: 0.000021
INFO:tensorflow:Step 12200 | Loss: 0.3270 | Spent: 83.5 secs | LR: 0.000021
INFO:tensorflow:Step 12300 | Loss: 0.3273 | Spent: 83.5 secs | LR: 0.000020
INFO:tensorflow:Step 12400 | Loss: 0.3337 | Spent: 83.3 secs | LR: 0.000020
INFO:tensorflow:Step 12500 | Loss: 0.3269 | Spent: 83.2 secs | LR: 0.000020
Reading ../data/test.txt
INFO:tensorflow:Evaluation: Testing Accuracy: 0.932
INFO:tensorflow:Best Accuracy: 0.938
Reading ../data/train_bt_part1.txt
Reading ../data/train_bt_part2.txt
Reading ../data/train_bt_part3.txt
Reading ../data/train_bt_part4.txt
Reading ../data/train_bt_part5.txt
Reading ../data/train_bt_part6.txt
INFO:tensorflow:Step 12600 | Loss: 0.3257 | Spent: 704.9 secs | LR: 0.000020
INFO:tensorflow:Step 12700 | Loss: 0.3284 | Spent: 83.8 secs | LR: 0.000020
INFO:tensorflow:Step 12800 | Loss: 0.3260 | Spent: 83.4 secs | LR: 0.000019
INFO:tensorflow:Step 12900 | Loss: 0.3281 | Spent: 83.3 secs | LR: 0.000019
INFO:tensorflow:Step 13000 | Loss: 0.3263 | Spent: 83.5 secs | LR: 0.000019
INFO:tensorflow:Step 13100 | Loss: 0.3270 | Spent: 83.7 secs | LR: 0.000019
INFO:tensorflow:Step 13200 | Loss: 0.3256 | Spent: 83.3 secs | LR: 0.000018
INFO:tensorflow:Step 13300 | Loss: 0.3806 | Spent: 83.4 secs | LR: 0.000018
INFO:tensorflow:Step 13400 | Loss: 0.3259 | Spent: 83.6 secs | LR: 0.000018
INFO:tensorflow:Step 13500 | Loss: 0.3779 | Spent: 83.9 secs | LR: 0.000018
INFO:tensorflow:Step 13600 | Loss: 0.3481 | Spent: 83.5 secs | LR: 0.000017
INFO:tensorflow:Step 13700 | Loss: 0.3259 | Spent: 83.6 secs | LR: 0.000017
INFO:tensorflow:Step 13800 | Loss: 0.3360 | Spent: 83.5 secs | LR: 0.000017
INFO:tensorflow:Step 13900 | Loss: 0.3256 | Spent: 83.7 secs | LR: 0.000017
INFO:tensorflow:Step 14000 | Loss: 0.3260 | Spent: 83.9 secs | LR: 0.000016
INFO:tensorflow:Step 14100 | Loss: 0.3260 | Spent: 83.6 secs | LR: 0.000016
INFO:tensorflow:Step 14200 | Loss: 0.3831 | Spent: 83.9 secs | LR: 0.000016
INFO:tensorflow:Step 14300 | Loss: 0.3267 | Spent: 84.0 secs | LR: 0.000016
INFO:tensorflow:Step 14400 | Loss: 0.3974 | Spent: 83.9 secs | LR: 0.000015
INFO:tensorflow:Step 14500 | Loss: 0.3269 | Spent: 83.7 secs | LR: 0.000015
INFO:tensorflow:Step 14600 | Loss: 0.3265 | Spent: 83.9 secs | LR: 0.000015
INFO:tensorflow:Step 14700 | Loss: 0.3254 | Spent: 83.9 secs | LR: 0.000015
INFO:tensorflow:Step 14800 | Loss: 0.3272 | Spent: 83.9 secs | LR: 0.000014
INFO:tensorflow:Step 14900 | Loss: 0.3263 | Spent: 83.6 secs | LR: 0.000014
INFO:tensorflow:Step 15000 | Loss: 0.3255 | Spent: 83.8 secs | LR: 0.000014
INFO:tensorflow:Step 15100 | Loss: 0.3503 | Spent: 83.8 secs | LR: 0.000014
INFO:tensorflow:Step 15200 | Loss: 0.4100 | Spent: 83.8 secs | LR: 0.000014
INFO:tensorflow:Step 15300 | Loss: 0.3274 | Spent: 83.7 secs | LR: 0.000013
INFO:tensorflow:Step 15400 | Loss: 0.3258 | Spent: 83.8 secs | LR: 0.000013
INFO:tensorflow:Step 15500 | Loss: 0.3254 | Spent: 83.6 secs | LR: 0.000013
INFO:tensorflow:Step 15600 | Loss: 0.3255 | Spent: 83.7 secs | LR: 0.000013
INFO:tensorflow:Step 15700 | Loss: 0.4121 | Spent: 83.8 secs | LR: 0.000012
INFO:tensorflow:Step 15800 | Loss: 0.3255 | Spent: 83.8 secs | LR: 0.000012
INFO:tensorflow:Step 15900 | Loss: 0.3255 | Spent: 83.6 secs | LR: 0.000012
INFO:tensorflow:Step 16000 | Loss: 0.3257 | Spent: 83.4 secs | LR: 0.000012
INFO:tensorflow:Step 16100 | Loss: 0.3257 | Spent: 83.9 secs | LR: 0.000011
INFO:tensorflow:Step 16200 | Loss: 0.3260 | Spent: 83.8 secs | LR: 0.000011
INFO:tensorflow:Step 16300 | Loss: 0.3259 | Spent: 83.7 secs | LR: 0.000011
INFO:tensorflow:Step 16400 | Loss: 0.3270 | Spent: 83.8 secs | LR: 0.000011
INFO:tensorflow:Step 16500 | Loss: 0.3263 | Spent: 83.8 secs | LR: 0.000010
INFO:tensorflow:Step 16600 | Loss: 0.3256 | Spent: 83.9 secs | LR: 0.000010
Reading ../data/test.txt
INFO:tensorflow:Evaluation: Testing Accuracy: 0.935
INFO:tensorflow:Best Accuracy: 0.938
Reading ../data/train_bt_part1.txt
Reading ../data/train_bt_part2.txt