MCPcopy Create free account
hub / github.com/MotrixLab/insactor / build_MLP

Function build_MLP

diffplanner/models/utils/mlp.py:4–13  ·  view source on GitHub ↗
(dim_list, latent_dim)

Source from the content-addressed store, hash-verified

2
3
4def build_MLP(dim_list, latent_dim):
5 model_list = []
6 prev = dim_list[0]
7 for cur in dim_list[1:]:
8 model_list.append(nn.Linear(prev, cur))
9 model_list.append(nn.GELU())
10 prev = cur
11 model_list.append(nn.Linear(prev, latent_dim))
12 model = nn.Sequential(*model_list)
13 return model

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected