Change final value network activation to identity
This commit is contained in:
@@ -65,7 +65,7 @@
|
|||||||
hidden_n: 3,
|
hidden_n: 3,
|
||||||
hidden_dim: 50,
|
hidden_dim: 50,
|
||||||
output_dim: 1, // number of outputs e.g. number of actions, or just one
|
output_dim: 1, // number of outputs e.g. number of actions, or just one
|
||||||
final_activation: 'sigmoid',
|
final_activation: 'id',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
policy_optim: {
|
policy_optim: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import torch
|
import torch
|
||||||
from torch.nn import functional
|
from torch.nn import functional, Identity
|
||||||
|
|
||||||
def parse_functional(functional_config):
|
def parse_functional(functional_config):
|
||||||
if isinstance(functional_config, str):
|
if isinstance(functional_config, str):
|
||||||
@@ -9,4 +9,6 @@ def parse_functional(functional_config):
|
|||||||
return torch.sigmoid
|
return torch.sigmoid
|
||||||
elif functional_config == 'softmax':
|
elif functional_config == 'softmax':
|
||||||
return functional.softmax
|
return functional.softmax
|
||||||
|
elif functional_config == 'id':
|
||||||
|
return Identity()
|
||||||
return None
|
return None
|
||||||
Reference in New Issue
Block a user