MCPcopy Create free account
hub / github.com/AIRMEC/HECTOR / FC_block

Class FC_block

model.py:96–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 return o1, o2, o3
95
96class FC_block(nn.Module):
97 def __init__(self, dim_in, dim_out, act_layer=nn.ReLU, dropout=True, p_dropout_fc=0.25):
98 super(FC_block, self).__init__()
99
100 self.fc = nn.Linear(dim_in, dim_out)
101 self.act = act_layer()
102 self.drop = nn.Dropout(p_dropout_fc) if dropout else nn.Identity()
103
104 def forward(self, x):
105 x = self.fc(x)
106 x = self.act(x)
107 x = self.drop(x)
108 return x
109
110class Categorical_encoding(nn.Module):
111 def __init__(self, taxonomy_in=3, embedding_dim=128, depth=1, act_fct='relu', dropout=True, p_dropout=0.25):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected