未验证 提交 97c1d594 编写于 作者: L LielinJiang 提交者: GitHub

Fix edvr on wins (#323)

* fix edvr bug on windows

* update version

* update install docs

* fix train bug on cpu
上级 5827d7df
......@@ -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.
......
......@@ -2,18 +2,15 @@
本文档包含了如何安装PaddleGAN以及相关依赖,更多产品简介请参考[README](https://github.com/PaddlePaddle/PaddleGAN/blob/develop/README_cn.md)
## 环境依赖
- PaddlePaddle >= 2.0.0
- PaddlePaddle >= 2.1.0
- Python >= 3.6
- CUDA >= 9.0
- CUDA >= 10.1
## 安装PaddlePaddle
```
# CUDA9.0
python -m pip install paddlepaddle-gpu==2.0.1.post90 -i https://mirror.baidu.com/pypi/simple
# CUDA10.1
python -m pip install paddlepaddle-gpu==2.0.1.post101 -f https://mirror.baidu.com/pypi/simple
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
......
......@@ -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__
......@@ -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)
......
......@@ -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, :, :, :]
......
# 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'
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册