google-colaboratory - AttributeError:模块'tensorflow'在Mask RCNN实施期间没有属性'log'
问题描述
我尝试将日志更改为 math.log 并将 tensorflow 版本降级为 1.4 但仍然出现错误。有人可以帮忙。谢谢。AttributeError:在用户代码中:
/content/Mask_RCNN/mrcnn/model.py:390 call *
roi_level = log2_graph(tf.sqrt(h * w) / (224.0 / tf.sqrt(image_area)))
/content/Mask_RCNN/mrcnn/model.py:341 log2_graph *
return tf.log(x) / tf.log(2.0)
AttributeError: module 'tensorflow' has no attribute 'log'
解决方案
这个问题是由于向后兼容造成的。
它适用于我使用python 3.6
以下要求:
numpy<2.0,>=1.16.0
scipy
Pillow
cython
matplotlib
scikit-image>=0.14.2
tensorflow==1.15.3
keras==2.2.4
opencv-python
h5py
imgaug
推荐阅读
- r - 替换 r 中的字符串模式
- google-apps-script - 包括已更改单元格的整行
- node.js - 运行示例测试时出现赛普拉斯错误。赛普拉斯崩溃并显示错误 ECONNRESET
- computational-geometry - 如何从 vtkMarchingSquares 获得定向轮廓
- cognos - Cognos 图 - 根据不同维度的值指定样式
- rabbitmq - Spring streamBridge 在启动时创建rabbitmq队列
- android - Android ViewModel 正在泄漏
- xamarin.forms - Xamarin.Forms 中的设置列表
- sql - Sql需要对列进行多次求和并将结果水平拆分为一行
- python-3.x - Django 单元测试句柄 PermissionDenied