Use the same NetChain object to recognize inputs in multiple formats?

Hello there,

Is it possible to use the same NetChain object to recognize inputs in multiple formats?

Specifically, I would be interested in training a NetChain to recognize MNIST digits as in this digit classification example:

but also to be able to present the NetChain with arrays of 2 of the digit images as inputs and have it output the value of their sum (as a “class”).

Thank you!

Markus could you please explain why can’t you just identify digits separately and then add them up?

My intent is to work towards using neural networks to develop computational models of cognitive function to be used in drug development. My hope is that training a neural network to both recognize digits individually, and recognize their sum when multiple digits are presented simultaneously would be similar to teaching it “addition”, which could potentially serve as a starting point for a model of working memory.