Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygo-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Biluo Shen
ygo-agent
Commits
e6dc7744
Commit
e6dc7744
authored
Jun 06, 2024
by
sbl1996@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eval
parent
afbe4893
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
scripts/cleanba_rnd.py
scripts/cleanba_rnd.py
+1
-1
ygoai/rl/jax/utils.py
ygoai/rl/jax/utils.py
+4
-3
No files found.
scripts/cleanba_rnd.py
View file @
e6dc7744
...
@@ -336,7 +336,7 @@ def rollout(
...
@@ -336,7 +336,7 @@ def rollout(
):
):
eval_mode
=
'self'
if
args
.
eval_checkpoint
else
'bot'
eval_mode
=
'self'
if
args
.
eval_checkpoint
else
'bot'
if
eval_mode
!=
'bot'
:
if
eval_mode
!=
'bot'
:
eval_params
,
params_rt
=
params_queue
.
get
()
params_rt
,
eval_params
=
params_queue
.
get
()
else
:
else
:
params_rt
,
=
params_queue
.
get
()
params_rt
,
=
params_queue
.
get
()
...
...
ygoai/rl/jax/utils.py
View file @
e6dc7744
...
@@ -37,10 +37,11 @@ class RunningMeanStd(struct.PyTreeNode):
...
@@ -37,10 +37,11 @@ class RunningMeanStd(struct.PyTreeNode):
@
classmethod
@
classmethod
def
create
(
cls
,
shape
=
()):
def
create
(
cls
,
shape
=
()):
# TODO: use numpy and float64
return
cls
(
return
cls
(
mean
=
jnp
.
zeros
(
shape
,
"float
64
"
),
mean
=
jnp
.
zeros
(
shape
,
"float
32
"
),
var
=
jnp
.
ones
(
shape
,
"float
64
"
),
var
=
jnp
.
ones
(
shape
,
"float
32
"
),
count
=
jnp
.
full
(
shape
,
1e-4
,
"float
64
"
),
count
=
jnp
.
full
(
shape
,
1e-4
,
"float
32
"
),
)
)
def
update
(
self
,
x
):
def
update
(
self
,
x
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment