# DatasetIterator for music generation

**URL:** https://community.konduit.ai/t/datasetiterator-for-music-generation/1536
**Category:** DL4J
**Created:** [August 6, 2021, 10:47am UTC](https://community.konduit.ai/t/datasetiterator-for-music-generation/1536 "2021-08-06T10:47:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)
#### Post date: [August 9, 2021, 5:33pm UTC](https://community.konduit.ai/t/datasetiterator-for-music-generation/1536/2 "2021-08-09T17:33:16Z")

</div>

What you are trying to do here is known as an auto-regressive problem, as you want to predict the next step from the previous steps.

I’ve talked about some of the details of setting up the data for such a problem in this post: [Training data shapping - #2 by treo](https://community.konduit.ai/t/training-data-shapping/1325/2)

When it comes to composing music with deeplearning, and even dl4j in particular, there is this example: [deeplearning4j-examples/dl4j-examples/src/main/java/org/deeplearning4j/examples/wip/advanced/modelling/melodl4j at master · eclipse/deeplearning4j-examples · GitHub](https://github.com/eclipse/deeplearning4j-examples/tree/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/wip/advanced/modelling/melodl4j)

It is reading Midi instead of the very simplified model that you propose, and unfortunately it isn’t working quite correctly.

---

_[View the full topic](https://community.konduit.ai/t/datasetiterator-for-music-generation/1536)._
