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
ddca7ae2
"git@gitlab.doc.ic.ac.uk:sweng-group-15/drawing-app.git" did not exist on "4271971d9c049bc4892f6289e659c2c72da791cd"
Commit
ddca7ae2
authored
2 years ago
by
Sun Jin Kim
Browse files
Options
Downloads
Patches
Plain Diff
fix training.py evo_learner call
parent
8b36ecef
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auto_augmentation/training.py
+18
-5
18 additions, 5 deletions
auto_augmentation/training.py
with
18 additions
and
5 deletions
auto_augmentation/training.py
+
18
−
5
View file @
ddca7ae2
...
@@ -19,7 +19,9 @@ torch.manual_seed(0)
...
@@ -19,7 +19,9 @@ torch.manual_seed(0)
# import agents and its functions
# import agents and its functions
from
MetaAugment.autoaugment_learners
import
ucb_learner
as
UCB1_JC
from
MetaAugment.autoaugment_learners
import
ucb_learner
as
UCB1_JC
from
MetaAugment
import
Evo_learner
as
Evo
import
MetaAugment.autoaugment_learners
as
aal
import
MetaAugment.controller_networks
as
cont_n
import
MetaAugment.child_networks
as
cn
...
@@ -57,13 +59,24 @@ def response():
...
@@ -57,13 +59,24 @@ def response():
if
auto_aug_learner
==
'
UCB
'
:
if
auto_aug_learner
==
'
UCB
'
:
policies
=
UCB1_JC
.
generate_policies
(
num_policies
,
num_sub_policies
)
policies
=
UCB1_JC
.
generate_policies
(
num_policies
,
num_sub_policies
)
q_values
,
best_q_values
=
UCB1_JC
.
run_UCB1
(
policies
,
batch_size
,
learning_rate
,
ds
,
toy_size
,
max_epochs
,
early_stop_num
,
iterations
,
IsLeNet
,
ds_name
)
q_values
,
best_q_values
=
UCB1_JC
.
run_UCB1
(
policies
,
batch_size
,
learning_rate
,
ds
,
toy_size
,
max_epochs
,
early_stop_num
,
iterations
,
IsLeNet
,
ds_name
)
best_q_values
=
np
.
array
(
best_q_values
)
best_q_values
=
np
.
array
(
best_q_values
)
elif
auto_aug_learner
==
'
Evolutionary Learner
'
:
elif
auto_aug_learner
==
'
Evolutionary Learner
'
:
network
=
Evo
.
Learn
er
(
fun_num
=
num_funcs
,
p_bins
=
1
,
m_bins
=
1
,
sub_num_pol
=
1
)
network
=
cont_n
.
evo_controll
er
(
fun_num
=
num_funcs
,
p_bins
=
1
,
m_bins
=
1
,
sub_num_pol
=
1
)
child_network
=
Evo
.
LeNet
()
child_network
=
cn
.
LeNet
()
learner
=
Evo
.
Evolutionary
_learner
(
network
=
network
,
fun_num
=
num_funcs
,
p_bins
=
1
,
mag_bins
=
1
,
sub_num_pol
=
1
,
ds
=
ds
,
ds_name
=
ds_name
,
exclude_method
=
exclude_method
,
child_network
=
child_network
)
learner
=
aal
.
evo
_learner
(
network
=
network
,
fun_num
=
num_funcs
,
p_bins
=
1
,
mag_bins
=
1
,
sub_num_pol
=
1
,
ds
=
ds
,
ds_name
=
ds_name
,
exclude_method
=
exclude_method
,
child_network
=
child_network
)
learner
.
run_instance
()
learner
.
run_instance
()
elif
auto_aug_learner
==
'
Random Searcher
'
:
elif
auto_aug_learner
==
'
Random Searcher
'
:
pass
pass
...
...
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