1. 函數求一階導 import tensorflow as tf tf.enable_eager_execution() tfe=tf.contrib.eager from math impor
基礎知識 tensors: tensor在pytorch里面是一個n維數組。我們可以通過指定參數reuqires_grad=True來建立一個反向傳播圖,從而能夠計算梯度。在pytorch中一般叫做d