
Python
AsmallFROG
这个作者很懒,什么都没留下…
展开
-
Tensorflow/Keras/h5py报错处理
个人经历记录贴,若有侵请联系我谢谢。目录Python/Tensorflow/Keras版本对应AttributeError: module 'h5py' has no attribute 'File'AttributeError: 'str' object has no attribute 'decode'Python/Tensorflow/Keras版本对应按理说Tensorflow 2.x已经集成了Keras 如果有报错可能需要检查一下版本对应。关于h5py,Tensorflow2.1 不支持原创 2022-03-20 14:35:26 · 7145 阅读 · 4 评论 -
python用matplotlib画图提示Fail to allocate bitmap
Fail to allocate bitmap,内存不够。pycharm里一直在生成图形,虽然没用plt.show()但是还是占内存。在导入模块时使用:import matplotlibmatplotlib.use("Agg")参考:matplotlib.use(‘agg’)的作用原创 2021-12-23 18:40:30 · 1701 阅读 · 0 评论 -
程序进程可视化(tqdm进度条)
处理较大数据文件(.txt .csv)时需要知晓程序运行的进程,方便掌握运行情况。使用进度条可以直观清晰地实现这一想法。使用 tqdm 库在 Python 循环中添加一个进度提示信息,只需要封装任意的迭代器 tqdm(iterator) 即可。from tqdm import tqdm # 导入库函数for i in tqdm(range(len(data_input))): # tqdm 可视化展示进程 # 演示代码,输入你要执行的循环即可 data_input[i, :]原创 2021-11-06 12:06:41 · 438 阅读 · 0 评论