Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python3-imagej-tiff
Project
Project
Details
Activity
Releases
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
Elphel
python3-imagej-tiff
Commits
1d988652
Commit
1d988652
authored
Aug 07, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multiple files
parent
e544dc0c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
nn_ds_inmem4_tmp.py
nn_ds_inmem4_tmp.py
+22
-2
No files found.
nn_ds_inmem4_tmp.py
View file @
1d988652
...
...
@@ -111,16 +111,34 @@ def read_and_decode(filename_queue):
#http://adventuresinmachinelearning.com/introduction-tensorflow-queuing/
#Main code
# Main code
# tfrecords' paths for training
try
:
train_filenameTFR
=
sys
.
argv
[
1
]
except
IndexError
:
train_filenameTFR
=
"/mnt/dde6f983-d149-435e-b4a2-88749245cc6c/home/eyesis/x3d_data/data_sets/tf_data/train.tfrecords"
# if the path is a directory
if
os
.
path
.
isdir
(
train_filenameTFR
):
train_filesTFR
=
glob
.
glob
(
train_filenameTFR
+
"/train_*.tfrecords"
)
train_filenameTFR
=
train_filesTFR
[
0
]
else
:
train_filesTFR
=
[
train_filenameTFR
]
# tfrecords' paths for testing
try
:
test_filenameTFR
=
sys
.
argv
[
2
]
except
IndexError
:
test_filenameTFR
=
"/mnt/dde6f983-d149-435e-b4a2-88749245cc6c/home/eyesis/x3d_data/data_sets/tf_data/test.tfrecords"
#FILES_PER_SCENE
# if the path is a directory
if
os
.
path
.
isdir
(
test_filenameTFR
):
test_filesTFR
=
glob
.
glob
(
test_filenameTFR
+
"/test_*.tfrecords"
)
test_filenameTFR
=
test_filesTFR
[
0
]
else
:
test_filesTFR
=
[
test_filenameTFR
]
import
tensorflow
as
tf
import
tensorflow.contrib.slim
as
slim
...
...
@@ -379,6 +397,8 @@ def read_new_tfrecord_file(filename,result):
tfrecord_filename
=
train_filenameTFR
tfrecord_file_counter
=
0
with
tf
.
Session
()
as
sess
:
sess
.
run
(
tf
.
global_variables_initializer
())
...
...
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