Merge branch 'main' of https://github.com/sisl/InteractionImitation into main
This commit is contained in:
@@ -2,13 +2,11 @@ import torch
|
||||
from torch.nn import functional
|
||||
|
||||
def parse_functional(functional_config):
|
||||
if functional_config is None:
|
||||
return None
|
||||
elif isinstance(functional_config, str):
|
||||
if isinstance(functional_config, str):
|
||||
if functional_config == 'relu':
|
||||
return functional.relu
|
||||
elif functional_config == 'sigmoid':
|
||||
return functional.sigmoid
|
||||
return torch.sigmoid
|
||||
elif functional_config == 'softmax':
|
||||
return functional.softmax
|
||||
|
||||
return None
|
||||
Reference in New Issue
Block a user