图像分类模型的data feeder变量个数的问题
Created by: SnowWhite11235
您好,在image_classification模型中,我想要加两个格式不同的标签作为约束(类别和关键点), py_reader = fluid.layers.py_reader( capacity=16, shapes=[[-1] + image_shape, [-1, len(class_dim)], [-1, 8, 56, 56]], lod_levels=[0, 0, 0], dtypes=["float32", "int64", "float32"], use_double_buffer=True) image, label, kpts_gt = fluid.layers.read_file(py_reader) avg_cost, out = net_config(image, kpts_gt, model, args, label=label, is_train=is_train)
但是运行时报错 File "/home/baixue/tools/anaconda3/lib/python3.7/site-packages/paddle/fluid/data_feeder.py", line 282, in feed "len(feed_list) (%s)") % (len(each_sample), len(converter)) AssertionError: The number of fields in data (2) does not match len(feed_list) (3)
我理解应该有一个feeder = fluid.DataFeeder(feed_list=[img, label], place=p)这样的函数,让我把feed_list写进去,但我没有找到(infer.py和test.py都有,train.py没有),请问是这样嘛?在哪里呢?谢谢~