未验证 提交 925bd9c7 编写于 作者: L LielinJiang 提交者: GitHub

Fix bug of conditional gan and building wheels (#185)

* fix bugs
上级 130bd7f9
......@@ -18,46 +18,57 @@ model:
norm_type: batch
n_class: 10
use_sigmoid: True
gan_mode: vanilla
gan_criterion:
name: GANLoss
gan_mode: vanilla
dataset:
train:
name: CommonVisionDataset
class_name: MNIST
dataroot: None
dataset_name: MNIST
num_workers: 4
batch_size: 64
mode: train
return_cls: True
return_label: True
transforms:
- name: Normalize
mean: [127.5]
std: [127.5]
keys: [image]
params:
mode: train
test:
name: CommonVisionDataset
class_name: MNIST
dataroot: None
dataset_name: MNIST
num_workers: 0
batch_size: 64
mode: test
return_label: True
params:
mode: train
transforms:
- name: Normalize
mean: [127.5]
std: [127.5]
keys: [image]
return_cls: True
optimizer:
name: Adam
beta1: 0.5
lr_scheduler:
name: linear
name: LinearDecay
learning_rate: 0.0002
start_epoch: 100
decay_epochs: 100
# will get from real dataset
iters_per_epoch: 1
optimizer:
optimizer_G:
name: Adam
net_names:
- netG
beta1: 0.5
optimizer_D:
name: Adam
net_names:
- netD
beta1: 0.5
log_config:
interval: 100
......
......@@ -64,6 +64,9 @@ dataset:
preprocess:
- name: LoadImageFromFile
key: pair
- name: SplitPairedImage
key: pair
paired_keys: [A, B]
- name: Transforms
input_keys: [A, B]
pipeline:
......
......@@ -18,7 +18,7 @@ import cv2
import paddle
from .base_predictor import BasePredictor
from ppgan.datasets.transforms import ResizeToScale
from ppgan.datasets.preprocess.transforms import ResizeToScale
import paddle.vision.transforms as T
from ppgan.models.generators import AnimeGenerator
from ppgan.utils.download import get_path_from_url
......
......@@ -41,6 +41,7 @@ TRANSFORMS.register(T.RandomHorizontalFlip)
TRANSFORMS.register(T.RandomVerticalFlip)
TRANSFORMS.register(T.Normalize)
TRANSFORMS.register(T.Transpose)
TRANSFORMS.register(T.Grayscale)
@PREPROCESS.register()
......
......@@ -13,6 +13,7 @@
# limitations under the License.
from setuptools import setup
from setuptools import find_packages
from io import open
with open('requirements.txt', encoding="utf-8-sig") as f:
......@@ -27,11 +28,11 @@ def readme():
setup(
name='ppgan',
packages=['ppgan'],
packages=find_packages(),
include_package_data=True,
entry_points={"console_scripts": ["paddlegan= paddlegan.paddlegan:main"]},
author='PaddlePaddle Author',
version='0.1.0',
version='2.0.0-beta',
install_requires=requirements,
license='Apache License 2.0',
description='Awesome GAN toolkits based on PaddlePaddle',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册