![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Tensorflow
斑马森林m
这个作者很懒,什么都没留下…
展开
-
tf2.0没有fully_connected()
tf2.0没有fully_connected()全连接层函数今天在做卷积层的时候,要做一个全连接层,发现调用 tf.contrib.layers.fully_connected()调用失败,查阅发现tf2.0已经去除了contrib的库,因为该库比较繁琐,不容易维护,所以已经逐渐去除了,contrib库中的layers但是还是保存的,所以有些函数还是存在的,直接调用 tf.compat.v1.layers.有些函数还是存在的,但是fully_connected()已经去除。显然这里再去想方设法的调用c原创 2021-04-08 23:34:49 · 3136 阅读 · 6 评论 -
tf忽略Warning警告信息
WARNING:tensorflow:From E:/PycharmProject/onlyfortest/test1.py:39: flatten (from tensorflow.python.keras.legacy_tf_layers.core) is deprecated and will be removed in a future version.在用tf2.0的时候,可能会提示函数升级或者变换了,即将删除的warning消息,用普通的代码去消除warning代码根本不行,弄死强迫症。im原创 2021-04-05 22:48:33 · 1928 阅读 · 1 评论 -
tensorflow中的self._traceback = tf_stack.extract_stack()
运行Tensorflow时候发生以下错误:tensorflow.python.framework.errors_impl.FailedPreconditionError: Error while reading resource variable loss from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist.原创 2021-01-06 22:10:36 · 3077 阅读 · 1 评论