Comments (8)
The error is unclear. Can you add more detail to the issue?
It seems you were able to train and the error occurred after some time?! Possible error with the annotation file?
from fcn.tensorflow.
Setting up summary op...
Setting up image reader...
Found pickle file!
50
15
Setting up dataset reader
Initializing Batch Dataset Reader...
{'resize_size': 224, 'resize': True}
(50, 224, 224, 3)
(50, 224, 224, 1)
Initializing Batch Dataset Reader...
{'resize_size': 224, 'resize': True}
(15, 224, 224, 3)
(15, 224, 224, 1)
Setting up Saver...
Traceback (most recent call last):
File "<ipython-input-1-12b2e3f5c7e5>", line 1, in <module>
runfile('C:/Users/Yared/Desktop/Project/FCN.py', wdir='C:/Users/Yared/Desktop/Project')
File "C:\Users\Yared\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "C:\Users\Yared\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Yared/Desktop/Project/FCN.py", line 227, in <module>
tf.app.run()
File "C:\Users\Yared\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "C:/Users/Yared/Desktop/Project/FCN.py", line 198, in main
sess.run(train_op, feed_dict=feed_dict)
File "C:\Users\Yared\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 767, in run
run_metadata_ptr)
File "C:\Users\Yared\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 965, in _run
feed_dict_string, options, run_metadata)
File "C:\Users\Yared\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1015, in _do_run
target_list, options, run_metadata)
File "C:\Users\Yared\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1035, in _do_call
raise type(e)(node_def, op, message)
InvalidArgumentError: Received a label value of 250 which is outside the valid range of [0, 151). Label values: 66 57 54 59 60 59 54 65 111 133 133 144 150 154 160 166 165 159 155 135 44 25 15 13 13 12 13 13 14 16 16 30 50 61 70 72 71 77 87 102 110 112 102......................42 76 103 105 110 108 62 28
[[Node: entropy/entropy = SparseSoftmaxCrossEntropyWithLogits[T=DT_FLOAT, Tlabels=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](entropy/Reshape, entropy/Reshape_1)]]
Thanks for your help.
from fcn.tensorflow.
The error is pretty clear - your annotation file has value 250 when the NUM_OF_CLASSES range from [0, 151). If this is your custom dataset try processing your annotation file to have values within range.
from fcn.tensorflow.
Thanks, for your help. What do you mean try processing your annotation file to have values within the range? How can I do that? I was trying to assign default label if it is out of range. How can I control it the label to not be out of the range? Thanks for your help.
from fcn.tensorflow.
Thanks. I know the error. initially i trained the network with 151 number of classes and when i try to change the number of classes to 250 and train it again gave me the error. it was holds the initial number of classes value. I cloned the script again as a new and works with 250 number of class perfectly.
from fcn.tensorflow.
@Yaredoh @shekkizh Sorry to bother you but could you please tell me if my number of classes is 2, what all changes need to be done? While training I set NUM_OF_CLASSES as 3. Which one is the annotation file? What changes have to be made in it? Sorry if the question is stupid but I am new to tensorflow. Thanks in advance.
from fcn.tensorflow.
@Yaredoh @shekkizh Sorry to bother you but could you please tell me if my number of classes is 2, what all changes need to be done? While training I set NUM_OF_CLASSES as 3. Which one is the annotation file? What changes have to be made in it? Sorry if the question is stupid but I am new to tensorflow. Thanks in advance.
hello,I meet the same question, do you solve it?
from fcn.tensorflow.
@matvaibhav @xcnie and anyone else: if you have a grayscale image, NUM_OF_CLASSES should be 256. It means your image has pixels' value from 0 to 255
from fcn.tensorflow.
Related Issues (20)
- Why not implement batch normalization?
- Questions about training
- Expected string passed to parameter 'tag' of op 'ImageSummary', got 'input_image_1' of type 'str' instead. HOT 1
- run FCN.py , path wrong HOT 1
- is fusion operation the same as the paper?
- 为什么没有把pool5的结果和最后结果上采样做差值,我看代码只做了pool4和pool3的结果 HOT 1
- 论文中是说最后输入1000张特征图,取1000张特征图中的各像素最大值,为啥这个代码要用3通道呢 HOT 2
- KeyError: 'normalization' HOT 1
- Train the model for face parsing problem HOT 2
- how to train my own dataset?
- Training problem HOT 1
- What is output node's name? HOT 1
- Is anyone could share the trained ckpt???thanks!!!!
- ValueError: Cannot feed value of shape (2, 227, 227, 1, 4) for Tensor 'annotation:0', which has shape '(?, 227, 227, 1)' HOT 2
- Can I use FCN on Windows 10?
- 'NoneType' object is not subscriptable
- i made a reimplement with tensorflow2 HOT 3
- ValueError: Unknown mat file type, version 110, 116 HOT 2
- Logging and Visualizing Training Metrics on Tensorboard
- Implementing GradCam HOT 1
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 fcn.tensorflow.