【发布时间】:2019-02-15 00:47:24
【问题描述】:
我正在尝试练习style transfer tutorial 中的练习题,有没有人知道如何用 Adam Optimizer 替换基本梯度下降。 我认为这些代码可能是改变的地方。非常感谢您的帮助。
# Reduce the dimensionality of the gradient.
grad = np.squeeze(grad)
# Scale the step-size according to the gradient-values.
step_size_scaled = step_size / (np.std(grad) + 1e-8)
# Update the image by following the gradient.
mixed_image -= grad * step_size_scaled
【问题讨论】:
标签: python image optimization tensorflow deep-learning