Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it a must to have same number of neurons in each hidden layer? #73

Open
phaniparsa opened this issue Aug 3, 2021 · 1 comment
Open

Comments

@phaniparsa
Copy link

phaniparsa commented Aug 3, 2021

Hello all,

This is not an issue but I didn't see an option to start a discussion. Hence posting it here.

I have seen examples on DeepSurv and PyCox packages where the number of neurons in each hidden layers are the same. Is this how we need to define the network for DeepSurv? Or can we play around with the number of neurons in each layer?

Thanks!

@phaniparsa
Copy link
Author

I think I found what I'm looking for: DeepSurv is a package that implements a DL generalization of the CPH model using the TensorFlow structure21. DeepSurv uses a multilayer perceptron to self-learn the effects of a covariate. Priori selection and interaction of the covariates should be considered in designing the CPH model, but DeepSurv has the advantage of not considering this. DeepSurv is composed of 1 input layer (12 nodes for independent variables), 3 hidden layers with 6, 3, and 1 nodes with tanh activation, and output. We used the Adam optimizer with a learning rate of 0.4 and a learning rate decay of 1.0. We used dropout, batch normalization, and L1 and L2 regularization during training. We additionally experimented whether the elimination of the covariate with the least important feature leads to an improvement in the C-index. All covariates were standardized when entered into the DeepSurv model, and grid search mechanisms were used for hyperparameter optimization.

Ref.: Paper Link

I'm concluding that it is not mandatory to use same number of neurons in each layer for DeepSurv model.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant