Differences between versions of TensorFlow

import tensorflow.compat.v1 as tf and import tensorflow.compat.v2
why are there 2 slabs in tensorflow to write programs

You can use these commands for example to run v1 code in a v2 runtime environment without going through the otherwise mandatory migration process.

1 Like