본문 바로가기

Ph.D. Course/KJI

[etc.] Tensorflow 2.x : contrib issue

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)