diff --git a/docs/en_US/install.md b/docs/en_US/install.md index 8cdac5f2e8fdb98a82a63a23d5f760aeddf444a4..91ca764eb68b99ca1abe1c58b83e5d9e8ce63078 100644 --- a/docs/en_US/install.md +++ b/docs/en_US/install.md @@ -2,13 +2,13 @@ ### requirements -* PaddlePaddle >= 2.0.0 +* PaddlePaddle >= 2.1.0 * Python >= 3.6 -* CUDA >= 9.0 +* CUDA >= 10.1 ### 1. Install PaddlePaddle ``` -pip install -U paddlepaddle-gpu==2.0.0 +pip install -U paddlepaddle-gpu ``` Note: command above will install paddle with cuda10.2, if your installed cuda is different, please visit home page of [paddlepaddle](https://www.paddlepaddle.org.cn/install/quick) for more help. diff --git a/docs/zh_CN/install.md b/docs/zh_CN/install.md index 078f702302e022637666c59e68a705802d052c1c..10234035f1338c6ca3ed40f278e14596e4415b00 100644 --- a/docs/zh_CN/install.md +++ b/docs/zh_CN/install.md @@ -1,4 +1,21 @@ -## 安装PaddleGAN +# 安装文档 +本文档包含了如何安装PaddleGAN以及相关依赖,更多产品简介请参考[README](https://github.com/PaddlePaddle/PaddleGAN/blob/develop/README_cn.md)。 + +## 环境依赖 +- PaddlePaddle >= 2.1.0 +- Python >= 3.6 +- CUDA >= 10.1 + +## 安装PaddlePaddle + +``` +# CUDA10.1 +python -m pip install paddlepaddle-gpu==2.1.0.post101 -f https://mirror.baidu.com/pypi/simple + +# CPU +python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple + +``` ### 要求 diff --git a/ppgan/__init__.py b/ppgan/__init__.py index 9e83ec486fc6232d90d965425588645bc1204386..0f460a98dcd9e22cccfc6776ea60d13005c34f87 100644 --- a/ppgan/__init__.py +++ b/ppgan/__init__.py @@ -11,3 +11,5 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from .version import ppgan_version as __version__ diff --git a/ppgan/datasets/builder.py b/ppgan/datasets/builder.py index ae2369ab283cbde23984077a682d8c504859e724..a192f3f73d2596d31163eed0ef3a2b579a5f10d5 100644 --- a/ppgan/datasets/builder.py +++ b/ppgan/datasets/builder.py @@ -34,8 +34,6 @@ def build_dataloader(cfg, is_train=True, distributed=True): name = cfg_.pop('name') dataset = DATASETS.get(name)(**cfg_) - place = paddle.CUDAPlace(ParallelEnv().dev_id) \ - if ParallelEnv().nranks > 1 else paddle.CUDAPlace(0) if distributed: sampler = DistributedBatchSampler(dataset, @@ -45,7 +43,6 @@ def build_dataloader(cfg, is_train=True, distributed=True): dataloader = paddle.io.DataLoader(dataset, batch_sampler=sampler, - places=place, num_workers=num_workers, use_shared_memory=use_shared_memory) else: @@ -53,7 +50,6 @@ def build_dataloader(cfg, is_train=True, distributed=True): batch_size=batch_size, shuffle=True if is_train else False, drop_last=True if is_train else False, - places=place, use_shared_memory=False, num_workers=num_workers) diff --git a/ppgan/models/edvr_model.py b/ppgan/models/edvr_model.py index 3a3330e175d29286c2606ddea9a642a55a56e45b..86f269aa1e0592d1871ed9a128ce7b6d4faedd86 100644 --- a/ppgan/models/edvr_model.py +++ b/ppgan/models/edvr_model.py @@ -41,7 +41,7 @@ class EDVRModel(BaseSRModel): init_edvr_weight(self.nets['generator']) def setup_input(self, input): - self.lq = paddle.to_tensor(input['lq']) + self.lq = input['lq'] self.visual_items['lq'] = self.lq[:, 2, :, :, :] self.visual_items['lq-2'] = self.lq[:, 0, :, :, :] self.visual_items['lq-1'] = self.lq[:, 1, :, :, :] diff --git a/ppgan/version.py b/ppgan/version.py new file mode 100644 index 0000000000000000000000000000000000000000..7ec66afec801c1d0e08f5fe1eb1c89a57546ec17 --- /dev/null +++ b/ppgan/version.py @@ -0,0 +1,15 @@ +# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ppgan_version = '2.0.0' diff --git a/setup.py b/setup.py index 44c31d1e8cc658681d1950eeeefb6a79b4d54527..50bdb31eb583ca1ff0b8ce8628cc163ac9299a6d 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,8 @@ from setuptools import setup from setuptools import find_packages from io import open +from ppgan import __version__ + with open('requirements.txt', encoding="utf-8-sig") as f: requirements = f.readlines() @@ -32,7 +34,7 @@ setup( include_package_data=True, entry_points={"console_scripts": ["paddlegan= paddlegan.paddlegan:main"]}, author='PaddlePaddle Author', - version='2.0.0-beta', + version=__version__, install_requires=requirements, license='Apache License 2.0', description='Awesome GAN toolkits based on PaddlePaddle',