[关闭]
@devilloser 2017-06-14T02:58:37.000000Z 字数 521 阅读 814

tensorflow(day4)

tensorflow


cifar10理解

cifar10.py

_activation_summary(x)

Args:
x:Tensor
Returns:
nothing

  1. tensor_name=re.sub('%s_[0-9]*/'%TOWER_NAME,'',x.op.name)

re.sub(pattern,repl,string,count)
repl:替换后的字符串
string:要被替换的字符串
pattern:正则形式
count:替换的最大次数,默认0
remove 'tower_[0-9]/' from x.op.name

  1. tf.nn.zero_fraction(x)

统计tensor x中的0的比例

  1. tf.add_to_collection(name,value)

将value存到name的收集器里

  1. tf.train.exponential_decay

decay the learning rate exponentially based on the number of steps

  1. opt=tf.train.GradientDescentOptimizer(lr)
  2. grads=opt.compute_gradients(total_loss)
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注