NameError: name 'label_train' is not defined

错误地点

        for step in range(501):
            feature_train_batch, label_train_batch = next_batch(feature_train, label_train,1000)  # 随机梯度下降训练,每次选大小为1000的batch
            feature_test_batch, label_test_batch = next_batch(feature_test, label_test,1000)  # 随机梯度下降训练,每次选大小为1000的batch
            sess.run(train_step, feed_dict={xs: feature_train_batch, ys: label_train_batch, keep_prob: 0.5})

        再把定义的next_batch函数发出来,求指教啊         
def next_batch(feature_list,label_list,size):
    feature_batch_temp=[]
    label_batch_temp=[]
    f_list = random.sample(range(len(feature_list)), size)
    for i in f_list:
        feature_batch_temp.append(feature_list[i])
    for i in f_list:
        label_batch_temp.append(label_list[i])
    return feature_batch_temp,label_batch_temp

看你这个之前的代码
label_train
有没有定义
或者是不是不是这个变量名

应该是上文没有label_train这个变量