2016-12-05 65 views

回答

2

的文檔是有點曖昧,從testimpl,似乎avg_normnorm/len(vector)

def testClipByAverageNormClipped(self): 
    # Norm clipping when average clip_norm < 0.83333333 
    with self.test_session(): 
     x = tf.constant([-3.0, 0.0, 0.0, 4.0, 0.0, 0.0], shape=[2, 3]) 
     # Average norm of x = sqrt(3^2 + 4^2)/6 = 0.83333333 
+0

謝謝你。我忘了看測試。事實上,似乎avg_norm是由元素數量規範化的範數。 – Conchylicultor