Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210610347
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210610347
Commits
2f0c5787
Commit
2f0c5787
authored
Jul 20, 2021
by
何向东
Browse files
Options
Downloads
Patches
Plain Diff
解决utils引用冲突
parent
56e66669
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.py
+2
-2
2 additions, 2 deletions
main.py
utils/__init__.py
+1
-0
1 addition, 0 deletions
utils/__init__.py
with
3 additions
and
2 deletions
main.py
+
2
−
2
View file @
2f0c5787
...
@@ -14,7 +14,7 @@ from unet_medical.unet_model import UNetMedical
...
@@ -14,7 +14,7 @@ from unet_medical.unet_model import UNetMedical
from
nets.deeplab_v3
import
deeplab_v3
from
nets.deeplab_v3
import
deeplab_v3
from
dataset
import
GetDatasetGenerator
from
dataset
import
GetDatasetGenerator
from
loss
import
SoftmaxCrossEntropyLoss
from
loss
import
SoftmaxCrossEntropyLoss
from
utils
import
learning_rates
from
utils
import
exponential_lr
context
.
set_context
(
mode
=
context
.
PYNATIVE_MODE
,
save_graphs
=
False
,
context
.
set_context
(
mode
=
context
.
PYNATIVE_MODE
,
save_graphs
=
False
,
device_target
=
'
Ascend
'
,
device_id
=
7
)
device_target
=
'
Ascend
'
,
device_id
=
7
)
...
@@ -25,7 +25,7 @@ train_dataset_generator = GetDatasetGenerator('./datasets', 'train')
...
@@ -25,7 +25,7 @@ train_dataset_generator = GetDatasetGenerator('./datasets', 'train')
train_dataset
=
ds
.
GeneratorDataset
(
train_dataset_generator
,
[
"
data
"
,
"
label
"
],
shuffle
=
True
)
train_dataset
=
ds
.
GeneratorDataset
(
train_dataset_generator
,
[
"
data
"
,
"
label
"
],
shuffle
=
True
)
train_dataset
=
train_dataset
.
batch
(
4
,
drop_remainder
=
True
)
train_dataset
=
train_dataset
.
batch
(
4
,
drop_remainder
=
True
)
lr_iter
=
learning_rates
.
exponential_lr
(
3e-5
,
20
,
0.98
,
500
,
staircase
=
True
)
lr_iter
=
exponential_lr
(
3e-5
,
20
,
0.98
,
500
,
staircase
=
True
)
net_loss
=
SoftmaxCrossEntropyLoss
(
6
,
255
)
net_loss
=
SoftmaxCrossEntropyLoss
(
6
,
255
)
net_opt
=
nn
.
Adam
(
net
.
trainable_params
(),
learning_rate
=
lr_iter
)
net_opt
=
nn
.
Adam
(
net
.
trainable_params
(),
learning_rate
=
lr_iter
)
...
...
This diff is collapsed.
Click to expand it.
utils/__init__.py
+
1
−
0
View file @
2f0c5787
from
learning_rates
import
cosine_lr
,
poly_lr
,
exponential_lr
\ No newline at end of file
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