Open mustansarsaeed opened 3 years ago
Hi, I am using syft 0.2.x. I want to determine the size of the model. What is the correct way to determine the size? I have two options:
syft 0.2.x
Option: 1
val modelFile = File(modelFileLocation) modelFile.length()
Option 2
SyftState.loadSyftState(modelFile) size of syftstate
In terms of model size and number of parameters, SyftState should be used or modelFile.length()?
SyftState
modelFile.length()
Thanks.
@mustansarsaeed number of parameters can be calculated from model
val num_params = model.getParamArray().reduce{ sum, tensor -> sum + tensor.shape().reduce{ m,e -> m*e } }
Hi, I am using
syft 0.2.x
. I want to determine the size of the model. What is the correct way to determine the size? I have two options:Option: 1
Option 2
In terms of model size and number of parameters,
SyftState
should be used ormodelFile.length()
?Thanks.