Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.pytorch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.learn.pytorch
Commits
00b15d32
Commit
00b15d32
authored
6 years ago
by
Anjith GEORGE
Browse files
Options
Downloads
Patches
Plain Diff
small fix
parent
27898ca9
No related branches found
No related tags found
1 merge request
!30
Mc deep pixbis
Pipeline
#28688
failed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/learn/pytorch/extractor/image/MCDeepPixBiS.py
+1
-7
1 addition, 7 deletions
bob/learn/pytorch/extractor/image/MCDeepPixBiS.py
with
1 addition
and
7 deletions
bob/learn/pytorch/extractor/image/MCDeepPixBiS.py
+
1
−
7
View file @
00b15d32
...
@@ -59,22 +59,16 @@ class MCDeepPixBiSExtractor(Extractor):
...
@@ -59,22 +59,16 @@ class MCDeepPixBiSExtractor(Extractor):
pass
pass
else
:
else
:
# With the new training
# With the new training
logger
.
debug
(
'
Starting to load the pretrained PAD model
'
)
logger
.
debug
(
'
Starting to load the pretrained PAD model
'
)
try
:
try
:
cp
=
torch
.
load
(
model_file
)
cp
=
torch
.
load
(
model_file
)
except
:
except
:
try
:
raise
ValueError
(
'
Failed to load the model file : {}
'
.
format
(
model_file
))
cp
=
torch
.
load
(
model_file
,
map_location
=
lambda
storage
,
loc
:
storage
)
except
:
raise
ValueError
(
'
Failed to load the model file : {}
'
.
format
(
model_file
))
if
'
state_dict
'
in
cp
:
if
'
state_dict
'
in
cp
:
self
.
network
.
load_state_dict
(
cp
[
'
state_dict
'
])
self
.
network
.
load_state_dict
(
cp
[
'
state_dict
'
])
elif
:
## check this part
self
.
network
.
load_state_dict
(
cp
)
else
:
else
:
raise
ValueError
(
'
Failed to load the state_dict for model file: {}
'
.
format
(
model_file
))
raise
ValueError
(
'
Failed to load the state_dict for model file: {}
'
.
format
(
model_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