Yes, it could be done. However to train NN, you need examples of correct outputs . Sometimes some additional hidden layers are required, not only the single dense layer.
Maybe a better idea is describing the main problem as a whole. Maybe your approach is not well fitted to your original problem. It is possible that we will find a better solution.