Skip to content

Commit

Permalink
fix model bug (PaddlePaddle#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
LielinJiang authored Oct 30, 2020
1 parent 1b84c4f commit ac4b41e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ppgan/datasets/single_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __getitem__(self, index):
A_paths(str) - - the path of the image
"""
A_path = self.A_paths[index]
A_img = cv2.imread(A_path)
A_img = cv2.cvtColor(cv2.imread(A_path), cv2.COLOR_BGR2RGB)
A = self.transform(A_img)

return {'A': A, 'A_paths': A_path}
Expand Down
3 changes: 1 addition & 2 deletions ppgan/models/discriminators/nlayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ def __init__(self, input_nc, ndf=64, n_layers=3, norm_type='instance'):
1,
kernel_size=kw,
stride=1,
padding=padw,
bias_attr=False)
padding=padw)
] # output 1 channel prediction map

self.model = nn.Sequential(*sequence)
Expand Down

0 comments on commit ac4b41e

Please sign in to comment.