![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
TensorFlow
文章平均质量分 54
Tensorflow
买猫咪的小鱼干
这个作者很懒,什么都没留下…
展开
-
Debug | ERROR: Could not find a version that satisfies the requirement tensorflow
报错信息:安装pip install tensorflow==1.15.4的时候遇到了如下报错:ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.4问题分析:如果排除网络问题后,多半就是版本兼容问题了,有几个可能:Tensorflow 和 Python版本匹配:可以参见这篇博客Tensorflow | TF与Keras版本对应,可以看到Tensorflow与Python版本对应,主原创 2021-04-10 10:23:01 · 3567 阅读 · 2 评论 -
Debug | module ‘tensorflow‘ has no attribute ‘reset_default_graph‘
module 'tensorflow' has no attribute 'reset_default_graph'原创 2021-03-29 10:39:46 · 328 阅读 · 0 评论 -
Debug | ‘Model‘ object has no attribute ‘_in_multi_worker_mode‘
报错信息'Model' object has no attribute '_in_multi_worker_mode'分析可能是由于tensorflow(tf) 和 keras 的API混用参考文献:reference1reference2解决方法统一一下,比如统一为keras,将:tf.keras.callbacks.ModelCheckpoint()tf.keras.callbacks.CSVLogger去除tf为:keras.callbacks.ModelCheckpoint(原创 2021-03-03 21:55:08 · 1155 阅读 · 2 评论 -
Tensorflow | TF与Keras版本对应
在写代码的时候,由于各种原因,tensforlow要换个版本,keras要换个,最后导致版本不对应,因此造成了很多麻烦。这里mark一下对应关系:List of Available EnvironmentsP.S. 这个网站还有pytorch和fastai,caffe和python等 ????FrameworkEnv name (–env parameter)DescriptionDocker ImagePackages and Nvidia SettingsTensorF原创 2021-03-03 20:38:56 · 12190 阅读 · 11 评论 -
Debug | Could not build a TypeSpec for <...> with type KerasTensor
报错信息Could not build a TypeSpec for <KerasTensor: shape=(None, 64, 64, 256) dtype=float32 (created by layer 'tf.image.resize')> with type KerasTensor分析参考博客,认为是tensorflow版本问题,该问题经常出现在1.x和2.x的代码之间。可能是tensorflow或keras的API改变造成的。解决方法换tensorflow版本!因为是原创 2021-03-03 18:14:53 · 5957 阅读 · 3 评论 -
Debug | (‘Keyword argument not understood:‘, ‘input‘)
报错信息TypeError: ('Keyword argument not understood:', 'input')分析找人有问题的代码,model = Model(input=inputs, output=[nestnet_output_4])解决方法老伙计了,多半又是keras版本的锅,换成model = Model(inputs=..., outputs=...)就好了,解决!...原创 2020-12-31 20:09:18 · 11062 阅读 · 19 评论 -
Debug | AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘resize_images‘
报错信息AttributeError: module 'tensorflow._api.v2.image' has no attribute 'resize_images'分析还是老问题,TensorFlow版本问题解决方法将resize_images换成resize原创 2020-12-19 21:28:01 · 4081 阅读 · 2 评论 -
Debug | AttributeError: module ‘keras.backend‘ has no attribute ‘image_dim_ordering‘
错误提示:AttributeError: module 'keras.backend' has no attribute 'image_dim_ordering' 一般是因为Keras的版本代码不同造成的,找到报错行一般是if K.image_dim_ordering() == ...或K.image_data_format() == ... 这里如果用的是最新的keras,代码却是if K.image_dim_ordering() == "th"改成K.image_data_format()原创 2020-12-15 16:22:04 · 262 阅读 · 0 评论