Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pseudo_image
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
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
Léo Schneider
pseudo_image
Commits
c6a40b3a
Commit
c6a40b3a
authored
1 week ago
by
Schneider Leo
Browse files
Options
Downloads
Patches
Plain Diff
add : wandb confidence and confusion matrix
parent
81eb0ecc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
image_ref/hyperparameter_res_analysis.py
+6
-0
6 additions, 0 deletions
image_ref/hyperparameter_res_analysis.py
image_ref/main.py
+12
-1
12 additions, 1 deletion
image_ref/main.py
with
18 additions
and
1 deletion
image_ref/hyperparameter_res_analysis.py
0 → 100644
+
6
−
0
View file @
c6a40b3a
import
pandas
as
pd
import
numpy
as
np
df
=
pd
.
read_csv
(
'
../df_results_contrastive.csv
'
)
best_param
=
df
[
df
[
'
val loss
'
]
<
0.003
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
image_ref/main.py
+
12
−
1
View file @
c6a40b3a
...
@@ -2,7 +2,7 @@ import os
...
@@ -2,7 +2,7 @@ import os
import
wandb
as
wdb
import
wandb
as
wdb
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
numpy
as
np
import
PIL
from
config
import
load_args_contrastive
from
config
import
load_args_contrastive
from
dataset_ref
import
load_data_duo
from
dataset_ref
import
load_data_duo
import
torch
import
torch
...
@@ -180,6 +180,7 @@ def run_duo(args):
...
@@ -180,6 +180,7 @@ def run_duo(args):
plt
.
show
()
plt
.
show
()
plt
.
savefig
(
args
.
base_out
+
'
_training_plot.png
'
)
plt
.
savefig
(
args
.
base_out
+
'
_training_plot.png
'
)
# load and evaluate best model
# load and evaluate best model
load_model
(
model
,
args
.
save_path
)
load_model
(
model
,
args
.
save_path
)
if
args
.
dataset_test_dir
is
not
None
:
if
args
.
dataset_test_dir
is
not
None
:
...
@@ -190,6 +191,16 @@ def run_duo(args):
...
@@ -190,6 +191,16 @@ def run_duo(args):
args
.
base_out
+
'
_confidence_matrix_val.png
'
)
args
.
base_out
+
'
_confidence_matrix_val.png
'
)
if
args
.
wandb
is
not
None
:
if
args
.
wandb
is
not
None
:
if
args
.
dataset_test_dir
is
not
None
:
wdb
.
log
({
'
confidence matrix val
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confidence_matrix_val.png
'
),
'
confidence matrix test
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confidence_matrix_test.png
'
),
'
confusion matrix val
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confusion_matrix_val.png
'
),
'
confusion matrix test
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confusion_matrix_test.png
'
)})
else
:
wdb
.
log
({
'
confidence matrix val
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confidence_matrix_val.png
'
),
'
confidence matrix test
'
:
wdb
.
Image
(
args
.
base_out
+
'
_confidence_matrix_test.png
'
),})
wdb
.
finish
()
wdb
.
finish
()
...
...
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