Comments (6)
@simonsayshi may be you can see the default classes in models.py ,change the default setting to what do you want, this may cause the model which last layer dimension is 21 in hdf5 file.it may be the reason of the problem.
from keras-fcn.
I solved this. The Problem was with the model: it had 21 classes instead of 2.
from keras-fcn.
hi, how do you solve this issue?
I changed the classes in train.py from 21 to 5(my data has 5 classes) and the training works good but when I run evaluate.py(I also changed the nb_classes to 5) this issue occurs:
ValueError: Dimension 0 in both shapes must be equal, but are 1 and 5. Shapes are [1,1,4096,21] and [5,4096,1,1]. for 'Assign_30' (op: 'Assign') with input shapes: [1,1,4096,21], [5,4096,1,1].
this is really annoying since I matched the parameters for train and evaluate but this just keep showing, how did you solve it? thanks!
from keras-fcn.
from keras-fcn.
@simonsayshi I would recommend digging through your code and making sure that the variables relating to class number are set correctly. Also, you should make sure you're loading the correct model file (.hdf5). I "solved" the problem when I realized I had made a mistake with the number of classes denoted in the model (doh!).
from keras-fcn.
thanks for reply! but I still want make it clear.
I only changed the classe in train.py and nb_classes in evaluate.py for my dataset
when I use the original number, 21 classes, the train.py and evaluate.py works without any problems
but when I change it to any other number like 4 or 5(for both scripts), the issue occurs
I only have one model file which is generated by train.py so I don't think I loaded wrong model. So what did you do? did you just let the 'classes' in train.py and 'nb_class' in evaluate.py be the same number then everything works? this is what I did but the issue remains! :(
from keras-fcn.
Related Issues (20)
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 14
- error when run "python data_pascal_voc.py pascal_voc_setup" HOT 2
- sparse_categorical_crossentropy vs binary_crossentropy_with_logits
- in resize_images_bilinear(X, height_factor, width_factor, target_height, target_width, data_format) TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' HOT 4
- models.py HOT 2
- AttributeError: 'SegDirectoryIterator' object has no attribute 'next' HOT 4
- Comparison of models
- Dataset & start HOT 1
- Strange results from inference.py HOT 1
- reorganized for easier use
- checkpoint_weights.hdf5 ??? HOT 17
- could not read remote repository HOT 1
- I want to use my windows10 Ipython to run my datasets, but it shows an error : UnboundLocalError: local variable 'lr' referenced before assignment HOT 4
- Hello, I also have this problem, I want to train my data set, but the picture of my data set is jpg, the label is png, can I use this data set for training, if I can, I need the program What changes have been made, thank you HOT 1
- Unable to run 'train.py', the program ends directly
- Regarding the upsampling layer HOT 2
- ModuleNotFoundError: No module named 'tf_image_segmentation' HOT 3
- NameError: name 'transform_matrix_offset_center' is not defined HOT 2
- weights
- Inference gives black output
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 keras-fcn.