►
Description
This video shows how to save and load in the model for the deep neural network to classify sushi vs. sandwich images.
Code - https://github.com/jwood803/MLNetExamples/blob/master/MLNetExamples/PredictDNN/Program.cs
Video that creates the DNN model - https://www.youtube.com/watch?v=bXTN-rnwDso
Contact:
Twitter: https://twitter.com/JWood/
Blog: https://jonwood.co/
Gear used (affiliate links):
Mic - https://amzn.to/2YEXtxI
Mouse - https://amzn.to/2ZtASoQ
A
Hey
everyone,
so,
in
a
previous
video
I
showed
how
you
can
make
a
deep
neural
network
and
all
done
head
and
in
this
video
I'm
gonna
show
how
you
can
use
that
model
that
we
built,
save
it
and
then
load
it
back
in
another
project
to
continue
making
predictions
so
in
Visual
Studio-
and
this
is
the
project
that
we
created
in
the
previous
video-
that
creates
deep
neural
network,
there's
a
training
and
creates
the
model.
So
all
I'm
gonna
do
here
is
at
the
bottom.
A
Is
I
want
to
save
this
model,
to
do
that,
I'll
just
do
contexts
that
model
that
save
and
just
pass
in
a
couple
of
things
here,
passing
the
model
that
we
created
from
the
pipeline,
and
here
it
asked
for
an
input
schema
and
what
it.
What
that
is,
is
that
we
need
to
give
it
the
schema
of
the
data
that
we
trained
it
on
it's
an
image
data.
A
And
then
we
can
do
dot
schema
and
then
the
next
thing
is,
you
need
to
give
it
a
stream
or
a
string
for
the
file
path.
So
I'll
just
do
that
and
I'll
just
save
it
directly
here.
Call
it
DNN
model
that
zip
and
I'm
gonna
do
I'm.
Just
gonna
run
this
again
real,
quick,
alright,
so
that's
finished.
What
I
can
do
is
go
into
this
project
into
the
bin
and
debug.
Your
series
model
saved
right
there.
A
Something
go
in
another
project
here:
I
already
have
some
new
get
projects
already
loaded.
You
know
that
net
and
then
didn't
know
Network
packages
and
also
have
as
your
storage
package.
So
we
can
use
that
later
on
and
in
this
solution
have
a
couple
of
images
that
we
can
use
to
predict
on
after
we
load
our
model
and
speaking
of
loading,
our
model
I'm
going
to
I'm
gonna,
take
it
and
just
drag
it
over
into
the
solution
here.
They're
not
marking
to
copy
I
said
the
first
thing
I
want
to
do
create
my
context.
A
A
Similar
to
before
I
want
to
actually
get
original
labels
that
I
used
a
train
on
so
I'll.
Do
that
same
thing.
That
I
did
previously
like
in
the
V
buffer
of
the
keys
and
then
using
the
prediction
engine
that
output
schema
I
get
that
label
key.
That
was
used
to
train
that
image,
train
the
model
and
then
get
key
values,
and
then
from
those
keys,
I
can
call
it
gets
values
and
get
it
run
away
from
the
first
thing
to
use
this
model
for
predictions
is
I'm
going
to
put
it
on
these
images.
A
A
A
A
But
that's
only
if
we
have
their
images
on
our
file
system
here.
What?
If
we
want
to
read
from
blob
storage,
luckily
our
to
have
some
images
and
blob
storage
that
we
can
use
so
I
have
a
couple
sandwich
and
sushi
images
here
and
since
we
already
have
that
package
already
done,
I
can
connect
to
a
storage
account
and
get
references
to
those
images
and
parse.
The
connection
string,
which
already
has
defined
that
we
both.
A
A
Because
if
I
just
do
first
word
images
that
results,
which
is
what
we
get
back
if
I
do
far
here,
let's
go
and
do
the
type
is
a
blob
as
I've
this
blob
item,
but
unfortunately
that
doesn't
give
us
the
information
that
we
need
on
the
item
to
read
from
it.
So
do
cloud
blob
blob,
so
we
can
get
the
name
of
their
image
and
for
each
item
we
can
get
a
reference
to
it.
I
own.
That
name.
A
Do
not
write
these
out
the
same
way
that
we
did
before
and
I'll
do
a
new
line
here
just
so
we
can
differentiate
between
previous
output
and
this
output.
So,
let's
see
how
that
goes
as
our
original
files
that
we
had
on
our
system
here,
here's
the
images
I
had
on
blob
storage.
Let
me
see
we
do
99%
again
on
the
first
three.
But
if
you
look
at
this
last
one
74%
on
the
sushi,
it
predicted
a
sandwich.
Let's
take
a
look
at
what
this
is
curious
to
see.