[Tensorflow] 统计模型的参数数量 How to calculate the amount of parameters in my model?
importlogginglogging.basicConfig(level=logging.INFO,format='%(message)s',filemode='w',filename=config.logger)def_params_usage():total=0prompt=[]forvintf.trainable_variables():shape=v.get_shape()cnt=1f