比赛链接及其数据下载:
https://tianchi.aliyun.com/competition/entrance/231786/information
base model:(该base是Do大哥一小时搞定的,感谢队友大哥)
不finetune bert是0.55左右,finetunebert应该是0.60左右。
代码语言:javascript复制import base64
import argparse
from keras_bert.layers import MaskedConv1D
from sklearn.metrics import roc_auc_score
import pandas as pd
import codecs, gc
from keras_bert import load_trained_model_from_checkpoint, Tokenizer, load_vocabulary
from keras.layers import *
from keras.callbacks import *
from keras.models import Model
from keras.optimizers import Adam
import tensorflow as tf
import keras
import warnings
import numpy as np
import json
import os
warnings.filterwarnings("ignore")
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
keras.backend.set_session(tf.Session(config=config))
np.random.seed(1024)
parser = argparse.Argu