Open liuruoze opened 7 years ago
@liuruoze The round function returns float values in these places, change them to integer will solve your problem.
This failure is this:
File "FCN_plus.py", line 295, in <module> tf.app.run() File "/home/gpu/liuruoze/Matting/venv2/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "FCN_plus.py", line 181, in main train_dataset_reader = BatchDatset('data/trainlist.mat') File "/home/gpu/liuruoze/Matting/portrait_plus.py", line 24, in __init__ self.cur_imgs, self.cur_labels = self.get_variations(self.imgs[0]) File "/home/gpu/liuruoze/Matting/portrait_plus.py", line 192, in get_variations si_img = i_img.resize(resize_box, Image.ANTIALIAS) File "/home/gpu/liuruoze/Matting/venv2/local/lib/python2.7/site-packages/PIL/Image.py", line 1559, in resize return self._new(self.im.resize(size, resample)) TypeError: integer argument expected, got float
It is helpful if you could give me some advices.
您运行好FCN的代码了吗?我运行的时候不训练,想知道在运行的时候是不是直接python FCN.py就可以呢?还需要其他的命令吗?
This failure is this:
File "FCN_plus.py", line 295, in <module> tf.app.run() File "/home/gpu/liuruoze/Matting/venv2/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "FCN_plus.py", line 181, in main train_dataset_reader = BatchDatset('data/trainlist.mat') File "/home/gpu/liuruoze/Matting/portrait_plus.py", line 24, in __init__ self.cur_imgs, self.cur_labels = self.get_variations(self.imgs[0]) File "/home/gpu/liuruoze/Matting/portrait_plus.py", line 192, in get_variations si_img = i_img.resize(resize_box, Image.ANTIALIAS) File "/home/gpu/liuruoze/Matting/venv2/local/lib/python2.7/site-packages/PIL/Image.py", line 1559, in resize return self._new(self.im.resize(size, resample)) TypeError: integer argument expected, got float
It is helpful if you could give me some advices.