Comments (8)
You need to have the AVA.txt file, that matches in size and IDs to all the files in the train directory.
from neural-image-assessment.
Yes, In fact I have prepared the dataset and of course checked it.
This error was raised just after the final epoch, which means it should be over correctly but not raising this error
from neural-image-assessment.
Does your code stop execution or something ? It says exception ignored.
from neural-image-assessment.
yes it stopped execution and gave me the
IndexError: list index out of range
I think there is something wrong with the generator.
Btw, did you use python2 or python3?
from neural-image-assessment.
Python 3. See the data loading portion, and see if it loads as many files as you have in the directory. I have a feeling that since you are not loading the full ava dataset, it's getting a mismatched index for a file with the ava scores file.
from neural-image-assessment.
Hi titu1994!
Thank you so much for helping me.
In fact, I have rewrote the part of training with tensorflow instead of fit_generator.
At first it raised the similar problem, but I solved with the simple sess.close()
. So think maybe this problem had some connection with the memory leak, which depends on version of keras and tensorflow
from neural-image-assessment.
Change the code from
with tf.Session() as sess:
****
sess.run(.initializer)
while(True):
****
to
with sess.graph.as_default():
****
sess.run(*.initializer)
while(True):
****
And the new code's sess is K.get_session() as input parameter for the generator. This works fine for me.
from neural-image-assessment.
Thank you so much for your fantastic work!
I have just read you code and try to redo it again.
Then i just change the batch to 10, epochs to 2, and use the first 250 pics as training set and the last 50 as val set.
At the first, It seems to be fine.
But I get the Index error in the final epoch.
Exception ignored in: <generator object train_generator at 0x7f8c7433a360> Traceback (most recent call last): File "/home/haoyuzhang/workspace/NIMA_zhanghaoyu/utils/data_loader.py", line 123, in train_generator yield (X_batch, y_batch) File "/home/haoyuzhang/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1503, in __exit__ exec_type, exec_value, exec_tb) File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__ self.gen.throw(type, value, traceback) File "/home/haoyuzhang/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 4342, in get_controller if self.stack[-1] is not default: IndexError: list index out of range
I know there is something wrong with keras.fit_generator but I can't figure it now.
Did some one else have the same situation?
Change the code from
''
with tf.Session() as sess
''
to
''
sess = tf.Session()
''
It will be OK. Very strange!
from neural-image-assessment.
Related Issues (20)
- when i train model on TID2013 dataset,something went wrong HOT 8
- Weight freezing in train*.py HOT 2
- I've computed histograms of the ground truth and predicted scores HOT 5
- Can't instantiate abstract class DatasetV1 with abstract methods _as_variant_tensor, _inputs HOT 5
- Regarding results
- How to set arguments: HOT 1
- Tensorflow version Issue HOT 1
- Different results
- errors when i run extract_inception_features.py HOT 7
- parse data function-image augmentation HOT 4
- A fundamental question! HOT 6
- Theano backend HOT 3
- License?
- any install instructions ? HOT 1
- How to feed the y_labels or scores from the images to model?
- Van Gogh's Mona Lisa is only 4.266 points??? HOT 1
- Nasnet weights? HOT 1
- Performance issues in the program HOT 2
- Performance issues in utils/data_loader.py (by P3) HOT 1
- Dataset format 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 neural-image-assessment.