Blog

Learn About Our Meetup

4500+ Members

[D] Keras vs tensorflow: Performance, GPU utilization and data pipeline

Hi folks,

I was recently dealing with some performance issues related to the keras image preprocessing. After several experiments, I thought it would might be helpful to share my insights. There are several possible fixes:

  • update all packages, especially keras-preprocessing.
  • Deactivate your virus scanner (whitelist your data folder) and check if you have an internal SSD.
  • Try to tweak the configuration on fit_generator (workers and queue_size). If you are using linux try out multiprocessing and a thread-safe generator.
  • Convert your dataset to TFrecords and use it with keras or directly move to tensorflow. If you already using tensorflow 2.0, you can directly fit keras models on TFRecord datasets.

Furthermore the tensorflow implementaion was always (slightly) faster.

Here is a more detailed explaination.

Cheers

submitted by /u/ixeption
[link] [comments]

Next Meetup

 

Days
:
Hours
:
Minutes
:
Seconds

 

Plug yourself into AI and don't miss a beat

 


Toronto AI is a social and collaborative hub to unite AI innovators of Toronto and surrounding areas. We explore AI technologies in digital art and music, healthcare, marketing, fintech, vr, robotics and more. Toronto AI was founded by Dave MacDonald and Patrick O'Mara.