from functools import reduce
from operator import mul
def get_num_params():
num_params = 0
for variable in tf.trainable_variables():
shape = variable.get_shape()
num_params += reduce(mul, [dim.value for dim in shape], 1)
return num_params- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
文章知识点与官方知识档案匹配,可进一步学习相关知识
Python入门技能树人工智能深度学习416729 人正在系统学习中
评论记录:
回复评论: