# How to use keras with processing.py

**URL:** <https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912>\
**Category:** Processing.py\
**Created:** [January 6, 2020, 7:04pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912 "2020-01-06T19:04:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![arpitjp](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@arpitjp](https://discourse.processing.org/u/arpitjp)\
**Post date:** [January 6, 2020, 7:04pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/1 "2020-01-06T19:04:11Z")

</div>

how to use keras with processing.py

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [January 6, 2020, 7:32pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/2 "2020-01-06T19:32:58Z")

</div>

Keras has Numpy dependencies. Unfortunately, you cannot use Python libraries with C extensions in, like Numpy. This is a [Jython limitation](https://py.processing.org/tutorials/python-jython-java/).

---

<div class="post-metadata">

**Author:** ![arpitjp](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@arpitjp](https://discourse.processing.org/u/arpitjp)\
**Post date:** [January 6, 2020, 8:06pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/3 "2020-01-06T20:06:15Z")

</div>

Is there some other way to add deep learning to processing.py

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [January 6, 2020, 8:13pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/4 "2020-01-06T20:13:55Z")

</div>

Yes and no. “Deep learning” is a broad topic; you’ll need to be more specific. What are you trying to accomplish?

---

<div class="post-metadata">

**Author:** ![arpitjp](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@arpitjp](https://discourse.processing.org/u/arpitjp)\
**Post date:** [January 6, 2020, 8:31pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/5 "2020-01-06T20:31:06Z")

</div>

Want to add Artificial Neural Networks to a game, like a object learning to move from point A to B, avoiding some obstacles using genetic algorithms. Are there some libraries that i can use ? If not, then how to proceed ?

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [January 6, 2020, 8:52pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912/6 "2020-01-06T20:52:51Z")

</div>

Sorry to be vague, but there are many ways you could do this. Without Keras, or some other ML library.

For example, have you seen this [Evolutionary Simulator](https://www.youtube.com/watch?v=GOFws_hhZs8) video before? There’s a link to the source code in the description. It’s ~2000 lines of pure Processing (Java) code.
