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
5438a72c
Commit
5438a72c
authored
1 month ago
by
Schneider Leo
Browse files
Options
Downloads
Patches
Plain Diff
change : file structure modification
parent
3137787e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/config.py
+0
-18
0 additions, 18 deletions
config/config.py
image_ref/config.py
+22
-0
22 additions, 0 deletions
image_ref/config.py
image_ref/dataset_ref.py
+0
-0
0 additions, 0 deletions
image_ref/dataset_ref.py
image_ref/main.py
+3
-3
3 additions, 3 deletions
image_ref/main.py
with
25 additions
and
21 deletions
config/config.py
+
0
−
18
View file @
5438a72c
...
...
@@ -20,23 +20,5 @@ def load_args():
return
args
def
load_args_contrastive
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'
--epoches
'
,
type
=
int
,
default
=
3
)
parser
.
add_argument
(
'
--save_inter
'
,
type
=
int
,
default
=
50
)
parser
.
add_argument
(
'
--eval_inter
'
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
'
--noise_threshold
'
,
type
=
int
,
default
=
0
)
parser
.
add_argument
(
'
--lr
'
,
type
=
float
,
default
=
0.001
)
parser
.
add_argument
(
'
--batch_size
'
,
type
=
int
,
default
=
64
)
parser
.
add_argument
(
'
--model
'
,
type
=
str
,
default
=
'
ResNet18
'
)
parser
.
add_argument
(
'
--model_type
'
,
type
=
str
,
default
=
'
duo
'
)
parser
.
add_argument
(
'
--dataset_dir
'
,
type
=
str
,
default
=
'
../data/processed_data/npy_image/data_training
'
)
parser
.
add_argument
(
'
--dataset_ref_dir
'
,
type
=
str
,
default
=
'
img_ref
'
)
parser
.
add_argument
(
'
--output
'
,
type
=
str
,
default
=
'
../output/out_contrastive.csv
'
)
parser
.
add_argument
(
'
--save_path
'
,
type
=
str
,
default
=
'
../output/best_model_constrastive.pt
'
)
parser
.
add_argument
(
'
--pretrain_path
'
,
type
=
str
,
default
=
None
)
args
=
parser
.
parse_args
()
return
args
This diff is collapsed.
Click to expand it.
image_ref/config.py
0 → 100644
+
22
−
0
View file @
5438a72c
import
argparse
def
load_args_contrastive
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'
--epoches
'
,
type
=
int
,
default
=
3
)
parser
.
add_argument
(
'
--save_inter
'
,
type
=
int
,
default
=
50
)
parser
.
add_argument
(
'
--eval_inter
'
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
'
--noise_threshold
'
,
type
=
int
,
default
=
0
)
parser
.
add_argument
(
'
--lr
'
,
type
=
float
,
default
=
0.001
)
parser
.
add_argument
(
'
--batch_size
'
,
type
=
int
,
default
=
64
)
parser
.
add_argument
(
'
--model
'
,
type
=
str
,
default
=
'
ResNet18
'
)
parser
.
add_argument
(
'
--model_type
'
,
type
=
str
,
default
=
'
duo
'
)
parser
.
add_argument
(
'
--dataset_dir
'
,
type
=
str
,
default
=
'
../data/processed_data/npy_image/data_training
'
)
parser
.
add_argument
(
'
--dataset_ref_dir
'
,
type
=
str
,
default
=
'
img_ref
'
)
parser
.
add_argument
(
'
--output
'
,
type
=
str
,
default
=
'
../output/out_contrastive.csv
'
)
parser
.
add_argument
(
'
--save_path
'
,
type
=
str
,
default
=
'
../output/best_model_constrastive.pt
'
)
parser
.
add_argument
(
'
--pretrain_path
'
,
type
=
str
,
default
=
None
)
args
=
parser
.
parse_args
()
return
args
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dataset
/dataset_ref.py
→
image_ref
/dataset_ref.py
+
0
−
0
View file @
5438a72c
File moved
This diff is collapsed.
Click to expand it.
image_ref/main.py
+
3
−
3
View file @
5438a72c
...
...
@@ -6,11 +6,11 @@
import
matplotlib.pyplot
as
plt
import
numpy
as
np
from
config
.config
import
load_args
,
load_args_contrastive
from
dataset.
dataset_ref
import
load_data
,
load_data_duo
from
config
import
load_args_contrastive
from
dataset_ref
import
load_data
,
load_data_duo
import
torch
import
torch.nn
as
nn
from
image_ref.
model
import
Classification_model_contrastive
,
Classification_model_duo_contrastive
from
model
import
Classification_model_contrastive
,
Classification_model_duo_contrastive
import
torch.optim
as
optim
from
sklearn.metrics
import
confusion_matrix
import
seaborn
as
sn
...
...
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