File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
# GAN with Gradient Reversal Layer
2
- Implemented with Chainer
2
+ Implemented with Chainer and PyTorch.
3
3
4
4
Ganin, Yaroslav, et al. "Domain-adversarial training of neural networks." The Journal of Machine Learning Research 17.1 (2016): 2096-2030.
5
5
6
- ## Requirements
7
- Chainer, OpenCV
6
+ ## Requirements (Chainer)
7
+ Chainer, OpenCV, NumPy
8
8
9
9
``` bash
10
- $ pip install chainer opencv-python
10
+ $ pip install chainer opencv-python numpy
11
11
```
12
12
13
+ ## Requirements (PyTorch)
14
+ PyTorch, Ignite, OpenCV, NumPy
15
+
16
+ PyTorch: see the [ official document] ( https://pytorch.org/get-started/locally/ ) .
17
+
18
+ ``` bash
19
+ $ pip install pytorch-ignite opencv-python numpy
20
+ ```
13
21
14
22
## Training of GAN
15
23
``` bash
16
- $ python gan .py [options]
24
+ $ python train_gan .py [options]
17
25
```
18
26
19
27
## Image generation from trained generator
Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
2
3
- from gan import get_generator
3
+ from train_gan import get_generator
4
4
import cv2
5
5
from pathlib import Path
6
6
import pprint
You can’t perform that action at this time.
0 commit comments