A general framework for neural network models on censored survival data