修复
Browse files- cyclegan.py +1 -1
cyclegan.py
CHANGED
@@ -66,7 +66,7 @@ class CYCLEGAN(object):
|
|
66 |
#---------------------------------------------------------#
|
67 |
# 添加上batch_size维度
|
68 |
#---------------------------------------------------------#
|
69 |
-
image_data = np.expand_dims(np.transpose(preprocess_input(np.array(
|
70 |
|
71 |
with torch.no_grad():
|
72 |
images = torch.from_numpy(image_data)
|
|
|
66 |
#---------------------------------------------------------#
|
67 |
# 添加上batch_size维度
|
68 |
#---------------------------------------------------------#
|
69 |
+
image_data = np.expand_dims(np.transpose(preprocess_input(np.array(image, dtype='float32')), (2, 0, 1)), 0)
|
70 |
|
71 |
with torch.no_grad():
|
72 |
images = torch.from_numpy(image_data)
|