Skip to content
Snippets Groups Projects

Resolve "Add GANs"

Merged Guillaume HEUSCH requested to merge 4-add-gans into master
2 files
+ 22
20
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -3,26 +3,7 @@
import torch
import torch.nn as nn
def weights_init(m):
""" Initialize the weights
Initialize the weights in the different layers of
the network.
Parameters
----------
m : :py:class:`torch.nn.Conv2d`
The layer to initialize
"""
classname = m.__class__.__name__
if classname.find('Conv') != -1:
m.weight.data.normal_(0.0, 0.02)
elif classname.find('BatchNorm') != -1:
m.weight.data.normal_(1.0, 0.02)
m.bias.data.fill_(0)
from .utils import weights_init
class DCGAN_generator(nn.Module):
Loading