Assignment 2 - TensorFlow tip

In TensorFlow you rarely have to write for loops, in most cases there is a function that can perform the operation on the entire batch. Some functions you may find useful for this assignment are:

tf.math.minimum

tf.clip_by_value

tf.math.reduce_mean

Furthermore a lot of basic operations are overloaded such that e.g. tf.constant([0.5, 2.0]) ** 2) --> [0.25, 2.0]

Publisert 9. okt. 2019 23:19 - Sist endret 9. okt. 2019 23:25