Thanks for your suggestions, yorwba. I do see what you mean about the API and I will work on this.
For now, if you want to train a model, you need to pass data to the NN struct not train method but as you mentioned, probably it is better to pass it to the train method.
Sorry for the confusion and thanks for your comment!