Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mu-map
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
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamino Huxohl
mu-map
Commits
5c3e38a5
Commit
5c3e38a5
authored
2 years ago
by
Tamino Huxohl
Browse files
Options
Downloads
Patches
Plain Diff
random search initializes all random seeds
parent
488452f2
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
mu_map/training/random_search.py
+4
-1
4 additions, 1 deletion
mu_map/training/random_search.py
with
4 additions
and
1 deletion
mu_map/training/random_search.py
+
4
−
1
View file @
5c3e38a5
...
@@ -8,8 +8,9 @@ import shutil
...
@@ -8,8 +8,9 @@ import shutil
import
sys
import
sys
from
typing
import
Any
,
Callable
,
Dict
,
List
,
Optional
from
typing
import
Any
,
Callable
,
Dict
,
List
,
Optional
import
torch
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
import
torch
from
mu_map.dataset.default
import
MuMapDataset
from
mu_map.dataset.default
import
MuMapDataset
from
mu_map.dataset.patches
import
MuMapPatchDataset
from
mu_map.dataset.patches
import
MuMapPatchDataset
...
@@ -289,6 +290,8 @@ class RandomSearchCGAN(RandomSearch):
...
@@ -289,6 +290,8 @@ class RandomSearchCGAN(RandomSearch):
seed
=
random
.
randint
(
0
,
2
**
32
-
1
)
seed
=
random
.
randint
(
0
,
2
**
32
-
1
)
random
.
seed
(
seed
)
random
.
seed
(
seed
)
torch
.
manual_seed
(
args
.
seed
)
np
.
random
.
seed
(
args
.
seed
)
self
.
logger
.
info
(
f
"
Random seed for iteration
{
i
}
is
{
seed
}
"
)
self
.
logger
.
info
(
f
"
Random seed for iteration
{
i
}
is
{
seed
}
"
)
self
.
_setup_run
(
i
)
self
.
_setup_run
(
i
)
...
...
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