Single input - two outputs

Hello,

I am trying to make model for age and gender regression/classification.

Current solution:
For this I am using same dataset copied in 2 folders :
-one for age regression
-one for gender classification.

I have basicly same images as input for RecordReaderMultiDataSetIterator and have two output layers
-MSE/IDENTITY for regression output;
-NEGATIVELOGLIKELIHOOD/SOFTMAX for classification.

Is possible to have only one input and two outpus? Is it good way of thinking for this problem? If it is, how to do it?

Thanks on your time!