Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
009e5bb1
Commit
009e5bb1
authored
Jun 25, 2018
by
Nick Korovaiko
Committed by
Scott Cyphers
Jun 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if file exists in mnist_loader (#1127)
parent
88aa9e9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mnist_loader.cpp
doc/examples/mnist_mlp/mnist_loader.cpp
+6
-0
No files found.
doc/examples/mnist_mlp/mnist_loader.cpp
View file @
009e5bb1
...
@@ -80,6 +80,12 @@ void MNistLoader::open()
...
@@ -80,6 +80,12 @@ void MNistLoader::open()
throw
std
::
logic_error
(
"Loader already open"
);
throw
std
::
logic_error
(
"Loader already open"
);
}
}
m_file
=
fopen
(
m_filename
.
c_str
(),
"rb"
);
m_file
=
fopen
(
m_filename
.
c_str
(),
"rb"
);
if
(
m_file
==
nullptr
)
{
throw
std
::
runtime_error
(
std
::
string
(
"File"
)
+
m_filename
+
"couldn't be opened. Make sure the file "
"exists in the current directory"
);
}
read_header
();
read_header
();
fgetpos
(
m_file
,
&
m_data_pos
);
fgetpos
(
m_file
,
&
m_data_pos
);
}
}
...
...
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