In [1]:
from google.colab import drive
drive.mount('/content/gdrive')
import os
os.chdir('/content/gdrive/My Drive/finch/tensorflow2/text_matching/joint/main')
Mounted at /content/gdrive
In [2]:
%tensorflow_version 2.x
!pip install transformers
Collecting transformers
  Downloading https://files.pythonhosted.org/packages/ed/db/98c3ea1a78190dac41c0127a063abf92bd01b4b0b6970a6db1c2f5b66fa0/transformers-4.0.1-py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 9.4MB/s 
Collecting tokenizers==0.9.4
  Downloading https://files.pythonhosted.org/packages/0f/1c/e789a8b12e28be5bc1ce2156cf87cb522b379be9cadc7ad8091a4cc107c4/tokenizers-0.9.4-cp36-cp36m-manylinux2010_x86_64.whl (2.9MB)
     |████████████████████████████████| 2.9MB 31.5MB/s 
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from transformers) (2.23.0)
Requirement already satisfied: dataclasses; python_version < "3.7" in /usr/local/lib/python3.6/dist-packages (from transformers) (0.8)
Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.6/dist-packages (from transformers) (4.41.1)
Requirement already satisfied: filelock in /usr/local/lib/python3.6/dist-packages (from transformers) (3.0.12)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.6/dist-packages (from transformers) (2019.12.20)
Collecting sacremoses
  Downloading https://files.pythonhosted.org/packages/7d/34/09d19aff26edcc8eb2a01bed8e98f13a1537005d31e95233fd48216eed10/sacremoses-0.0.43.tar.gz (883kB)
     |████████████████████████████████| 890kB 47.2MB/s 
Requirement already satisfied: packaging in /usr/local/lib/python3.6/dist-packages (from transformers) (20.7)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from transformers) (1.18.5)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (2.10)
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: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->transformers) (3.0.4)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from sacremoses->transformers) (1.15.0)
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.17.0)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.6/dist-packages (from packaging->transformers) (2.4.7)
Building wheels for collected packages: sacremoses
  Building wheel for sacremoses (setup.py) ... done
  Created wheel for sacremoses: filename=sacremoses-0.0.43-cp36-none-any.whl size=893261 sha256=db926fe369ae04cb563498eecc624643ab4c839ab79962ec8f655bcbd54d97e3
  Stored in directory: /root/.cache/pip/wheels/29/3c/fd/7ce5c3f0666dab31a50123635e6fb5e19ceb42ce38d4e58f45
Successfully built sacremoses
Installing collected packages: tokenizers, sacremoses, transformers
Successfully installed sacremoses-0.0.43 tokenizers-0.9.4 transformers-4.0.1
In [3]:
from transformers import BertTokenizer, TFBertModel
from sklearn.metrics import classification_report

import tensorflow as tf
import tensorflow_addons as tfa
import numpy as np
import pprint
import logging
import time
import math
import json
import csv

print("TensorFlow Version", tf.__version__)
print('GPU Enabled:', tf.test.is_gpu_available())
TensorFlow Version 2.3.0
WARNING:tensorflow:From <ipython-input-3-1f766395fbf4>:15: 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 [ ]:
params = {
  'pretrain_path': 'bert-base-chinese',
  'train_path': '../data/train.json',
  'test_path': '../data/dev.json',
  'batch_size': 32,
  'max_len': 128,
  'buffer_size': 34334 + 100000,
  'init_lr': 1e-5,
  'max_lr': 3e-5,
  'n_epochs': 12,
  'clip_norm': 5.,
  'label_smooth': .0,
  'num_patience': 7,
}

tokenizer = BertTokenizer.from_pretrained(params['pretrain_path'],
                                          lowercase = True,
                                          add_special_tokens = True)
In [5]:
def get_vocab(f_path):
  k2v = {}
  with open(f_path) as f:
    for i, line in enumerate(f):
      line = line.rstrip()
      k2v[line] = i
  return k2v
In [6]:
def data_gen_cs():
  f_path = '../data/test.csv'
  with open(f_path) as f:
    print('Reading', f_path)
    for i, line in enumerate(csv.reader(f, delimiter=',')):
      if i == 0:
        continue
      text1, text2, label = line
      if len(text1) + len(text2) + 3 > params['max_len']:
        _max_len = (params['max_len'] - 3) // 2
        text1 = text1[:_max_len]
        text2 = text2[:_max_len]
      text1 = list(text1)
      text2 = list(text2)
      text = ['[CLS]'] + text1 + ['[SEP]'] + text2 + ['[SEP]']
      seg = [0] + [0] * len(text1) + [0] + [1] * len(text2) + [1]
      text = tokenizer.convert_tokens_to_ids(text)
      yield ((text, seg), int(label))


def data_gen_js():
  f_path = '../data/dev.json'
  with open(f_path) as f:
    print('Reading', f_path)
    for line in f:
      line = json.loads(line.rstrip())
      text1, text2, label = line['sentence1'], line['sentence2'], line['label']
      if len(text1) + len(text2) + 3 > params['max_len']:
        _max_len = (params['max_len'] - 3) // 2
        text1 = text1[:_max_len]
        text2 = text2[:_max_len]
      text1 = list(text1)
      text2 = list(text2)
      text = ['[CLS]'] + text1 + ['[SEP]'] + text2 + ['[SEP]']
      seg = [0] + [0] * len(text1) + [0] + [1] * len(text2) + [1]
      text = tokenizer.convert_tokens_to_ids(text)
      yield ((text, seg), int(label))


def joint_data_gen():
  f_path = '../data/train.csv'
  with open(f_path) as f:
    print('Reading', f_path)
    for i, line in enumerate(csv.reader(f, delimiter=',')):
      if i == 0:
        continue
      text1, text2, label = line
      if len(text1) + len(text2) + 3 > params['max_len']:
        _max_len = (params['max_len'] - 3) // 2
        text1 = text1[:_max_len]
        text2 = text2[:_max_len]
      text1 = list(text1)
      text2 = list(text2)
      text = ['[CLS]'] + text1 + ['[SEP]'] + text2 + ['[SEP]']
      seg = [0] + [0] * len(text1) + [0] + [1] * len(text2) + [1]
      text = tokenizer.convert_tokens_to_ids(text)
      yield ((text, seg), int(label))
  f_path = '../data/train.json'
  with open(f_path) as f:
    print('Reading', f_path)
    for line in f:
      line = json.loads(line.rstrip())
      text1, text2, label = line['sentence1'], line['sentence2'], line['label']
      if len(text1) + len(text2) + 3 > params['max_len']:
        _max_len = (params['max_len'] - 3) // 2
        text1 = text1[:_max_len]
        text2 = text2[:_max_len]
      text1 = list(text1)
      text2 = list(text2)
      text = ['[CLS]'] + text1 + ['[SEP]'] + text2 + ['[SEP]']
      seg = [0] + [0] * len(text1) + [0] + [1] * len(text2) + [1]
      text = tokenizer.convert_tokens_to_ids(text)
      yield ((text, seg), int(label))
In [7]:
def get_datasets(params):
  _shapes = (([None], [None]), ())
  _types = ((tf.int32, tf.int32), tf.int32)
  _pads = ((0, 0), -1)
  
  ds_train = tf.data.Dataset.from_generator(
    lambda: joint_data_gen(),
    output_shapes = _shapes,
    output_types = _types,)
  ds_train = ds_train.shuffle(params['buffer_size'])
  ds_train = ds_train.padded_batch(params['batch_size'], _shapes, _pads)
  ds_train = ds_train.prefetch(tf.data.experimental.AUTOTUNE)

  ds_test_js = tf.data.Dataset.from_generator(
    lambda: data_gen_js(),
    output_shapes = _shapes,
    output_types = _types,)
  ds_test_js = ds_test_js.padded_batch(params['batch_size'], _shapes, _pads)
  ds_test_js = ds_test_js.prefetch(tf.data.experimental.AUTOTUNE)

  ds_test_cs = tf.data.Dataset.from_generator(
    lambda: data_gen_cs(),
    output_shapes = _shapes,
    output_types = _types,)
  ds_test_cs = ds_test_cs.padded_batch(params['batch_size'], _shapes, _pads)
  ds_test_cs = ds_test_cs.prefetch(tf.data.experimental.AUTOTUNE)
  
  return ds_train, ds_test_js, ds_test_cs
In [8]:
# input stream ids check
(text, seg), _ = next(joint_data_gen())
print(text)
print(seg)
Reading ../data/train.csv
[101, 4500, 2544, 928, 6963, 127, 2399, 8024, 2544, 928, 3766, 3300, 2544, 5108, 6587, 1216, 5543, 102, 125, 511, 100, 100, 1384, 4772, 3341, 2544, 5108, 6587, 102]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
In [9]:
class BertFinetune(tf.keras.Model):
  def __init__(self, params):
    super(BertFinetune, self).__init__()
    self.bert = TFBertModel.from_pretrained(params['pretrain_path'],
                                            trainable = True)
    self.bert.load_weights('../model/bert_further_pretrain.h5',
                           by_name = True,
                           skip_mismatch = 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(1, 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)
    x = x[1]
    x = self.drop_1(x, training=training)
    x = self.fc(x)
    x = self.drop_2(x, training=training)
    x = self.out(x)
    x = tf.squeeze(x, 1)
    return x
In [ ]:
model = BertFinetune(params)
model.build([[None, None], [None, None], [None, None]])
print(model.weights[5])
In [11]:
def label_smoothing(label, smooth):
  if smooth > 0.:
    return label * (1 - smooth) + 0.5 * smooth
  else:
    return label
In [12]:
decay_lr = tfa.optimizers.Triangular2CyclicalLearningRate(
  initial_learning_rate = params['init_lr'],
  maximal_learning_rate = params['max_lr'],
  step_size = 2 * params['buffer_size'] // params['batch_size'],)
optim = tf.optimizers.Adam(params['init_lr'])
global_step = 0

best_acc, best_acc1, best_acc2 = .0, .0, .0
count = 0

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

for _ in range(params['n_epochs']):
  ds_train, ds_test_js, ds_test_cs = get_datasets(params)

  # TRAINING
  for ((text, seg), labels) in ds_train:
    with tf.GradientTape() as tape:
      logits = model([text, tf.sign(text), seg], training=True)
      labels = tf.cast(labels, tf.float32)
      num_neg = tf.reduce_sum(tf.cast(tf.equal(labels, 0.), tf.float32)).numpy()
      num_pos = tf.reduce_sum(labels).numpy()
      if num_pos == 0.:
        pos_weight = 1.
      else:
        pos_weight = num_neg / num_pos
      loss = tf.reduce_mean(tf.nn.weighted_cross_entropy_with_logits(
        labels = label_smoothing(labels, params['label_smooth']),
        logits = logits,
        pos_weight = pos_weight))
    
    optim.lr.assign(decay_lr(global_step))
    grads = tape.gradient(loss, model.trainable_variables)
    grads, _ = tf.clip_by_global_norm(grads, params['clip_norm'])
    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 1
  m = tf.keras.metrics.Accuracy()
  intent_true = []
  intent_pred = []

  for ((text, seg), labels) in ds_test_cs:
    logits = tf.sigmoid(model([text, tf.sign(text), seg], training=False))
    y_pred = tf.cast(tf.math.greater_equal(logits, .5), tf.int32)
    m.update_state(y_true=labels, y_pred=y_pred)
    intent_true += labels.numpy().flatten().tolist()
    intent_pred += y_pred.numpy().flatten().tolist()

  acc_1 = m.result().numpy()
  logger.info('测试集:微众银行智能客服')
  logger.info("Evaluation: Testing Accuracy: {:.3f}".format(acc_1))
  logger.info('\n'+classification_report(y_true = intent_true,
                                         y_pred = intent_pred,
                                         labels = [0, 1],
                                         target_names = ['Not Matched', 'Matched'],
                                         digits = 3))

  # EVALUATION 2
  m = tf.keras.metrics.Accuracy()
  intent_true = []
  intent_pred = []

  for ((text, seg), labels) in ds_test_js:
    logits = tf.sigmoid(model([text, tf.sign(text), seg], training=False))
    y_pred = tf.cast(tf.math.greater_equal(logits, .5), tf.int32)
    m.update_state(y_true=labels, y_pred=y_pred)
    intent_true += labels.numpy().flatten().tolist()
    intent_pred += y_pred.numpy().flatten().tolist()

  acc_2 = m.result().numpy()
  logger.info('测试集:蚂蚁金融语义相似度')
  logger.info("Evaluation: Testing Accuracy: {:.3f}".format(acc_2))
  logger.info('\n'+classification_report(y_true = intent_true,
                                         y_pred = intent_pred,
                                         labels = [0, 1],
                                         target_names = ['Not Matched', 'Matched'],
                                         digits = 3))

  # Define Where To Save Model and Stop Training
  acc = (acc_1 + acc_2) / 2.
  if acc > best_acc:
    best_acc = acc
    best_acc1 = acc_1
    best_acc2 = acc_2
    # you can save model here
    count = 0
  else:
    count += 1
  logger.info("Best | Accuracy 1: {:.3f} | Accuracy 2: {:.3f}".format(best_acc1, best_acc2))

  if count == params['num_patience']:
    print(params['num_patience'], "times not improve the best result, therefore stop training")
    break
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 0 | Loss: 0.7784 | Spent: 27.4 secs | LR: 0.000010
INFO:tensorflow:Step 100 | Loss: 0.8832 | Spent: 46.1 secs | LR: 0.000010
INFO:tensorflow:Step 200 | Loss: 0.5383 | Spent: 47.7 secs | LR: 0.000010
INFO:tensorflow:Step 300 | Loss: 0.6406 | Spent: 47.2 secs | LR: 0.000011
INFO:tensorflow:Step 400 | Loss: 0.6399 | Spent: 49.1 secs | LR: 0.000011
INFO:tensorflow:Step 500 | Loss: 0.9353 | Spent: 47.1 secs | LR: 0.000011
INFO:tensorflow:Step 600 | Loss: 0.4126 | Spent: 50.4 secs | LR: 0.000011
INFO:tensorflow:Step 700 | Loss: 0.6038 | Spent: 48.2 secs | LR: 0.000012
INFO:tensorflow:Step 800 | Loss: 0.5432 | Spent: 48.0 secs | LR: 0.000012
INFO:tensorflow:Step 900 | Loss: 0.3036 | Spent: 50.1 secs | LR: 0.000012
INFO:tensorflow:Step 1000 | Loss: 0.5074 | Spent: 50.8 secs | LR: 0.000012
INFO:tensorflow:Step 1100 | Loss: 0.3195 | Spent: 50.6 secs | LR: 0.000013
INFO:tensorflow:Step 1200 | Loss: 0.4476 | Spent: 51.3 secs | LR: 0.000013
INFO:tensorflow:Step 1300 | Loss: 0.4552 | Spent: 47.9 secs | LR: 0.000013
INFO:tensorflow:Step 1400 | Loss: 0.3303 | Spent: 49.1 secs | LR: 0.000013
INFO:tensorflow:Step 1500 | Loss: 0.2335 | Spent: 50.5 secs | LR: 0.000014
INFO:tensorflow:Step 1600 | Loss: 0.7818 | Spent: 48.4 secs | LR: 0.000014
INFO:tensorflow:Step 1700 | Loss: 0.3589 | Spent: 49.9 secs | LR: 0.000014
INFO:tensorflow:Step 1800 | Loss: 0.3399 | Spent: 48.0 secs | LR: 0.000014
INFO:tensorflow:Step 1900 | Loss: 0.3663 | Spent: 48.9 secs | LR: 0.000015
INFO:tensorflow:Step 2000 | Loss: 0.4111 | Spent: 49.7 secs | LR: 0.000015
INFO:tensorflow:Step 2100 | Loss: 0.6228 | Spent: 51.0 secs | LR: 0.000015
INFO:tensorflow:Step 2200 | Loss: 0.5089 | Spent: 48.8 secs | LR: 0.000015
INFO:tensorflow:Step 2300 | Loss: 0.4590 | Spent: 48.7 secs | LR: 0.000015
INFO:tensorflow:Step 2400 | Loss: 0.7575 | Spent: 50.2 secs | LR: 0.000016
INFO:tensorflow:Step 2500 | Loss: 0.4457 | Spent: 50.2 secs | LR: 0.000016
INFO:tensorflow:Step 2600 | Loss: 0.2291 | Spent: 50.5 secs | LR: 0.000016
INFO:tensorflow:Step 2700 | Loss: 0.3989 | Spent: 51.4 secs | LR: 0.000016
INFO:tensorflow:Step 2800 | Loss: 0.2946 | Spent: 49.7 secs | LR: 0.000017
INFO:tensorflow:Step 2900 | Loss: 0.3931 | Spent: 50.5 secs | LR: 0.000017
INFO:tensorflow:Step 3000 | Loss: 0.3190 | Spent: 49.8 secs | LR: 0.000017
INFO:tensorflow:Step 3100 | Loss: 0.1471 | Spent: 49.1 secs | LR: 0.000017
INFO:tensorflow:Step 3200 | Loss: 0.2489 | Spent: 50.0 secs | LR: 0.000018
INFO:tensorflow:Step 3300 | Loss: 0.5769 | Spent: 50.3 secs | LR: 0.000018
INFO:tensorflow:Step 3400 | Loss: 0.3740 | Spent: 49.6 secs | LR: 0.000018
INFO:tensorflow:Step 3500 | Loss: 0.3430 | Spent: 48.6 secs | LR: 0.000018
INFO:tensorflow:Step 3600 | Loss: 0.3908 | Spent: 49.1 secs | LR: 0.000019
INFO:tensorflow:Step 3700 | Loss: 0.5855 | Spent: 48.9 secs | LR: 0.000019
INFO:tensorflow:Step 3800 | Loss: 0.7022 | Spent: 47.7 secs | LR: 0.000019
INFO:tensorflow:Step 3900 | Loss: 0.2619 | Spent: 48.4 secs | LR: 0.000019
INFO:tensorflow:Step 4000 | Loss: 0.3813 | Spent: 50.6 secs | LR: 0.000020
INFO:tensorflow:Step 4100 | Loss: 0.2032 | Spent: 48.4 secs | LR: 0.000020
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.844
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.838     0.853     0.846      5000
     Matched      0.851     0.835     0.843      5000

    accuracy                          0.844     10000
   macro avg      0.844     0.844     0.844     10000
weighted avg      0.844     0.844     0.844     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.733
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.816     0.791     0.803      2978
     Matched      0.565     0.602     0.582      1338

    accuracy                          0.733      4316
   macro avg      0.690     0.697     0.693      4316
weighted avg      0.738     0.733     0.735      4316

INFO:tensorflow:Best | Accuracy 1: 0.844 | Accuracy 2: 0.733
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 4200 | Loss: 0.2571 | Spent: 142.8 secs | LR: 0.000020
INFO:tensorflow:Step 4300 | Loss: 0.2499 | Spent: 47.4 secs | LR: 0.000020
INFO:tensorflow:Step 4400 | Loss: 0.1923 | Spent: 48.8 secs | LR: 0.000020
INFO:tensorflow:Step 4500 | Loss: 0.4942 | Spent: 49.7 secs | LR: 0.000021
INFO:tensorflow:Step 4600 | Loss: 0.3592 | Spent: 49.7 secs | LR: 0.000021
INFO:tensorflow:Step 4700 | Loss: 0.6035 | Spent: 50.4 secs | LR: 0.000021
INFO:tensorflow:Step 4800 | Loss: 0.2810 | Spent: 48.7 secs | LR: 0.000021
INFO:tensorflow:Step 4900 | Loss: 0.2995 | Spent: 51.2 secs | LR: 0.000022
INFO:tensorflow:Step 5000 | Loss: 0.7275 | Spent: 48.7 secs | LR: 0.000022
INFO:tensorflow:Step 5100 | Loss: 0.2977 | Spent: 49.4 secs | LR: 0.000022
INFO:tensorflow:Step 5200 | Loss: 0.2473 | Spent: 48.2 secs | LR: 0.000022
INFO:tensorflow:Step 5300 | Loss: 0.2435 | Spent: 50.1 secs | LR: 0.000023
INFO:tensorflow:Step 5400 | Loss: 0.1572 | Spent: 48.7 secs | LR: 0.000023
INFO:tensorflow:Step 5500 | Loss: 0.1835 | Spent: 49.1 secs | LR: 0.000023
INFO:tensorflow:Step 5600 | Loss: 0.3237 | Spent: 49.9 secs | LR: 0.000023
INFO:tensorflow:Step 5700 | Loss: 0.1626 | Spent: 47.5 secs | LR: 0.000024
INFO:tensorflow:Step 5800 | Loss: 0.2549 | Spent: 50.9 secs | LR: 0.000024
INFO:tensorflow:Step 5900 | Loss: 0.3747 | Spent: 50.0 secs | LR: 0.000024
INFO:tensorflow:Step 6000 | Loss: 0.1489 | Spent: 49.9 secs | LR: 0.000024
INFO:tensorflow:Step 6100 | Loss: 0.5200 | Spent: 51.2 secs | LR: 0.000025
INFO:tensorflow:Step 6200 | Loss: 0.3587 | Spent: 50.6 secs | LR: 0.000025
INFO:tensorflow:Step 6300 | Loss: 0.3544 | Spent: 49.2 secs | LR: 0.000025
INFO:tensorflow:Step 6400 | Loss: 0.6448 | Spent: 50.7 secs | LR: 0.000025
INFO:tensorflow:Step 6500 | Loss: 0.1836 | Spent: 49.8 secs | LR: 0.000025
INFO:tensorflow:Step 6600 | Loss: 0.2386 | Spent: 48.2 secs | LR: 0.000026
INFO:tensorflow:Step 6700 | Loss: 0.4757 | Spent: 49.2 secs | LR: 0.000026
INFO:tensorflow:Step 6800 | Loss: 0.3697 | Spent: 49.2 secs | LR: 0.000026
INFO:tensorflow:Step 6900 | Loss: 0.4448 | Spent: 47.7 secs | LR: 0.000026
INFO:tensorflow:Step 7000 | Loss: 0.1985 | Spent: 49.0 secs | LR: 0.000027
INFO:tensorflow:Step 7100 | Loss: 0.1671 | Spent: 48.0 secs | LR: 0.000027
INFO:tensorflow:Step 7200 | Loss: 0.3128 | Spent: 47.2 secs | LR: 0.000027
INFO:tensorflow:Step 7300 | Loss: 0.2657 | Spent: 49.6 secs | LR: 0.000027
INFO:tensorflow:Step 7400 | Loss: 0.1734 | Spent: 49.3 secs | LR: 0.000028
INFO:tensorflow:Step 7500 | Loss: 0.1153 | Spent: 51.3 secs | LR: 0.000028
INFO:tensorflow:Step 7600 | Loss: 0.3556 | Spent: 49.1 secs | LR: 0.000028
INFO:tensorflow:Step 7700 | Loss: 0.3042 | Spent: 49.9 secs | LR: 0.000028
INFO:tensorflow:Step 7800 | Loss: 0.6914 | Spent: 49.7 secs | LR: 0.000029
INFO:tensorflow:Step 7900 | Loss: 0.2493 | Spent: 51.4 secs | LR: 0.000029
INFO:tensorflow:Step 8000 | Loss: 0.3825 | Spent: 48.9 secs | LR: 0.000029
INFO:tensorflow:Step 8100 | Loss: 0.2550 | Spent: 50.3 secs | LR: 0.000029
INFO:tensorflow:Step 8200 | Loss: 0.3216 | Spent: 50.0 secs | LR: 0.000030
INFO:tensorflow:Step 8300 | Loss: 0.2281 | Spent: 50.5 secs | LR: 0.000030
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.843
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.836     0.853     0.844      5000
     Matched      0.850     0.832     0.841      5000

    accuracy                          0.843     10000
   macro avg      0.843     0.843     0.843     10000
weighted avg      0.843     0.843     0.843     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.731
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.825     0.774     0.799      2978
     Matched      0.558     0.634     0.593      1338

    accuracy                          0.731      4316
   macro avg      0.691     0.704     0.696      4316
weighted avg      0.742     0.731     0.735      4316

INFO:tensorflow:Best | Accuracy 1: 0.844 | Accuracy 2: 0.733
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 8400 | Loss: 0.1482 | Spent: 139.3 secs | LR: 0.000030
INFO:tensorflow:Step 8500 | Loss: 0.2889 | Spent: 50.0 secs | LR: 0.000030
INFO:tensorflow:Step 8600 | Loss: 0.2364 | Spent: 47.5 secs | LR: 0.000030
INFO:tensorflow:Step 8700 | Loss: 0.2454 | Spent: 48.3 secs | LR: 0.000029
INFO:tensorflow:Step 8800 | Loss: 0.4543 | Spent: 49.1 secs | LR: 0.000029
INFO:tensorflow:Step 8900 | Loss: 0.4849 | Spent: 50.6 secs | LR: 0.000029
INFO:tensorflow:Step 9000 | Loss: 0.3575 | Spent: 48.8 secs | LR: 0.000029
INFO:tensorflow:Step 9100 | Loss: 0.2759 | Spent: 50.2 secs | LR: 0.000028
INFO:tensorflow:Step 9200 | Loss: 0.0970 | Spent: 50.5 secs | LR: 0.000028
INFO:tensorflow:Step 9300 | Loss: 0.1265 | Spent: 48.7 secs | LR: 0.000028
INFO:tensorflow:Step 9400 | Loss: 0.1612 | Spent: 49.0 secs | LR: 0.000028
INFO:tensorflow:Step 9500 | Loss: 0.2093 | Spent: 48.5 secs | LR: 0.000027
INFO:tensorflow:Step 9600 | Loss: 0.5823 | Spent: 50.5 secs | LR: 0.000027
INFO:tensorflow:Step 9700 | Loss: 0.1217 | Spent: 48.6 secs | LR: 0.000027
INFO:tensorflow:Step 9800 | Loss: 0.3581 | Spent: 50.0 secs | LR: 0.000027
INFO:tensorflow:Step 9900 | Loss: 0.3706 | Spent: 47.7 secs | LR: 0.000026
INFO:tensorflow:Step 10000 | Loss: 0.1083 | Spent: 49.9 secs | LR: 0.000026
INFO:tensorflow:Step 10100 | Loss: 0.0988 | Spent: 50.2 secs | LR: 0.000026
INFO:tensorflow:Step 10200 | Loss: 0.0515 | Spent: 48.9 secs | LR: 0.000026
INFO:tensorflow:Step 10300 | Loss: 0.0819 | Spent: 50.9 secs | LR: 0.000025
INFO:tensorflow:Step 10400 | Loss: 0.5939 | Spent: 49.4 secs | LR: 0.000025
INFO:tensorflow:Step 10500 | Loss: 0.0807 | Spent: 50.0 secs | LR: 0.000025
INFO:tensorflow:Step 10600 | Loss: 0.1871 | Spent: 48.0 secs | LR: 0.000025
INFO:tensorflow:Step 10700 | Loss: 0.1516 | Spent: 49.7 secs | LR: 0.000025
INFO:tensorflow:Step 10800 | Loss: 0.1453 | Spent: 48.8 secs | LR: 0.000024
INFO:tensorflow:Step 10900 | Loss: 0.2379 | Spent: 48.9 secs | LR: 0.000024
INFO:tensorflow:Step 11000 | Loss: 0.2347 | Spent: 49.8 secs | LR: 0.000024
INFO:tensorflow:Step 11100 | Loss: 0.4125 | Spent: 47.9 secs | LR: 0.000024
INFO:tensorflow:Step 11200 | Loss: 0.2726 | Spent: 48.1 secs | LR: 0.000023
INFO:tensorflow:Step 11300 | Loss: 0.0905 | Spent: 50.7 secs | LR: 0.000023
INFO:tensorflow:Step 11400 | Loss: 0.0769 | Spent: 51.8 secs | LR: 0.000023
INFO:tensorflow:Step 11500 | Loss: 0.1278 | Spent: 50.5 secs | LR: 0.000023
INFO:tensorflow:Step 11600 | Loss: 0.4927 | Spent: 48.5 secs | LR: 0.000022
INFO:tensorflow:Step 11700 | Loss: 0.2632 | Spent: 50.0 secs | LR: 0.000022
INFO:tensorflow:Step 11800 | Loss: 0.2255 | Spent: 50.6 secs | LR: 0.000022
INFO:tensorflow:Step 11900 | Loss: 0.2409 | Spent: 49.4 secs | LR: 0.000022
INFO:tensorflow:Step 12000 | Loss: 0.1832 | Spent: 48.6 secs | LR: 0.000021
INFO:tensorflow:Step 12100 | Loss: 0.1846 | Spent: 50.5 secs | LR: 0.000021
INFO:tensorflow:Step 12200 | Loss: 0.2690 | Spent: 50.5 secs | LR: 0.000021
INFO:tensorflow:Step 12300 | Loss: 0.2147 | Spent: 48.2 secs | LR: 0.000021
INFO:tensorflow:Step 12400 | Loss: 0.2739 | Spent: 48.3 secs | LR: 0.000020
INFO:tensorflow:Step 12500 | Loss: 0.0699 | Spent: 48.1 secs | LR: 0.000020
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.843
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.823     0.875     0.848      5000
     Matched      0.867     0.811     0.838      5000

    accuracy                          0.843     10000
   macro avg      0.845     0.843     0.843     10000
weighted avg      0.845     0.843     0.843     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.744
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.805     0.829     0.817      2978
     Matched      0.593     0.553     0.572      1338

    accuracy                          0.744      4316
   macro avg      0.699     0.691     0.695      4316
weighted avg      0.739     0.744     0.741      4316

INFO:tensorflow:Best | Accuracy 1: 0.843 | Accuracy 2: 0.744
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 12600 | Loss: 0.1094 | Spent: 138.9 secs | LR: 0.000020
INFO:tensorflow:Step 12700 | Loss: 0.1023 | Spent: 49.4 secs | LR: 0.000020
INFO:tensorflow:Step 12800 | Loss: 0.3635 | Spent: 49.4 secs | LR: 0.000020
INFO:tensorflow:Step 12900 | Loss: 0.1095 | Spent: 49.3 secs | LR: 0.000019
INFO:tensorflow:Step 13000 | Loss: 0.0491 | Spent: 50.2 secs | LR: 0.000019
INFO:tensorflow:Step 13100 | Loss: 0.0613 | Spent: 47.8 secs | LR: 0.000019
INFO:tensorflow:Step 13200 | Loss: 0.2893 | Spent: 49.5 secs | LR: 0.000019
INFO:tensorflow:Step 13300 | Loss: 0.2261 | Spent: 48.1 secs | LR: 0.000018
INFO:tensorflow:Step 13400 | Loss: 0.2145 | Spent: 48.5 secs | LR: 0.000018
INFO:tensorflow:Step 13500 | Loss: 0.2511 | Spent: 49.3 secs | LR: 0.000018
INFO:tensorflow:Step 13600 | Loss: 0.0402 | Spent: 48.5 secs | LR: 0.000018
INFO:tensorflow:Step 13700 | Loss: 0.0373 | Spent: 48.8 secs | LR: 0.000017
INFO:tensorflow:Step 13800 | Loss: 0.1112 | Spent: 49.0 secs | LR: 0.000017
INFO:tensorflow:Step 13900 | Loss: 0.1041 | Spent: 49.5 secs | LR: 0.000017
INFO:tensorflow:Step 14000 | Loss: 0.1625 | Spent: 49.6 secs | LR: 0.000017
INFO:tensorflow:Step 14100 | Loss: 0.0705 | Spent: 50.3 secs | LR: 0.000016
INFO:tensorflow:Step 14200 | Loss: 0.0899 | Spent: 50.1 secs | LR: 0.000016
INFO:tensorflow:Step 14300 | Loss: 0.0526 | Spent: 49.9 secs | LR: 0.000016
INFO:tensorflow:Step 14400 | Loss: 0.1343 | Spent: 49.8 secs | LR: 0.000016
INFO:tensorflow:Step 14500 | Loss: 0.0158 | Spent: 48.0 secs | LR: 0.000015
INFO:tensorflow:Step 14600 | Loss: 0.1756 | Spent: 47.0 secs | LR: 0.000015
INFO:tensorflow:Step 14700 | Loss: 0.1254 | Spent: 50.5 secs | LR: 0.000015
INFO:tensorflow:Step 14800 | Loss: 0.2805 | Spent: 48.8 secs | LR: 0.000015
INFO:tensorflow:Step 14900 | Loss: 0.1259 | Spent: 49.1 secs | LR: 0.000015
INFO:tensorflow:Step 15000 | Loss: 0.2444 | Spent: 49.6 secs | LR: 0.000014
INFO:tensorflow:Step 15100 | Loss: 0.1336 | Spent: 51.6 secs | LR: 0.000014
INFO:tensorflow:Step 15200 | Loss: 0.0832 | Spent: 50.0 secs | LR: 0.000014
INFO:tensorflow:Step 15300 | Loss: 0.1533 | Spent: 49.6 secs | LR: 0.000014
INFO:tensorflow:Step 15400 | Loss: 0.1261 | Spent: 48.8 secs | LR: 0.000013
INFO:tensorflow:Step 15500 | Loss: 0.0403 | Spent: 49.2 secs | LR: 0.000013
INFO:tensorflow:Step 15600 | Loss: 0.1478 | Spent: 48.1 secs | LR: 0.000013
INFO:tensorflow:Step 15700 | Loss: 0.3424 | Spent: 47.8 secs | LR: 0.000013
INFO:tensorflow:Step 15800 | Loss: 0.2110 | Spent: 49.7 secs | LR: 0.000012
INFO:tensorflow:Step 15900 | Loss: 0.2960 | Spent: 47.7 secs | LR: 0.000012
INFO:tensorflow:Step 16000 | Loss: 0.0285 | Spent: 49.5 secs | LR: 0.000012
INFO:tensorflow:Step 16100 | Loss: 0.1085 | Spent: 48.8 secs | LR: 0.000012
INFO:tensorflow:Step 16200 | Loss: 0.1144 | Spent: 49.3 secs | LR: 0.000011
INFO:tensorflow:Step 16300 | Loss: 0.2202 | Spent: 48.5 secs | LR: 0.000011
INFO:tensorflow:Step 16400 | Loss: 0.0913 | Spent: 48.1 secs | LR: 0.000011
INFO:tensorflow:Step 16500 | Loss: 0.4346 | Spent: 48.6 secs | LR: 0.000011
INFO:tensorflow:Step 16600 | Loss: 0.0940 | Spent: 48.8 secs | LR: 0.000010
INFO:tensorflow:Step 16700 | Loss: 0.1524 | Spent: 47.5 secs | LR: 0.000010
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.850
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.827     0.886     0.856      5000
     Matched      0.877     0.815     0.845      5000

    accuracy                          0.850     10000
   macro avg      0.852     0.850     0.850     10000
weighted avg      0.852     0.850     0.850     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.749
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.797     0.852     0.824      2978
     Matched      0.612     0.518     0.561      1338

    accuracy                          0.749      4316
   macro avg      0.705     0.685     0.692      4316
weighted avg      0.740     0.749     0.742      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 16800 | Loss: 0.1221 | Spent: 137.9 secs | LR: 0.000010
INFO:tensorflow:Step 16900 | Loss: 0.1125 | Spent: 48.4 secs | LR: 0.000010
INFO:tensorflow:Step 17000 | Loss: 0.1407 | Spent: 48.0 secs | LR: 0.000010
INFO:tensorflow:Step 17100 | Loss: 0.0693 | Spent: 48.4 secs | LR: 0.000010
INFO:tensorflow:Step 17200 | Loss: 0.0787 | Spent: 48.7 secs | LR: 0.000010
INFO:tensorflow:Step 17300 | Loss: 0.0720 | Spent: 47.0 secs | LR: 0.000011
INFO:tensorflow:Step 17400 | Loss: 0.0038 | Spent: 51.3 secs | LR: 0.000011
INFO:tensorflow:Step 17500 | Loss: 0.0282 | Spent: 46.8 secs | LR: 0.000011
INFO:tensorflow:Step 17600 | Loss: 0.1116 | Spent: 48.2 secs | LR: 0.000011
INFO:tensorflow:Step 17700 | Loss: 0.1797 | Spent: 48.4 secs | LR: 0.000011
INFO:tensorflow:Step 17800 | Loss: 0.1133 | Spent: 49.8 secs | LR: 0.000011
INFO:tensorflow:Step 17900 | Loss: 0.1529 | Spent: 47.6 secs | LR: 0.000011
INFO:tensorflow:Step 18000 | Loss: 0.0311 | Spent: 49.3 secs | LR: 0.000011
INFO:tensorflow:Step 18100 | Loss: 0.0176 | Spent: 47.4 secs | LR: 0.000012
INFO:tensorflow:Step 18200 | Loss: 0.0127 | Spent: 50.0 secs | LR: 0.000012
INFO:tensorflow:Step 18300 | Loss: 0.0117 | Spent: 49.9 secs | LR: 0.000012
INFO:tensorflow:Step 18400 | Loss: 0.0599 | Spent: 49.0 secs | LR: 0.000012
INFO:tensorflow:Step 18500 | Loss: 0.1182 | Spent: 48.8 secs | LR: 0.000012
INFO:tensorflow:Step 18600 | Loss: 0.0760 | Spent: 47.9 secs | LR: 0.000012
INFO:tensorflow:Step 18700 | Loss: 0.0156 | Spent: 49.2 secs | LR: 0.000012
INFO:tensorflow:Step 18800 | Loss: 0.1097 | Spent: 48.4 secs | LR: 0.000012
INFO:tensorflow:Step 18900 | Loss: 0.0329 | Spent: 49.6 secs | LR: 0.000013
INFO:tensorflow:Step 19000 | Loss: 0.1002 | Spent: 48.5 secs | LR: 0.000013
INFO:tensorflow:Step 19100 | Loss: 0.0372 | Spent: 49.9 secs | LR: 0.000013
INFO:tensorflow:Step 19200 | Loss: 0.0135 | Spent: 50.0 secs | LR: 0.000013
INFO:tensorflow:Step 19300 | Loss: 0.0246 | Spent: 47.5 secs | LR: 0.000013
INFO:tensorflow:Step 19400 | Loss: 0.1227 | Spent: 49.5 secs | LR: 0.000013
INFO:tensorflow:Step 19500 | Loss: 0.3453 | Spent: 49.5 secs | LR: 0.000013
INFO:tensorflow:Step 19600 | Loss: 0.0120 | Spent: 48.3 secs | LR: 0.000013
INFO:tensorflow:Step 19700 | Loss: 0.2351 | Spent: 46.6 secs | LR: 0.000013
INFO:tensorflow:Step 19800 | Loss: 0.2793 | Spent: 49.8 secs | LR: 0.000014
INFO:tensorflow:Step 19900 | Loss: 0.0301 | Spent: 49.2 secs | LR: 0.000014
INFO:tensorflow:Step 20000 | Loss: 0.0702 | Spent: 48.8 secs | LR: 0.000014
INFO:tensorflow:Step 20100 | Loss: 0.2161 | Spent: 48.7 secs | LR: 0.000014
INFO:tensorflow:Step 20200 | Loss: 0.2679 | Spent: 50.3 secs | LR: 0.000014
INFO:tensorflow:Step 20300 | Loss: 0.0239 | Spent: 50.3 secs | LR: 0.000014
INFO:tensorflow:Step 20400 | Loss: 0.2259 | Spent: 50.0 secs | LR: 0.000014
INFO:tensorflow:Step 20500 | Loss: 0.3101 | Spent: 49.8 secs | LR: 0.000014
INFO:tensorflow:Step 20600 | Loss: 0.0613 | Spent: 48.2 secs | LR: 0.000015
INFO:tensorflow:Step 20700 | Loss: 0.0212 | Spent: 49.2 secs | LR: 0.000015
INFO:tensorflow:Step 20800 | Loss: 0.2068 | Spent: 47.2 secs | LR: 0.000015
INFO:tensorflow:Step 20900 | Loss: 0.1085 | Spent: 49.0 secs | LR: 0.000015
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.841
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.815     0.883     0.847      5000
     Matched      0.872     0.799     0.834      5000

    accuracy                          0.841     10000
   macro avg      0.843     0.841     0.841     10000
weighted avg      0.843     0.841     0.841     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.727
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.826     0.766     0.795      2978
     Matched      0.551     0.640     0.592      1338

    accuracy                          0.727      4316
   macro avg      0.688     0.703     0.693      4316
weighted avg      0.740     0.727     0.732      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 21000 | Loss: 0.1488 | Spent: 137.4 secs | LR: 0.000015
INFO:tensorflow:Step 21100 | Loss: 0.0739 | Spent: 49.6 secs | LR: 0.000015
INFO:tensorflow:Step 21200 | Loss: 0.0207 | Spent: 50.4 secs | LR: 0.000015
INFO:tensorflow:Step 21300 | Loss: 0.0090 | Spent: 47.6 secs | LR: 0.000015
INFO:tensorflow:Step 21400 | Loss: 0.0058 | Spent: 48.6 secs | LR: 0.000015
INFO:tensorflow:Step 21500 | Loss: 0.0368 | Spent: 48.6 secs | LR: 0.000016
INFO:tensorflow:Step 21600 | Loss: 0.1764 | Spent: 47.7 secs | LR: 0.000016
INFO:tensorflow:Step 21700 | Loss: 0.0368 | Spent: 47.9 secs | LR: 0.000016
INFO:tensorflow:Step 21800 | Loss: 0.1127 | Spent: 50.6 secs | LR: 0.000016
INFO:tensorflow:Step 21900 | Loss: 0.0041 | Spent: 46.8 secs | LR: 0.000016
INFO:tensorflow:Step 22000 | Loss: 0.1518 | Spent: 48.8 secs | LR: 0.000016
INFO:tensorflow:Step 22100 | Loss: 0.0422 | Spent: 49.4 secs | LR: 0.000016
INFO:tensorflow:Step 22200 | Loss: 0.0354 | Spent: 48.7 secs | LR: 0.000016
INFO:tensorflow:Step 22300 | Loss: 0.1127 | Spent: 48.5 secs | LR: 0.000017
INFO:tensorflow:Step 22400 | Loss: 0.0885 | Spent: 48.0 secs | LR: 0.000017
INFO:tensorflow:Step 22500 | Loss: 0.0593 | Spent: 47.9 secs | LR: 0.000017
INFO:tensorflow:Step 22600 | Loss: 0.0386 | Spent: 51.3 secs | LR: 0.000017
INFO:tensorflow:Step 22700 | Loss: 0.0877 | Spent: 46.9 secs | LR: 0.000017
INFO:tensorflow:Step 22800 | Loss: 0.0081 | Spent: 49.8 secs | LR: 0.000017
INFO:tensorflow:Step 22900 | Loss: 0.0302 | Spent: 48.8 secs | LR: 0.000017
INFO:tensorflow:Step 23000 | Loss: 0.1411 | Spent: 48.3 secs | LR: 0.000017
INFO:tensorflow:Step 23100 | Loss: 0.0947 | Spent: 48.1 secs | LR: 0.000018
INFO:tensorflow:Step 23200 | Loss: 0.3180 | Spent: 47.6 secs | LR: 0.000018
INFO:tensorflow:Step 23300 | Loss: 0.1074 | Spent: 49.9 secs | LR: 0.000018
INFO:tensorflow:Step 23400 | Loss: 0.1277 | Spent: 49.2 secs | LR: 0.000018
INFO:tensorflow:Step 23500 | Loss: 0.0328 | Spent: 49.4 secs | LR: 0.000018
INFO:tensorflow:Step 23600 | Loss: 0.0621 | Spent: 49.7 secs | LR: 0.000018
INFO:tensorflow:Step 23700 | Loss: 0.0895 | Spent: 48.9 secs | LR: 0.000018
INFO:tensorflow:Step 23800 | Loss: 0.0035 | Spent: 47.9 secs | LR: 0.000018
INFO:tensorflow:Step 23900 | Loss: 0.0134 | Spent: 49.4 secs | LR: 0.000018
INFO:tensorflow:Step 24000 | Loss: 0.0584 | Spent: 50.8 secs | LR: 0.000019
INFO:tensorflow:Step 24100 | Loss: 0.0141 | Spent: 49.3 secs | LR: 0.000019
INFO:tensorflow:Step 24200 | Loss: 0.0106 | Spent: 49.6 secs | LR: 0.000019
INFO:tensorflow:Step 24300 | Loss: 0.0364 | Spent: 47.8 secs | LR: 0.000019
INFO:tensorflow:Step 24400 | Loss: 0.0335 | Spent: 48.7 secs | LR: 0.000019
INFO:tensorflow:Step 24500 | Loss: 0.0079 | Spent: 49.6 secs | LR: 0.000019
INFO:tensorflow:Step 24600 | Loss: 0.1336 | Spent: 49.0 secs | LR: 0.000019
INFO:tensorflow:Step 24700 | Loss: 0.1052 | Spent: 48.9 secs | LR: 0.000019
INFO:tensorflow:Step 24800 | Loss: 0.0556 | Spent: 49.2 secs | LR: 0.000020
INFO:tensorflow:Step 24900 | Loss: 0.0355 | Spent: 49.3 secs | LR: 0.000020
INFO:tensorflow:Step 25000 | Loss: 0.0199 | Spent: 49.3 secs | LR: 0.000020
INFO:tensorflow:Step 25100 | Loss: 0.0888 | Spent: 49.1 secs | LR: 0.000020
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.839
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.813     0.881     0.846      5000
     Matched      0.870     0.798     0.832      5000

    accuracy                          0.839     10000
   macro avg      0.842     0.839     0.839     10000
weighted avg      0.842     0.839     0.839     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.738
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.821     0.794     0.807      2978
     Matched      0.573     0.614     0.592      1338

    accuracy                          0.738      4316
   macro avg      0.697     0.704     0.700      4316
weighted avg      0.744     0.738     0.741      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 25200 | Loss: 0.0522 | Spent: 137.7 secs | LR: 0.000020
INFO:tensorflow:Step 25300 | Loss: 0.0812 | Spent: 48.5 secs | LR: 0.000020
INFO:tensorflow:Step 25400 | Loss: 0.2000 | Spent: 46.2 secs | LR: 0.000020
INFO:tensorflow:Step 25500 | Loss: 0.0486 | Spent: 49.5 secs | LR: 0.000020
INFO:tensorflow:Step 25600 | Loss: 0.1050 | Spent: 47.2 secs | LR: 0.000020
INFO:tensorflow:Step 25700 | Loss: 0.0233 | Spent: 48.5 secs | LR: 0.000019
INFO:tensorflow:Step 25800 | Loss: 0.0082 | Spent: 47.6 secs | LR: 0.000019
INFO:tensorflow:Step 25900 | Loss: 0.1317 | Spent: 49.7 secs | LR: 0.000019
INFO:tensorflow:Step 26000 | Loss: 0.0017 | Spent: 49.8 secs | LR: 0.000019
INFO:tensorflow:Step 26100 | Loss: 0.2447 | Spent: 49.3 secs | LR: 0.000019
INFO:tensorflow:Step 26200 | Loss: 0.0767 | Spent: 48.2 secs | LR: 0.000019
INFO:tensorflow:Step 26300 | Loss: 0.0688 | Spent: 47.4 secs | LR: 0.000019
INFO:tensorflow:Step 26400 | Loss: 0.0326 | Spent: 48.4 secs | LR: 0.000019
INFO:tensorflow:Step 26500 | Loss: 0.1046 | Spent: 48.8 secs | LR: 0.000018
INFO:tensorflow:Step 26600 | Loss: 0.0018 | Spent: 49.6 secs | LR: 0.000018
INFO:tensorflow:Step 26700 | Loss: 0.2073 | Spent: 49.2 secs | LR: 0.000018
INFO:tensorflow:Step 26800 | Loss: 0.0454 | Spent: 48.0 secs | LR: 0.000018
INFO:tensorflow:Step 26900 | Loss: 0.0593 | Spent: 46.8 secs | LR: 0.000018
INFO:tensorflow:Step 27000 | Loss: 0.1969 | Spent: 50.6 secs | LR: 0.000018
INFO:tensorflow:Step 27100 | Loss: 0.0282 | Spent: 49.4 secs | LR: 0.000018
INFO:tensorflow:Step 27200 | Loss: 0.1782 | Spent: 49.8 secs | LR: 0.000018
INFO:tensorflow:Step 27300 | Loss: 0.0059 | Spent: 49.3 secs | LR: 0.000017
INFO:tensorflow:Step 27400 | Loss: 0.0099 | Spent: 49.1 secs | LR: 0.000017
INFO:tensorflow:Step 27500 | Loss: 0.0088 | Spent: 48.4 secs | LR: 0.000017
INFO:tensorflow:Step 27600 | Loss: 0.1367 | Spent: 47.4 secs | LR: 0.000017
INFO:tensorflow:Step 27700 | Loss: 0.0278 | Spent: 49.6 secs | LR: 0.000017
INFO:tensorflow:Step 27800 | Loss: 0.2150 | Spent: 48.6 secs | LR: 0.000017
INFO:tensorflow:Step 27900 | Loss: 0.1499 | Spent: 49.2 secs | LR: 0.000017
INFO:tensorflow:Step 28000 | Loss: 0.1985 | Spent: 48.7 secs | LR: 0.000017
INFO:tensorflow:Step 28100 | Loss: 0.0387 | Spent: 49.0 secs | LR: 0.000017
INFO:tensorflow:Step 28200 | Loss: 0.0977 | Spent: 49.5 secs | LR: 0.000016
INFO:tensorflow:Step 28300 | Loss: 0.2370 | Spent: 48.0 secs | LR: 0.000016
INFO:tensorflow:Step 28400 | Loss: 0.0072 | Spent: 48.3 secs | LR: 0.000016
INFO:tensorflow:Step 28500 | Loss: 0.1217 | Spent: 49.4 secs | LR: 0.000016
INFO:tensorflow:Step 28600 | Loss: 0.2329 | Spent: 52.3 secs | LR: 0.000016
INFO:tensorflow:Step 28700 | Loss: 0.0125 | Spent: 47.2 secs | LR: 0.000016
INFO:tensorflow:Step 28800 | Loss: 0.0458 | Spent: 49.7 secs | LR: 0.000016
INFO:tensorflow:Step 28900 | Loss: 0.0070 | Spent: 49.6 secs | LR: 0.000016
INFO:tensorflow:Step 29000 | Loss: 0.0047 | Spent: 50.0 secs | LR: 0.000015
INFO:tensorflow:Step 29100 | Loss: 0.0272 | Spent: 50.2 secs | LR: 0.000015
INFO:tensorflow:Step 29200 | Loss: 0.0135 | Spent: 46.9 secs | LR: 0.000015
INFO:tensorflow:Step 29300 | Loss: 0.0830 | Spent: 48.1 secs | LR: 0.000015
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.841
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.822     0.871     0.846      5000
     Matched      0.863     0.812     0.837      5000

    accuracy                          0.841     10000
   macro avg      0.843     0.841     0.841     10000
weighted avg      0.843     0.841     0.841     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.726
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.808     0.791     0.799      2978
     Matched      0.555     0.581     0.568      1338

    accuracy                          0.726      4316
   macro avg      0.682     0.686     0.684      4316
weighted avg      0.729     0.726     0.728      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 29400 | Loss: 0.0118 | Spent: 139.4 secs | LR: 0.000015
INFO:tensorflow:Step 29500 | Loss: 0.0702 | Spent: 46.5 secs | LR: 0.000015
INFO:tensorflow:Step 29600 | Loss: 0.0034 | Spent: 48.1 secs | LR: 0.000015
INFO:tensorflow:Step 29700 | Loss: 0.0118 | Spent: 50.2 secs | LR: 0.000015
INFO:tensorflow:Step 29800 | Loss: 0.0970 | Spent: 50.2 secs | LR: 0.000015
INFO:tensorflow:Step 29900 | Loss: 0.0143 | Spent: 49.1 secs | LR: 0.000014
INFO:tensorflow:Step 30000 | Loss: 0.0078 | Spent: 48.0 secs | LR: 0.000014
INFO:tensorflow:Step 30100 | Loss: 0.0182 | Spent: 51.6 secs | LR: 0.000014
INFO:tensorflow:Step 30200 | Loss: 0.0445 | Spent: 47.9 secs | LR: 0.000014
INFO:tensorflow:Step 30300 | Loss: 0.0292 | Spent: 50.0 secs | LR: 0.000014
INFO:tensorflow:Step 30400 | Loss: 0.0114 | Spent: 48.8 secs | LR: 0.000014
INFO:tensorflow:Step 30500 | Loss: 0.0583 | Spent: 48.8 secs | LR: 0.000014
INFO:tensorflow:Step 30600 | Loss: 0.0640 | Spent: 49.7 secs | LR: 0.000014
INFO:tensorflow:Step 30700 | Loss: 0.0236 | Spent: 49.8 secs | LR: 0.000013
INFO:tensorflow:Step 30800 | Loss: 0.0095 | Spent: 49.4 secs | LR: 0.000013
INFO:tensorflow:Step 30900 | Loss: 0.0113 | Spent: 48.7 secs | LR: 0.000013
INFO:tensorflow:Step 31000 | Loss: 0.2760 | Spent: 49.7 secs | LR: 0.000013
INFO:tensorflow:Step 31100 | Loss: 0.1803 | Spent: 48.0 secs | LR: 0.000013
INFO:tensorflow:Step 31200 | Loss: 0.0862 | Spent: 49.1 secs | LR: 0.000013
INFO:tensorflow:Step 31300 | Loss: 0.0166 | Spent: 47.9 secs | LR: 0.000013
INFO:tensorflow:Step 31400 | Loss: 0.0070 | Spent: 47.6 secs | LR: 0.000013
INFO:tensorflow:Step 31500 | Loss: 0.0552 | Spent: 49.2 secs | LR: 0.000012
INFO:tensorflow:Step 31600 | Loss: 0.0767 | Spent: 49.8 secs | LR: 0.000012
INFO:tensorflow:Step 31700 | Loss: 0.0622 | Spent: 48.4 secs | LR: 0.000012
INFO:tensorflow:Step 31800 | Loss: 0.0043 | Spent: 47.9 secs | LR: 0.000012
INFO:tensorflow:Step 31900 | Loss: 0.0083 | Spent: 48.7 secs | LR: 0.000012
INFO:tensorflow:Step 32000 | Loss: 0.1462 | Spent: 48.0 secs | LR: 0.000012
INFO:tensorflow:Step 32100 | Loss: 0.0026 | Spent: 49.5 secs | LR: 0.000012
INFO:tensorflow:Step 32200 | Loss: 0.0166 | Spent: 48.3 secs | LR: 0.000012
INFO:tensorflow:Step 32300 | Loss: 0.0037 | Spent: 48.9 secs | LR: 0.000012
INFO:tensorflow:Step 32400 | Loss: 0.0098 | Spent: 50.0 secs | LR: 0.000011
INFO:tensorflow:Step 32500 | Loss: 0.0080 | Spent: 47.9 secs | LR: 0.000011
INFO:tensorflow:Step 32600 | Loss: 0.0615 | Spent: 48.1 secs | LR: 0.000011
INFO:tensorflow:Step 32700 | Loss: 0.0209 | Spent: 48.6 secs | LR: 0.000011
INFO:tensorflow:Step 32800 | Loss: 0.0337 | Spent: 47.9 secs | LR: 0.000011
INFO:tensorflow:Step 32900 | Loss: 0.0921 | Spent: 49.0 secs | LR: 0.000011
INFO:tensorflow:Step 33000 | Loss: 0.1402 | Spent: 48.0 secs | LR: 0.000011
INFO:tensorflow:Step 33100 | Loss: 0.0105 | Spent: 48.8 secs | LR: 0.000011
INFO:tensorflow:Step 33200 | Loss: 0.0432 | Spent: 47.7 secs | LR: 0.000010
INFO:tensorflow:Step 33300 | Loss: 0.1867 | Spent: 47.9 secs | LR: 0.000010
INFO:tensorflow:Step 33400 | Loss: 0.0390 | Spent: 50.6 secs | LR: 0.000010
INFO:tensorflow:Step 33500 | Loss: 0.0559 | Spent: 50.8 secs | LR: 0.000010
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.840
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.810     0.888     0.847      5000
     Matched      0.876     0.792     0.832      5000

    accuracy                          0.840     10000
   macro avg      0.843     0.840     0.840     10000
weighted avg      0.843     0.840     0.840     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.733
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.798     0.821     0.809      2978
     Matched      0.573     0.537     0.554      1338

    accuracy                          0.733      4316
   macro avg      0.686     0.679     0.682      4316
weighted avg      0.728     0.733     0.730      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 33600 | Loss: 0.0019 | Spent: 135.8 secs | LR: 0.000010
INFO:tensorflow:Step 33700 | Loss: 0.0083 | Spent: 47.9 secs | LR: 0.000010
INFO:tensorflow:Step 33800 | Loss: 0.0084 | Spent: 47.8 secs | LR: 0.000010
INFO:tensorflow:Step 33900 | Loss: 0.0843 | Spent: 49.5 secs | LR: 0.000010
INFO:tensorflow:Step 34000 | Loss: 0.0071 | Spent: 47.6 secs | LR: 0.000010
INFO:tensorflow:Step 34100 | Loss: 0.0075 | Spent: 51.3 secs | LR: 0.000010
INFO:tensorflow:Step 34200 | Loss: 0.0291 | Spent: 48.3 secs | LR: 0.000010
INFO:tensorflow:Step 34300 | Loss: 0.0456 | Spent: 48.9 secs | LR: 0.000010
INFO:tensorflow:Step 34400 | Loss: 0.1451 | Spent: 48.1 secs | LR: 0.000010
INFO:tensorflow:Step 34500 | Loss: 0.0018 | Spent: 49.5 secs | LR: 0.000011
INFO:tensorflow:Step 34600 | Loss: 0.0082 | Spent: 48.8 secs | LR: 0.000011
INFO:tensorflow:Step 34700 | Loss: 0.1125 | Spent: 50.5 secs | LR: 0.000011
INFO:tensorflow:Step 34800 | Loss: 0.0727 | Spent: 48.8 secs | LR: 0.000011
INFO:tensorflow:Step 34900 | Loss: 0.0661 | Spent: 49.2 secs | LR: 0.000011
INFO:tensorflow:Step 35000 | Loss: 0.0005 | Spent: 47.6 secs | LR: 0.000011
INFO:tensorflow:Step 35100 | Loss: 0.0279 | Spent: 48.2 secs | LR: 0.000011
INFO:tensorflow:Step 35200 | Loss: 0.0063 | Spent: 48.9 secs | LR: 0.000011
INFO:tensorflow:Step 35300 | Loss: 0.0016 | Spent: 49.9 secs | LR: 0.000011
INFO:tensorflow:Step 35400 | Loss: 0.0381 | Spent: 49.7 secs | LR: 0.000011
INFO:tensorflow:Step 35500 | Loss: 0.0696 | Spent: 48.9 secs | LR: 0.000011
INFO:tensorflow:Step 35600 | Loss: 0.1691 | Spent: 48.6 secs | LR: 0.000011
INFO:tensorflow:Step 35700 | Loss: 0.0540 | Spent: 48.2 secs | LR: 0.000011
INFO:tensorflow:Step 35800 | Loss: 0.0842 | Spent: 48.8 secs | LR: 0.000011
INFO:tensorflow:Step 35900 | Loss: 0.1307 | Spent: 49.5 secs | LR: 0.000011
INFO:tensorflow:Step 36000 | Loss: 0.0195 | Spent: 49.1 secs | LR: 0.000011
INFO:tensorflow:Step 36100 | Loss: 0.0924 | Spent: 49.9 secs | LR: 0.000012
INFO:tensorflow:Step 36200 | Loss: 0.0006 | Spent: 49.1 secs | LR: 0.000012
INFO:tensorflow:Step 36300 | Loss: 0.0111 | Spent: 49.5 secs | LR: 0.000012
INFO:tensorflow:Step 36400 | Loss: 0.1527 | Spent: 48.0 secs | LR: 0.000012
INFO:tensorflow:Step 36500 | Loss: 0.1039 | Spent: 48.3 secs | LR: 0.000012
INFO:tensorflow:Step 36600 | Loss: 0.0556 | Spent: 49.9 secs | LR: 0.000012
INFO:tensorflow:Step 36700 | Loss: 0.0691 | Spent: 50.6 secs | LR: 0.000012
INFO:tensorflow:Step 36800 | Loss: 0.0017 | Spent: 49.9 secs | LR: 0.000012
INFO:tensorflow:Step 36900 | Loss: 0.0154 | Spent: 47.6 secs | LR: 0.000012
INFO:tensorflow:Step 37000 | Loss: 0.0911 | Spent: 50.3 secs | LR: 0.000012
INFO:tensorflow:Step 37100 | Loss: 0.0589 | Spent: 47.9 secs | LR: 0.000012
INFO:tensorflow:Step 37200 | Loss: 0.1323 | Spent: 49.4 secs | LR: 0.000012
INFO:tensorflow:Step 37300 | Loss: 0.1415 | Spent: 49.3 secs | LR: 0.000012
INFO:tensorflow:Step 37400 | Loss: 0.0021 | Spent: 50.4 secs | LR: 0.000012
INFO:tensorflow:Step 37500 | Loss: 0.0037 | Spent: 48.9 secs | LR: 0.000012
INFO:tensorflow:Step 37600 | Loss: 0.0064 | Spent: 51.0 secs | LR: 0.000012
INFO:tensorflow:Step 37700 | Loss: 0.0426 | Spent: 48.2 secs | LR: 0.000012
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.845
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.820     0.884     0.851      5000
     Matched      0.874     0.806     0.839      5000

    accuracy                          0.845     10000
   macro avg      0.847     0.845     0.845     10000
weighted avg      0.847     0.845     0.845     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.727
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.801     0.804     0.802      2978
     Matched      0.560     0.555     0.558      1338

    accuracy                          0.727      4316
   macro avg      0.680     0.680     0.680      4316
weighted avg      0.726     0.727     0.727      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 37800 | Loss: 0.0475 | Spent: 138.8 secs | LR: 0.000013
INFO:tensorflow:Step 37900 | Loss: 0.0040 | Spent: 48.8 secs | LR: 0.000013
INFO:tensorflow:Step 38000 | Loss: 0.0071 | Spent: 48.3 secs | LR: 0.000013
INFO:tensorflow:Step 38100 | Loss: 0.0005 | Spent: 48.5 secs | LR: 0.000013
INFO:tensorflow:Step 38200 | Loss: 0.1015 | Spent: 48.6 secs | LR: 0.000013
INFO:tensorflow:Step 38300 | Loss: 0.0017 | Spent: 50.4 secs | LR: 0.000013
INFO:tensorflow:Step 38400 | Loss: 0.0004 | Spent: 47.4 secs | LR: 0.000013
INFO:tensorflow:Step 38500 | Loss: 0.0031 | Spent: 48.1 secs | LR: 0.000013
INFO:tensorflow:Step 38600 | Loss: 0.0904 | Spent: 50.5 secs | LR: 0.000013
INFO:tensorflow:Step 38700 | Loss: 0.0057 | Spent: 48.6 secs | LR: 0.000013
INFO:tensorflow:Step 38800 | Loss: 0.2077 | Spent: 47.9 secs | LR: 0.000013
INFO:tensorflow:Step 38900 | Loss: 0.1810 | Spent: 49.0 secs | LR: 0.000013
INFO:tensorflow:Step 39000 | Loss: 0.0007 | Spent: 49.8 secs | LR: 0.000013
INFO:tensorflow:Step 39100 | Loss: 0.0004 | Spent: 49.0 secs | LR: 0.000013
INFO:tensorflow:Step 39200 | Loss: 0.0033 | Spent: 48.8 secs | LR: 0.000013
INFO:tensorflow:Step 39300 | Loss: 0.0015 | Spent: 49.4 secs | LR: 0.000013
INFO:tensorflow:Step 39400 | Loss: 0.0032 | Spent: 50.4 secs | LR: 0.000013
INFO:tensorflow:Step 39500 | Loss: 0.0016 | Spent: 49.1 secs | LR: 0.000014
INFO:tensorflow:Step 39600 | Loss: 0.0040 | Spent: 47.9 secs | LR: 0.000014
INFO:tensorflow:Step 39700 | Loss: 0.0105 | Spent: 50.0 secs | LR: 0.000014
INFO:tensorflow:Step 39800 | Loss: 0.0449 | Spent: 50.4 secs | LR: 0.000014
INFO:tensorflow:Step 39900 | Loss: 0.1775 | Spent: 49.9 secs | LR: 0.000014
INFO:tensorflow:Step 40000 | Loss: 0.0178 | Spent: 50.6 secs | LR: 0.000014
INFO:tensorflow:Step 40100 | Loss: 0.2196 | Spent: 50.6 secs | LR: 0.000014
INFO:tensorflow:Step 40200 | Loss: 0.0016 | Spent: 50.2 secs | LR: 0.000014
INFO:tensorflow:Step 40300 | Loss: 0.0025 | Spent: 48.2 secs | LR: 0.000014
INFO:tensorflow:Step 40400 | Loss: 0.0008 | Spent: 48.5 secs | LR: 0.000014
INFO:tensorflow:Step 40500 | Loss: 0.0022 | Spent: 48.3 secs | LR: 0.000014
INFO:tensorflow:Step 40600 | Loss: 0.0563 | Spent: 49.0 secs | LR: 0.000014
INFO:tensorflow:Step 40700 | Loss: 0.1432 | Spent: 47.9 secs | LR: 0.000014
INFO:tensorflow:Step 40800 | Loss: 0.0089 | Spent: 48.7 secs | LR: 0.000014
INFO:tensorflow:Step 40900 | Loss: 0.1588 | Spent: 47.6 secs | LR: 0.000014
INFO:tensorflow:Step 41000 | Loss: 0.0044 | Spent: 50.9 secs | LR: 0.000014
INFO:tensorflow:Step 41100 | Loss: 0.0040 | Spent: 48.7 secs | LR: 0.000014
INFO:tensorflow:Step 41200 | Loss: 0.0007 | Spent: 48.2 secs | LR: 0.000015
INFO:tensorflow:Step 41300 | Loss: 0.0377 | Spent: 48.8 secs | LR: 0.000015
INFO:tensorflow:Step 41400 | Loss: 0.0057 | Spent: 49.0 secs | LR: 0.000015
INFO:tensorflow:Step 41500 | Loss: 0.0030 | Spent: 49.1 secs | LR: 0.000015
INFO:tensorflow:Step 41600 | Loss: 0.0012 | Spent: 49.7 secs | LR: 0.000015
INFO:tensorflow:Step 41700 | Loss: 0.0127 | Spent: 51.3 secs | LR: 0.000015
INFO:tensorflow:Step 41800 | Loss: 0.0991 | Spent: 48.0 secs | LR: 0.000015
INFO:tensorflow:Step 41900 | Loss: 0.0964 | Spent: 48.1 secs | LR: 0.000015
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.840
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.807     0.894     0.848      5000
     Matched      0.881     0.787     0.831      5000

    accuracy                          0.840     10000
   macro avg      0.844     0.840     0.840     10000
weighted avg      0.844     0.840     0.840     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.729
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.799     0.811     0.805      2978
     Matched      0.565     0.545     0.555      1338

    accuracy                          0.729      4316
   macro avg      0.682     0.678     0.680      4316
weighted avg      0.726     0.729     0.727      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
Reading ../data/train.csv
Reading ../data/train.json
INFO:tensorflow:Step 42000 | Loss: 0.0019 | Spent: 138.2 secs | LR: 0.000015
INFO:tensorflow:Step 42100 | Loss: 0.0070 | Spent: 49.2 secs | LR: 0.000015
INFO:tensorflow:Step 42200 | Loss: 0.0020 | Spent: 47.1 secs | LR: 0.000015
INFO:tensorflow:Step 42300 | Loss: 0.0033 | Spent: 49.3 secs | LR: 0.000015
INFO:tensorflow:Step 42400 | Loss: 0.0072 | Spent: 47.8 secs | LR: 0.000015
INFO:tensorflow:Step 42500 | Loss: 0.1992 | Spent: 48.7 secs | LR: 0.000015
INFO:tensorflow:Step 42600 | Loss: 0.0988 | Spent: 49.3 secs | LR: 0.000015
INFO:tensorflow:Step 42700 | Loss: 0.0960 | Spent: 48.4 secs | LR: 0.000015
INFO:tensorflow:Step 42800 | Loss: 0.0042 | Spent: 48.4 secs | LR: 0.000015
INFO:tensorflow:Step 42900 | Loss: 0.0675 | Spent: 47.5 secs | LR: 0.000014
INFO:tensorflow:Step 43000 | Loss: 0.1523 | Spent: 49.1 secs | LR: 0.000014
INFO:tensorflow:Step 43100 | Loss: 0.0238 | Spent: 48.8 secs | LR: 0.000014
INFO:tensorflow:Step 43200 | Loss: 0.0145 | Spent: 47.4 secs | LR: 0.000014
INFO:tensorflow:Step 43300 | Loss: 0.0003 | Spent: 49.8 secs | LR: 0.000014
INFO:tensorflow:Step 43400 | Loss: 0.1444 | Spent: 46.9 secs | LR: 0.000014
INFO:tensorflow:Step 43500 | Loss: 0.0417 | Spent: 49.9 secs | LR: 0.000014
INFO:tensorflow:Step 43600 | Loss: 0.0024 | Spent: 48.1 secs | LR: 0.000014
INFO:tensorflow:Step 43700 | Loss: 0.0039 | Spent: 48.7 secs | LR: 0.000014
INFO:tensorflow:Step 43800 | Loss: 0.0198 | Spent: 48.4 secs | LR: 0.000014
INFO:tensorflow:Step 43900 | Loss: 0.1959 | Spent: 48.7 secs | LR: 0.000014
INFO:tensorflow:Step 44000 | Loss: 0.0014 | Spent: 48.4 secs | LR: 0.000014
INFO:tensorflow:Step 44100 | Loss: 0.0469 | Spent: 49.9 secs | LR: 0.000014
INFO:tensorflow:Step 44200 | Loss: 0.0007 | Spent: 48.6 secs | LR: 0.000014
INFO:tensorflow:Step 44300 | Loss: 0.0023 | Spent: 48.4 secs | LR: 0.000014
INFO:tensorflow:Step 44400 | Loss: 0.0025 | Spent: 49.7 secs | LR: 0.000014
INFO:tensorflow:Step 44500 | Loss: 0.0027 | Spent: 50.4 secs | LR: 0.000013
INFO:tensorflow:Step 44600 | Loss: 0.0003 | Spent: 48.7 secs | LR: 0.000013
INFO:tensorflow:Step 44700 | Loss: 0.0039 | Spent: 49.2 secs | LR: 0.000013
INFO:tensorflow:Step 44800 | Loss: 0.0852 | Spent: 47.2 secs | LR: 0.000013
INFO:tensorflow:Step 44900 | Loss: 0.3724 | Spent: 49.5 secs | LR: 0.000013
INFO:tensorflow:Step 45000 | Loss: 0.0109 | Spent: 50.1 secs | LR: 0.000013
INFO:tensorflow:Step 45100 | Loss: 0.0026 | Spent: 47.9 secs | LR: 0.000013
INFO:tensorflow:Step 45200 | Loss: 0.0017 | Spent: 50.4 secs | LR: 0.000013
INFO:tensorflow:Step 45300 | Loss: 0.0281 | Spent: 49.2 secs | LR: 0.000013
INFO:tensorflow:Step 45400 | Loss: 0.0066 | Spent: 50.8 secs | LR: 0.000013
INFO:tensorflow:Step 45500 | Loss: 0.0124 | Spent: 47.4 secs | LR: 0.000013
INFO:tensorflow:Step 45600 | Loss: 0.1552 | Spent: 49.8 secs | LR: 0.000013
INFO:tensorflow:Step 45700 | Loss: 0.0050 | Spent: 49.2 secs | LR: 0.000013
INFO:tensorflow:Step 45800 | Loss: 0.0583 | Spent: 49.7 secs | LR: 0.000013
INFO:tensorflow:Step 45900 | Loss: 0.0034 | Spent: 49.0 secs | LR: 0.000013
INFO:tensorflow:Step 46000 | Loss: 0.0216 | Spent: 48.4 secs | LR: 0.000013
INFO:tensorflow:Step 46100 | Loss: 0.0304 | Spent: 48.7 secs | LR: 0.000013
Reading ../data/test.csv
INFO:tensorflow:测试集:微众银行智能客服
INFO:tensorflow:Evaluation: Testing Accuracy: 0.835
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.796     0.900     0.845      5000
     Matched      0.885     0.770     0.823      5000

    accuracy                          0.835     10000
   macro avg      0.841     0.835     0.834     10000
weighted avg      0.841     0.835     0.834     10000

Reading ../data/dev.json
INFO:tensorflow:测试集:蚂蚁金融语义相似度
INFO:tensorflow:Evaluation: Testing Accuracy: 0.732
INFO:tensorflow:
              precision    recall  f1-score   support

 Not Matched      0.793     0.828     0.810      2978
     Matched      0.576     0.518     0.545      1338

    accuracy                          0.732      4316
   macro avg      0.684     0.673     0.678      4316
weighted avg      0.725     0.732     0.728      4316

INFO:tensorflow:Best | Accuracy 1: 0.850 | Accuracy 2: 0.749
7 times not improve the best result, therefore stop training