MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / build_act_layer

Function build_act_layer

models/modules/utils.py:4–12  ·  view source on GitHub ↗
(act_layer)

Source from the content-addressed store, hash-verified

2
3
4def build_act_layer(act_layer):
5 if act_layer == 'ReLU':
6 return nn.ReLU(inplace=True)
7 elif act_layer == 'SiLU':
8 return nn.SiLU(inplace=True)
9 elif act_layer == 'GELU':
10 return nn.GELU()
11
12 raise NotImplementedError(f'build_act_layer does not support {act_layer}')
13
14
15def build_norm_layer(dim,

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected