Commit ae84b52a authored by Yuxin Wu's avatar Yuxin Wu

bugfix in ImageFromFile

parent 8a3d0d60
......@@ -27,7 +27,9 @@ class ImageFromFile(RNGDataFlow):
self.files = files
self.channel = int(channel)
self.imread_mode = cv2.IMREAD_GRAYSCALE if self.channel == 1 else cv2.IMREAD_COLOR
self.resize = shape2d(resize)
if resize is not None:
resize = shape2d(resize)
self.resize = resize
self.shuffle = shuffle
def size(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment