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
a93e7a88
Commit
a93e7a88
authored
Feb 22, 2024
by
biluo.shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eval
parent
29e1a24b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
scripts/eval.py
scripts/eval.py
+8
-4
No files found.
scripts/eval.py
View file @
a93e7a88
...
...
@@ -41,7 +41,7 @@ class Args:
"""the language to use"""
max_options
:
int
=
24
"""the maximum number of options"""
n_history_actions
:
int
=
8
n_history_actions
:
int
=
16
"""the number of history actions to use"""
player
:
int
=
-
1
...
...
@@ -71,7 +71,7 @@ class Args:
"""the number of channels for the agent"""
checkpoint
:
str
=
"checkpoints/agent.pt"
"""the checkpoint to load"""
embedding_file
:
str
=
"embeddings_en.npy"
embedding_file
:
Optional
[
str
]
=
"embeddings_en.npy"
"""the embedding file for card embeddings"""
compile
:
bool
=
False
...
...
@@ -130,9 +130,13 @@ if __name__ == "__main__":
envs
=
RecordEpisodeStatistics
(
envs
)
if
args
.
agent
:
embeddings
=
np
.
load
(
args
.
embedding_file
)
if
args
.
embedding_file
:
embeddings
=
np
.
load
(
args
.
embedding_file
)
embedding_shape
=
embeddings
.
shape
else
:
embedding_shape
=
None
L
=
args
.
num_layers
agent
=
Agent
(
args
.
num_channels
,
L
,
L
,
1
,
embedding
s
.
shape
)
.
to
(
device
)
agent
=
Agent
(
args
.
num_channels
,
L
,
L
,
1
,
embedding
_
shape
)
.
to
(
device
)
agent
=
agent
.
eval
()
state_dict
=
torch
.
load
(
args
.
checkpoint
,
map_location
=
device
)
...
...
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