摘要: gvs = optimizer.compute_gradients(loss) # 计算出梯度和变量值 capped_gvs = [(tf.clip_by_value(grad, -5e+10, 5e+10), var) for grad, var in gvs] # 梯度裁剪 train_op = optimizer.apply_gradients(capped_gvs, global_ste... 阅读全文
posted @ 2019-05-06 14:07 下路派出所 阅读(1290) 评论(0) 推荐(0) 编辑