initial commit
This commit is contained in:
11
apps/generative_models/modules.py
Normal file
11
apps/generative_models/modules.py
Normal file
@@ -0,0 +1,11 @@
|
||||
"""Helper modules to build our networks."""
|
||||
import torch as th
|
||||
|
||||
|
||||
class Flatten(th.nn.Module):
|
||||
def __init__(self):
|
||||
super(Flatten, self).__init__()
|
||||
|
||||
def forward(self, x):
|
||||
bs = x.shape[0]
|
||||
return x.view(bs, -1)
|
Reference in New Issue
Block a user