# Problem running Batch learning example in Edward

**URL:** <https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275>\
**Category:** General\
**Created:** [August 1, 2017, 5:24pm UTC](https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275 "2017-08-01T17:24:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mac449](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/mac449/32/18_2.png) [@mac449](https://discourse.edwardlib.org/u/mac449)\
**Post date:** [August 1, 2017, 5:24pm UTC](https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275/1 "2017-08-01T17:24:55Z")

</div>

Hi everyone,

I encountered a problem when I tried to run the batch learning example in Edward Tutorial on my laptop. It was running incredibly slow, and I am getting warnings like “Tensorflow wasn’t compiled to use SSE4.2, AVX, AVX2, and FM, but these are available on your machine and could speed up your CPU computations”. I’m using Tensorflow 1.2.0 on mac OS Sierra version 10.12.6 and the latest version of Edward.

---

<div class="post-metadata">

**Author:** ![MushroomHunting](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MushroomHunting](https://discourse.edwardlib.org/u/MushroomHunting)\
**Post date:** [August 1, 2017, 10:09pm UTC](https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275/2 "2017-08-01T22:09:28Z")

</div>

Hey mac

Are those compilation warnings new just for edward or have you always been getting them with tensorflow?  
In general those compilation optimizations shouldn’t have much effect for GPU bound operations.

Have you tried increasing the batch size? If it’s very small, at least in my experience, it will take longer.  
Another problem could be previous session graphs filling up your GPU memory

---

<div class="post-metadata">

**Author:** ![mac449](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/mac449/32/18_2.png) [@mac449](https://discourse.edwardlib.org/u/mac449)\
**Post date:** [August 1, 2017, 11:55pm UTC](https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275/3 "2017-08-01T23:55:24Z")

</div>

Hi,

I haven’t tried increasing the size of the batch. I’m running this on a CPU. Is batch learning configured only for GPUs?

---

<div class="post-metadata">

**Author:** ![mac449](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/mac449/32/18_2.png) [@mac449](https://discourse.edwardlib.org/u/mac449)\
**Post date:** [August 6, 2017, 4:58pm UTC](https://discourse.edwardlib.org/t/problem-running-batch-learning-example-in-edward/275/4 "2017-08-06T16:58:59Z")

</div>

Hi everyone,

I did get the batch learning example in tutorial to work. Thanks for your input.
