Hyeoungho Bae
1 min readJul 13, 2020

--

Hi, I hope that you’ve already found the reason. If you haven’t, here is why:

def file_based_input_fn_builder(input_file, seq_length, is_training,
drop_remainder):
“””Creates an `input_fn` closure to be passed to TPUEstimator.”””

name_to_features = {
“input_ids”: tf.FixedLenFeature([seq_length], tf.int64),
“input_mask”: tf.FixedLenFeature([seq_length], tf.int64),
“segment_ids”: tf.FixedLenFeature([seq_length], tf.int64),
”label_ids”: tf.FixedLenFeature([6], tf.int64), → You want to change this number of label from 6 to 40 in your example.
“is_real_example”: tf.FixedLenFeature([], tf.int64),
}

--

--

Hyeoungho Bae
Hyeoungho Bae

Written by Hyeoungho Bae

Software Engineer interested in Optimization, Natural Language Processing, Data Augmentation (https://www.linkedin.com/in/hyeoungho-wayne-bae-8b395724/)

No responses yet