Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DL Object Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
Jakob Bjørn Hyldgaard
DL Object Detection
Commits
6aeaeb79
Commit
6aeaeb79
authored
2 years ago
by
Jeppe Gade
Browse files
Options
Downloads
Patches
Plain Diff
Warning no more
parent
a6656f63
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MobileNetV1.py
+3
-1
3 additions, 1 deletion
MobileNetV1.py
with
3 additions
and
1 deletion
MobileNetV1.py
+
3
−
1
View file @
6aeaeb79
...
...
@@ -11,6 +11,8 @@ import numpy as np
from
coco_utils
import
get_image
import
warnings
warnings
.
filterwarnings
(
"
ignore
"
,
category
=
UserWarning
)
model
=
torch
.
hub
.
load
(
'
pytorch/vision:v0.10.0
'
,
'
mobilenet_v2
'
,
pretrained
=
True
)
#Enable following to only get CNN part:
...
...
@@ -26,7 +28,7 @@ preprocess = transforms.Compose([
#Outputs mini-batch that can be input to model
def
preprocessImage
(
image
):
input_tensor
=
preprocess
(
input_
image
)
input_tensor
=
preprocess
(
image
)
return
input_tensor
.
unsqueeze
(
0
)
# create a mini-batch as expected by the model
#Runs the CNN on input
...
...
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