Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SCL-my
Overview
Overview
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
YuxuanGuo
SCL-my
Commits
ab636756
Commit
ab636756
authored
Mar 14, 2022
by
yuxguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
18237e29
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.py
+3
-3
No files found.
main.py
View file @
ab636756
...
@@ -370,7 +370,7 @@ def train(trainloader, optimizer, model, epoch):
...
@@ -370,7 +370,7 @@ def train(trainloader, optimizer, model, epoch):
counter
=
0
counter
=
0
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
trainloader
):
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
trainloader
):
counter
+=
1
counter
+=
1
if
args
.
use_
cuda
:
if
args
.
use_
gpu
:
images
=
images
.
cuda
()
images
=
images
.
cuda
()
label
=
label
.
cuda
()
label
=
label
.
cuda
()
meta_target
=
meta_target
.
cuda
()
meta_target
=
meta_target
.
cuda
()
...
@@ -401,7 +401,7 @@ def validate(validloader, model, epoch):
...
@@ -401,7 +401,7 @@ def validate(validloader, model, epoch):
with
torch
.
no_grad
():
with
torch
.
no_grad
():
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
validloader
):
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
validloader
):
counter
+=
1
counter
+=
1
if
args
.
use_
cuda
:
if
args
.
use_
gpu
:
images
=
images
.
cuda
()
images
=
images
.
cuda
()
label
=
label
.
cuda
()
label
=
label
.
cuda
()
meta_target
=
meta_target
.
cuda
()
meta_target
=
meta_target
.
cuda
()
...
@@ -427,7 +427,7 @@ def test(testloader, model, epoch):
...
@@ -427,7 +427,7 @@ def test(testloader, model, epoch):
with
torch
.
no_grad
():
with
torch
.
no_grad
():
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
testloader
):
for
batch_idx
,
(
images
,
label
,
meta_target
)
in
enumerate
(
testloader
):
counter
+=
1
counter
+=
1
if
args
.
use_
cuda
:
if
args
.
use_
gpu
:
images
=
images
.
cuda
()
images
=
images
.
cuda
()
label
=
label
.
cuda
()
label
=
label
.
cuda
()
meta_target
=
meta_target
.
cuda
()
meta_target
=
meta_target
.
cuda
()
...
...
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