Segmentation Fault from "keras.preprocessing.image import ImageDataGenerator"

1,155 views
Skip to first unread message

Badhri Narayanan

unread,
Apr 27, 2016, 2:49:07 AM4/27/16
to Keras-users
Hi all,

I'm new to Keras and this forum. Please forgive me if this is the wrong place to post this.

I downloaded Keras today and I'm using Tensorflow as backend. While trying to import ImageDataGenerator, my Ipython notebook Kernel was crashing. 
On trying the same import - "from keras.preprocessing.image import ImageDataGenerator", I'm getting a Segmentation Fault in command prompt. 

Anyone else is facing this issue? Or did I not install something?

TIA

P.S. I did my fair share of googling before posting here.

Daπid

unread,
Apr 27, 2016, 7:01:17 AM4/27/16
to Badhri Narayanan, Keras-users
Which OS are you on? How did you install keras and tensorflow? Which
versions do you have? What is the output you get?

Keras is pure Python, so it shouldn't segfault. Tensorflow is probably
the culprit here.


/David.
> --
> You received this message because you are subscribed to the Google Groups
> "Keras-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to keras-users...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/68c813ee-3472-4a25-8d19-2e20294a79d2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Badhri Narayanan

unread,
Apr 27, 2016, 11:36:32 AM4/27/16
to Keras-users, badhrina...@gmail.com
Hi David,

Thanks for the reply and my bad, i missed out the details.

I'm using Ubuntu 15.10. 
I installed Tensorflow(GPU enabled 64 bit version) and Keras through pip. To be precise:
pip install keras

Version:
Keras(1.0)
Tensorflow - 0.7.1

The output is just segmentation Fault and core dumped. I'm able to run other things properly(Ex:MNIST in Keras examples), but not anything with this particular import statement.

Daπid

unread,
Apr 28, 2016, 3:56:04 AM4/28/16
to Badhri Narayanan, Keras-users
On 27 April 2016 at 17:36, Badhri Narayanan <badhrina...@gmail.com> wrote:
> Version:
> Keras(1.0)
> Tensorflow - 0.7.1

The simplest solution is to try to upgrade to tensorflow 0.8 and see
what happens.

If you need Tensofrlow 0.7, make sure that you have both Cuda Toolkit
7.0 and cuDNN v2, and the corresponding environment variables set.

/David.

Badhri Narayanan

unread,
Apr 28, 2016, 4:01:18 AM4/28/16
to Keras-users, badhrina...@gmail.com
I upgraded Tensorflow to 0.8 this morning, but still had the same error. I think it is specific to my machine. I'll upgrade the Ubuntu version after a couple of days. I'll see whats is going to happen after that and will report findings here.

Thanks !

Daπid

unread,
Apr 28, 2016, 4:07:16 AM4/28/16
to Badhri Narayanan, Keras-users
On 28 April 2016 at 10:01, Badhri Narayanan <badhrina...@gmail.com> wrote:
> I upgraded Tensorflow to 0.8 this morning, but still had the same error. I
> think it is specific to my machine. I'll upgrade the Ubuntu version after a
> couple of days. I'll see whats is going to happen after that and will report
> findings here.

I don't think that is Ubuntu's fault, my money is in a missing
dependency. What happens when you run it with the Theano backend?
Specifically, the output at the beginning, where it tells you which
CUDA and Cunn is picking up.

François Chollet

unread,
Apr 28, 2016, 3:32:41 PM4/28/16
to Daπid, Badhri Narayanan, Keras-users
It's not related to TF since ImageDataGenerator is pure Numpy/SciPy. Also it cannot be a Keras issue since Keras is written in Python (and cannot segfault). I suggest you update your version of Numpy and SciPy, and if the problem persist, file a bug with these projects.

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages