网站首页
编程语言
数据库
系统相关
其他分享
编程问答
MOGANET
2024-11-10
MOGANET-SA模块
paper`importtorch.nnasnnimporttorchimporttorch.nn.functionalasFdefbuild_act_layer(act_type):"""Buildactivationlayer."""ifact_typeisNone:returnnn.Identity()assertact_typein['GELU','ReL
2024-11-09
MOGANET-CA模块
paper`importtorchimporttorch.nnasnndefbuild_act_layer(act_type):#Buildactivationlayerifact_typeisNone:returnnn.Identity()assertact_typein['GELU','ReLU','SiLU']ifact_type=='SiLU':returnn