MCPcopy Create free account
hub / github.com/pytorch/tutorials / fc_layer

Function fc_layer

intermediate_source/visualizing_gradients_tutorial.py:61–63  ·  view source on GitHub ↗

Return a stack of linear->norm->sigmoid layers

(in_size, out_size, norm_layer)

Source from the content-addressed store, hash-verified

59#
60
61def 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
65class Net(nn.Module):
66 """Define a network that has num_layers of linear->norm->sigmoid transformations"""

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected