Spaces:
Build error
Build error
Download code/model_py/__init__.py from vvelda/SoluProtMutDemo: direct link, hf CLI and curl.
- Browser
- Download file 335 Bytes
-
https://huggingface.co/spaces/vvelda/SoluProtMutDemo/resolve/main/code/model_py/__init__.py
- Command line
-
hf download hf://spaces/vvelda/SoluProtMutDemo/code/model_py/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/vvelda/SoluProtMutDemo/resolve/main/code/model_py/__init__.py
335 Bytes
| from .v21_2 import PlaNNet, MutPred, Ensemble, conf_dict, feed | |
| # Print number of parameters. | |
| def get_n_params(model): | |
| pp=0 | |
| for p in model.parameters(): | |
| nn=1 | |
| for s in list(p.size()): | |
| nn = nn*s | |
| pp += nn | |
| return pp | |
| def print_n_params(model, out_f = print): | |
| out_f("Number of parameters: ", get_n_params(model)) | |