
--- model/attentivernn.py
+++ model/AttentiveRNN.py
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 |
groups=groups, |
45 | 45 |
dilation=dilation |
46 | 46 |
), |
47 |
- nn.ReLU() |
|
47 |
+ nn.LeakyReLU() |
|
48 | 48 |
) |
49 | 49 |
self.conv_hidden = nn.ModuleList() |
50 | 50 |
for block in range(blocks): |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 |
self.conv_hidden.append( |
53 | 53 |
self.conv2 |
54 | 54 |
) |
55 |
- self.relu = nn.ReLU |
|
55 |
+ self.leakyrelu = nn.LeakyReLU |
|
56 | 56 |
self.blocks = blocks |
57 | 57 |
self.layers = layers |
58 | 58 |
|
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 |
for i, hidden_layer in enumerate(self.conv_hidden): |
63 | 63 |
x = hidden_layer(x) |
64 | 64 |
if (i % self.layers == 0) & (i != 0): |
65 |
- x = F.relu(x) |
|
65 |
+ x = self.leakyrelu(x) |
|
66 | 66 |
x = x + shortcut |
67 | 67 |
return x |
68 | 68 |
|
--- model/autoencoder.py
+++ model/Autoencoder.py
No changes |
--- model/discriminator.py
+++ model/Discriminator.py
No changes |
--- model/AttentiveRNN GAN.py
+++ model/Generator.py
... | ... | @@ -1,5 +1,5 @@ |
1 |
-from attentivernn import AttentiveRNN |
|
2 |
-from autoencoder import AutoEncoder |
|
1 |
+from AttentiveRNN import AttentiveRNN |
|
2 |
+from Autoencoder import AutoEncoder |
|
3 | 3 |
from torch import nn |
4 | 4 |
|
5 | 5 |
|
+++ train.py
... | ... | @@ -0,0 +1,15 @@ |
1 | +import torch | |
2 | +import numpy as np | |
3 | +import pandas as pd | |
4 | +import plotly.express as px | |
5 | +from model import Autoencoder | |
6 | +from model import Generator | |
7 | +from model import Discriminator | |
8 | +from model import AttentiveRNN | |
9 | + | |
10 | +## 대충 열심히 GAN 구성하는 코드 | |
11 | +## 대충 그래서 weight export해서 inference용과 training용으로 나누는 코드 | |
12 | +## 대충 그래서 inference용은 attention map까지 하는 녀석과 deraining까지 하는 녀석 두개가 나오는 코드 | |
13 | +## 학습용은 그래서 풀 weight | |
14 | +## 대충 학습은 어떻게 돌려야 되지 하는 코드 | |
15 | +## generator에서 튀어 나온 애들을 따로 저장해야 하는건가 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?