pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
313 stars 63 forks source link

adjusted matrices.py to also work with both tensorflow version >2 alo… #87

Closed pranavvaidik closed 4 years ago

pranavvaidik commented 4 years ago

…ng with previous versions.

'tf.norm' function this code uses was moved to 'tf.compat.v1.norm' in Tensorflow 2. Added an if statement to check for version ahead, so an error does not occur in case the user is using the later versions of Tensorflow.

pmh47 commented 4 years ago

Thanks; however, the function is not deprecated -- only keep_dims needs changing to keepdims. I've pushed my own fix to master.