Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetaRL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wang, Mia
MetaRL
Commits
06ae5603
Commit
06ae5603
authored
2 years ago
by
Max Ramsay King
Browse files
Options
Downloads
Patches
Plain Diff
more stuff
parent
5bb0d1c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MetaAugment/autoaugment_learners/evo_learner.py
+7
-6
7 additions, 6 deletions
MetaAugment/autoaugment_learners/evo_learner.py
with
7 additions
and
6 deletions
MetaAugment/autoaugment_learners/evo_learner.py
+
7
−
6
View file @
06ae5603
...
...
@@ -196,15 +196,15 @@ class evo_learner():
Solution_idx -> Int
"""
self
.
num_generations
=
iterations
self
.
running
_best
=
[
0
for
i
in
range
(
iterations
)]
self
.
running
_avg
=
[
0
for
i
in
range
(
iterations
)]
self
.
history
_best
=
[
0
for
i
in
range
(
iterations
)]
self
.
history
_avg
=
[
0
for
i
in
range
(
iterations
)]
self
.
gen_count
=
0
self
.
best_model
=
0
self
.
set_up_instance
()
self
.
ga_instance
.
run
()
self
.
running
_avg
=
self
.
running
_avg
/
self
.
num_solutions
self
.
history
_avg
=
self
.
history
_avg
/
self
.
num_solutions
solution
,
solution_fitness
,
solution_idx
=
self
.
ga_instance
.
best_solution
()
if
return_weights
:
...
...
@@ -250,10 +250,11 @@ class evo_learner():
fit_val
=
((
self
.
test_autoaugment_policy
(
full_policy
,
train_dataset
,
test_dataset
)[
0
])
/
+
self
.
test_autoaugment_policy
(
full_policy
,
train_dataset
,
test_dataset
)[
0
])
/
2
if
fit_val
>
self
.
running_best
[
self
.
gen_count
]:
self
.
running_best
[
self
.
gen_count
]
=
fit_val
if
fit_val
>
self
.
history_best
[
self
.
gen_count
]:
self
.
history_best
[
self
.
gen_count
]
=
fit_val
self
.
best_model
=
model_weights_dict
self
.
running
_avg
[
self
.
gen_count
]
+=
fit_val
self
.
history
_avg
[
self
.
gen_count
]
+=
fit_val
return
fit_val
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment