19.内置函数二 abs():绝对值 lst = [1,2,-3,1,2,-5] print([abs(i) for i in lst]) enumerate("可迭代对象","序号起始值"):枚举获取键和值,起始值默认为0 lst [1,2,-3,1,2,-5] print([i for i in enumerate(lst)]) print(i for i in enumerate(lst,10)) max():求最大值,放可迭代对象 min():最小值 sum…
一.变量相关的函数 1)tf.train.list_variables(ckpt_dir_or_file) Returns list of all variables in the checkpoint 2)tf.global_variables_initializer() 用于初始化所有的变量(GraphKeys.VARIABLES),替代 tf.initialize_all_variables(). 3)tf.Variable(initial_value=None, trainab…