Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tongue-diagnosis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhiyang.zhou
tongue-diagnosis
Commits
ad22348f
Commit
ad22348f
authored
Jul 08, 2021
by
zhiyang.zhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
1c4542b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
img_dataset.py
img_dataset.py
+2
-2
train_tongue_diagnosis.py
train_tongue_diagnosis.py
+2
-2
No files found.
img_dataset.py
View file @
ad22348f
...
@@ -11,8 +11,8 @@ property_label_to_idx = {'淡红': 0, '淡白': 1, '红': 2, '淡紫': 3, '紫
...
@@ -11,8 +11,8 @@ property_label_to_idx = {'淡红': 0, '淡白': 1, '红': 2, '淡紫': 3, '紫
class
Image_DataSet
(
torch
.
utils
.
data
.
Dataset
):
class
Image_DataSet
(
torch
.
utils
.
data
.
Dataset
):
def
__init__
(
self
,
transform
=
None
):
def
__init__
(
self
,
processed_dir
=
'./processed-data'
,
transform
=
None
):
self
.
processed_dir
=
'./processed-data'
self
.
processed_dir
=
processed_dir
self
.
transform
=
transform
self
.
transform
=
transform
def
__getitem__
(
self
,
index
):
def
__getitem__
(
self
,
index
):
...
...
train_tongue_diagnosis.py
View file @
ad22348f
...
@@ -58,8 +58,8 @@ transform_train = transforms.Compose([
...
@@ -58,8 +58,8 @@ transform_train = transforms.Compose([
transforms
.
ToTensor
(),
transforms
.
ToTensor
(),
normalizer
normalizer
])
])
processed_dir
=
'./processed-data'
tongue_dataset_train
=
Image_DataSet
(
transform
=
transform_train
)
tongue_dataset_train
=
Image_DataSet
(
processed_dir
=
processed_dir
,
transform
=
transform_train
)
tongue_train_loader
=
torch
.
utils
.
data
.
DataLoader
(
tongue_dataset_train
,
batch_size
=
args
.
batch_size
,
shuffle
=
True
,
tongue_train_loader
=
torch
.
utils
.
data
.
DataLoader
(
tongue_dataset_train
,
batch_size
=
args
.
batch_size
,
shuffle
=
True
,
**
kwargs
)
**
kwargs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment