M3000j's picture
Upload folder using huggingface_hub
31726e5 verified
raw
history blame contribute delete
239 Bytes
"""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)