Return a stack of linear->norm->sigmoid layers
(in_size, out_size, norm_layer)
| 59 | # |
| 60 | |
| 61 | def fc_layer(in_size, out_size, norm_layer): |
| 62 | """Return a stack of linear->norm->sigmoid layers""" |
| 63 | return nn.Sequential(nn.Linear(in_size, out_size), norm_layer(out_size), nn.Sigmoid()) |
| 64 | |
| 65 | class Net(nn.Module): |
| 66 | """Define a network that has num_layers of linear->norm->sigmoid transformations""" |