4bd09281f05185e5625112941b7ed11cf4e6cad5,catalyst/rl/agent/critic.py,StateActionCritic,get_from_params,#Any#Any#Any#Any#,138
Before Change
env_spec: EnvironmentSpec,
):
// @TODO: refactor
observation_size = reduce(
lambda x, y: x * y, env_spec.state_space.shape
)
state_action_net_params["observation_net_params"]["hiddens"]\
.insert(0, observation_size)
action_size = reduce(lambda x, y: x * y, env_spec.action_space.shape)
state_action_net_params["action_net_params"]["hiddens"] \
.insert(0, action_size)
After Change
env_spec: EnvironmentSpec,
):
// @TODO: any better solution?
state_action_net_params["state_shape"] = \
env_spec.state_space.shape
state_action_net_params["action_shape"] = \
env_spec.action_space.shape
state_action_net = StateActionNet.get_from_params(
**state_action_net_params
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: catalyst-team/catalyst
Commit Name: 4bd09281f05185e5625112941b7ed11cf4e6cad5
Time: 2019-09-05
Author: scitator@gmail.com
File Name: catalyst/rl/agent/critic.py
Class Name: StateActionCritic
Method Name: get_from_params
Project Name: catalyst-team/catalyst
Commit Name: 4bd09281f05185e5625112941b7ed11cf4e6cad5
Time: 2019-09-05
Author: scitator@gmail.com
File Name: catalyst/rl/agent/actor.py
Class Name: Actor
Method Name: get_from_params
Project Name: catalyst-team/catalyst
Commit Name: 4bd09281f05185e5625112941b7ed11cf4e6cad5
Time: 2019-09-05
Author: scitator@gmail.com
File Name: catalyst/rl/agent/critic.py
Class Name: StateCritic
Method Name: get_from_params