你不需要load_file代码,this snippet他已经告诉你数据/批次是什么样的,我想为你翻译成英文:
print("testX.shape:", np.array(testX).shape) # 2500 lists, with each list representing a sentence
# there are 2500 lists in testX each one standing for a sentence,
# which means testX is a 2 dimensional list containing 2500 lists
# and each list has several ids of words
print("testY.shape:", np.array(testY).shape) # 2500 labels
# correspondingly there are 2500 labels in the testY which is a
# one dimensional list
print("testX[0]:", testX[0]) # [17, 25, 10, 406, 26, 14, 56, 61, 62, 323, 4]
# this is what the first sentence in testX like (all ids)
print("testX[1]:", testX[1]);
print("testY[0]:", testY[0]) # 0 ;print("testY[1]:",testY[1]) #0
您可以制作自己的 testX 和 testY,它们都只是列表。