I got similar result, you can search "Performance discrepancy between
theano and tensorflow" for my result. I have no idea why this is
happening.What is your TF version? Iwas using 0.6, not sure if the
latest version has improvements.
On 4/15/2016 10:57 PM, tc wrote:
> Hi,
>
> I tried to run some keras/examples with both backends, and found that
> it is much slower when using tensorflow backend than theano backend.
> Here is a rough time cost per epoch I got:
>
> mnist_cnn: TF: 30, TH: 5.
> imdb_lstm: TF 250, TH 60.
>
> I don't know if anyone else has similar experiences with the backends.
> If so, why is tensorflow backend so slow?
> --
> 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
> <mailto:keras-users+unsub...@googlegroups.com>.
I also used 0.6. Now just update it to 0.8rc0, and its performance improved (though still slower):mnist_cnn: TF: 12, TH: 5.imdb_lstm: TF 90, TH 60.I am still not sure where the overhead is. And I also wonder if direct using tensorflow optimizer and others, it probably will be faster?
On Friday, April 15, 2016 at 12:07:59 PM UTC-4, J Rao wrote:
I got similar result, you can search "Performance discrepancy between
theano and tensorflow" for my result. I have no idea why this is
happening.What is your TF version? Iwas using 0.6, not sure if the
latest version has improvements.
On 4/15/2016 10:57 PM, tc wrote:
> Hi,
>
> I tried to run some keras/examples with both backends, and found that
> it is much slower when using tensorflow backend than theano backend.
> Here is a rough time cost per epoch I got:
>
> mnist_cnn: TF: 30, TH: 5.
> imdb_lstm: TF 250, TH 60.
>
> I don't know if anyone else has similar experiences with the backends.
> If so, why is tensorflow backend so slow?
> --
> 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
> <mailto:keras-users...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
--
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/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
> <mailto:keras-users+unsub...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
> <mailto:keras-users...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
--
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/f921de8a-f0e3-4269-8652-12f52830009f%40googlegroups.com.
np.swapaxes(1,3)
> <mailto:keras-users+unsub...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
> <mailto:keras-users...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
--
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/f921de8a-f0e3-4269-8652-12f52830009f%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/dcf265e4-57c0-43ac-a90d-3ee49719d71b%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Keras-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keras-users/0aYbPSGylEo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to keras-users...@googlegroups.com.
The dim_ordering is a statement about what format you provided the data to the model in. So, it needs to be specified by the user. If "all backends used their own preferred dim_ordering" you would frequently be convolving over unintended dimensions.
I believe there are now functions to convert a kernel between TH and TF formats (Here is the commit. It probably arose in response to that thread). So, it should now be possible to serialize the model for one backend, reload it and convert it to the other.
> <mailto:keras-users+unsub...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
--
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/f921de8a-f0e3-4269-8652-12f52830009f%40googlegroups.com.
> <mailto:keras-users...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com
> <https://groups.google.com/d/msgid/keras-users/d53ee9e8-5389-4b9c-b17c-b322653e062a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/2fd2bec5-6add-4b94-ab8e-091ae464c8bd%40googlegroups.com.
--
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/f921de8a-f0e3-4269-8652-12f52830009f%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/dcf265e4-57c0-43ac-a90d-3ee49719d71b%40googlegroups.com.To unsubscribe from this group and all its topics, send an email to keras-users...@googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Keras-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keras-users/0aYbPSGylEo/unsubscribe.
--
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/19b595d7-b03f-4786-b894-256b82b88612%40googlegroups.com.
> <mailto:keras-users+unsub...@googlegroups.com>.
> <mailto:keras-users...@googlegroups.com>.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/09790225-a734-4e7a-926b-9e2a090b873a%40googlegroups.com.
Daniel,If your data is in the wrong dim_ordering for your backend, you can avoid paying those transpose costs repeatedly by transposing the data before calling fit (i.e. with np.swapaxes(1,3)).Then you can specify a dim_ordering that matches your back-end, and it's smooth sailing from there.Dan
> <mailto:keras-users+unsub...@googlegroups.com>.