mirror of
https://github.com/gryf/coach.git
synced 2026-05-01 21:40:56 +02:00
network_imporvements branch merge
This commit is contained in:
@@ -3,9 +3,8 @@ import math
|
||||
from rl_coach.agents.ddqn_agent import DDQNAgentParameters
|
||||
from rl_coach.architectures.tensorflow_components.heads.dueling_q_head import DuelingQHeadParameters
|
||||
from rl_coach.base_parameters import VisualizationParameters, MiddlewareScheme
|
||||
from rl_coach.core_types import TrainingSteps, EnvironmentEpisodes, EnvironmentSteps, RunPhase
|
||||
from rl_coach.core_types import TrainingSteps, EnvironmentEpisodes, EnvironmentSteps
|
||||
from rl_coach.environments.carla_environment import CarlaEnvironmentParameters
|
||||
from rl_coach.environments.environment import MaxDumpMethod, SelectedPhaseOnlyDumpMethod
|
||||
from rl_coach.filters.action.box_discretization import BoxDiscretization
|
||||
from rl_coach.filters.filter import OutputFilter
|
||||
from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager
|
||||
@@ -26,9 +25,9 @@ schedule_params.heatup_steps = EnvironmentSteps(1000)
|
||||
#########
|
||||
agent_params = DDQNAgentParameters()
|
||||
agent_params.network_wrappers['main'].learning_rate = 0.00025
|
||||
agent_params.network_wrappers['main'].heads_parameters = [DuelingQHeadParameters()]
|
||||
agent_params.network_wrappers['main'].heads_parameters = \
|
||||
[DuelingQHeadParameters(rescale_gradient_from_head_by_factor=1/math.sqrt(2))]
|
||||
agent_params.network_wrappers['main'].middleware_parameters.scheme = MiddlewareScheme.Empty
|
||||
agent_params.network_wrappers['main'].rescale_gradient_from_head_by_factor = [1/math.sqrt(2), 1/math.sqrt(2)]
|
||||
agent_params.network_wrappers['main'].clip_gradients = 10
|
||||
agent_params.algorithm.num_consecutive_playing_steps = EnvironmentSteps(4)
|
||||
agent_params.network_wrappers['main'].input_embedders_parameters['forward_camera'] = \
|
||||
@@ -40,11 +39,6 @@ agent_params.output_filter.add_action_filter('discretization', BoxDiscretization
|
||||
# Environment #
|
||||
###############
|
||||
env_params = CarlaEnvironmentParameters()
|
||||
env_params.level = 'town1'
|
||||
|
||||
vis_params = VisualizationParameters()
|
||||
vis_params.video_dump_methods = [SelectedPhaseOnlyDumpMethod(RunPhase.TEST), MaxDumpMethod()]
|
||||
vis_params.dump_mp4 = False
|
||||
|
||||
graph_manager = BasicRLGraphManager(agent_params=agent_params, env_params=env_params,
|
||||
schedule_params=schedule_params, vis_params=vis_params)
|
||||
schedule_params=schedule_params, vis_params=VisualizationParameters())
|
||||
|
||||
Reference in New Issue
Block a user