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),
}