Normally, you can use Tensorflow 1.x code in Tensorflow 2.x with tensorflow.compat.v1.x.
But It doesn't working with contrib.
So you need to use tf.keras when you try to normalize or etc. in tensorflow2.x.
ex)
r1 = rf.keras.regularizers.L1(l1=1-e4)
r2 = rf.keras.regularizers.L2(l2=1-e4)
'Ph.D. Course > KJI' 카테고리의 다른 글
[etc.] tf.compat.v1.saved_model.load (0) | 2023.01.12 |
---|---|
[etc] The option verbose in Tensorflow2.0 fit and evaluate function (0) | 2023.01.03 |
[NVIDIA NANO] Adding Swap Memory (0) | 2023.01.03 |
[NVIDA NANO] Jetpack 4.6.2 Tensorflow setup (0) | 2023.01.02 |
[NVIDIA NANO] nvcc error (0) | 2023.01.02 |