Skip to content

Commit

Permalink
Port SAC WIP (#581)
Browse files Browse the repository at this point in the history
Co-authored-by: KeWang1017 <[email protected]>
  • Loading branch information
2 people authored and michel-aractingi committed Dec 17, 2024
1 parent c9af8e3 commit def42ff
Show file tree
Hide file tree
Showing 2 changed files with 541 additions and 6 deletions.
39 changes: 39 additions & 0 deletions lerobot/common/policies/sac/configuration_sac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env python

# Copyright 2024 The HuggingFace Inc. team.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from dataclasses import dataclass


@dataclass
class SACConfig:
discount = 0.99
temperature_init = 1.0
num_critics = 2
critic_lr = 3e-4
actor_lr = 3e-4
critic_network_kwargs = {
"hidden_dims": [256, 256],
"activate_final": True,
}
actor_network_kwargs = {
"hidden_dims": [256, 256],
"activate_final": True,
}
policy_kwargs = {
"tanh_squash_distribution": True,
"std_parameterization": "uniform",
}
Loading

0 comments on commit def42ff

Please sign in to comment.