Comments (4)
As you can see from the error
NotFoundError (see above for traceback): /Users/liuguiyang/Documents/CodeProj/PyProj/dtb/scripts/inputs/data/airplane/positive/32size/0335.png:1
The file /Users/liuguiyang/Documents/CodeProj/PyProj/dtb/scripts/inputs/data/airplane/positive/32size/0335.png:1
does not exist.
Check the content of image.list
and look if the files listed there effectively exists.
(the :1
in the file name sounds strange to me, check this)
from dynamic-training-bench.
hi,
after i check the imag.list, I can read the *.png images.
import os
import tensorflow as tf
filename = "/Users/liuguiyang/Documents/CodeProj/PyProj/dtb/scripts/inputs/data/airplane/positive/32size/0335.png"
def test02():
# filename = "/Users/liuguiyang/Desktop/cifar/test/0_cat.png"
with tf.Graph().as_default():
image_contents = tf.read_file(filename)
image = tf.image.decode_png(image_contents, channels=3)
init_op = tf.tables_initializer()
with tf.Session() as sess:
sess.run(init_op)
tmp = sess.run(image)
print(tmp)
if __name__ == "__main__":
test02()
the answer is below:
➜ dtb git:(CAE) ✗ python3 run.py > a.txt
➜ dtb git:(CAE) ✗ more a.txt
[[[173 173 173]
[173 173 173]
[173 173 173]
...,
[176 176 176]
[100 100 100]
[117 117 117]]
[[175 175 175]
[174 174 174]
[173 173 173]
...,
[177 177 177]
[149 149 149]
[136 136 136]]
[[175 175 175]
[173 173 173]
[171 171 171]
...,
[173 173 173]
[173 173 173]
[161 161 161]]
...,
[[173 173 173]
[173 173 173]
[172 172 172]
...,
[174 174 174]
[173 173 173]
[173 173 173]]
[[173 173 173]
[173 173 173]
[173 173 173]
...,
[152 152 152]
[171 171 171]
[170 170 170]]
[[172 172 172]
[172 172 172]
[172 172 172]
...,
[146 146 146]
[170 170 170]
[173 173 173]]]
it really can read the image data.
I am very confused about this question ???
from dynamic-training-bench.
Your input pipeline was correct (the commented part, not the modified version you posted here with comments added and debug operations added), the only problem I see is in the image.list file content.
The image you read here does not have the :1 added at the end and the read operation worked well. Thus if every file listed in image.list exists everything should work fine
from dynamic-training-bench.
hi,
i am very confused why my code is error?
But in another way, I get the same effect, below is my code.
import tensorflow as tf
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("/Users/liuguiyang/Documents/CodeProj/PyProj/dtb/scripts/inputs/data/airplane/positive/32size/*.png")
)
image_reader = tf.WholeFileReader()
key, img_file = image_reader.read(filename_queue)
img = tf.image.decode_png(img_file)
with tf.Session() as sess:
tf.global_variables_initializer().run()
coord = tf.train.Coordinator()
threads = tf.train.start_queue_runners(coord=coord)
img_tensor = sess.run([img])
print(img_tensor)
coord.request_stop()
coord.join(threads=threads)
thank you for your help ?
from dynamic-training-bench.
Related Issues (19)
- How to use? HOT 3
- Feature extraction from the convolutional autoencoder HOT 8
- how to design a distribution tensorflow wrapper API ? HOT 4
- how to compute the GPU memory that the graph need be using ? HOT 3
- keras equivalent to extract features HOT 2
- inception v3 predefined HOT 1
- some puzzled to trouble you 😁 HOT 1
- can't run example - no trainable_scope HOT 2
- SingleLayerCAE fails HOT 3
- cifar example fails for me HOT 4
- Syntax Error on Python 3.4 for merging dict into another using ** HOT 1
- At least two variables have the same name: global_step HOT 1
- pip install old not working version of the software (version installed 0.7.3) HOT 1
- Thanks A Lot ! HOT 2
- Train By my own data sets? HOT 16
- How to use the model the extract feature? HOT 2
- invalid syntax error HOT 2
- SyntaxError HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-training-bench.