[英]How to replace TensorFlow 2.0 “contrib” function calls?
I am migrating my code from TensorFlow 1.13.1 to TensorFlow 2.0. 我正在将我的代码从TensorFlow 1.13.1迁移到TensorFlow 2.0。 However, "contrib" modules will be removed and I can't find a replacement for these functions:
但是,“contrib”模块将被删除,我找不到这些功能的替代品:
tf.contrib.layers.l2_regularizer
tf.contrib.image.transform
I thought about forking the whole "layers" and "image" directory, but this could get really messy, so I'd rather avoid that. 我想过分配整个“图层”和“图像”目录,但这可能会变得非常混乱,所以我宁愿避免这样做。
Thanks! 谢谢!
You can take a look at the regularization functions ' page of TF 2.0. 您可以查看TF 2.0的正则化函数页面。 There you can find l1, l2, and l1 & l2 regularizations.
在那里你可以找到l1,l2和l1&l2正则化。
Image preprocessing is now based on Keras syntax, you can find some hints here . 图像预处理现在基于Keras语法,您可以在这里找到一些提示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.