会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
吖~
博客园
首页
新随笔
联系
订阅
管理
2021年11月
.pth文件怎么转换为.ckpt文件
摘要: import tensorflow.compat.v1 as tf import torch def convert(bin_path, ckptpath): with tf.Session() as sess: for var_name, value in torch.load(bin_path,
阅读全文
posted @ 2021-11-22 20:08 吖~
阅读(1504)
评论(0)
推荐(0)
2021年10月
ImportError: cannot import name 'export_saved_model' from 'tensorflow.python.keras.saving.saved_model'
摘要: tensorflow的版本问题,跟python是否匹配 https://zhuanlan.zhihu.com/p/350995478 https://zhuanlan.zhihu.com/p/363110359 具体版本匹配可以看看这两个 不过我是在colab训练 用3.7+tensorflow1.
阅读全文
posted @ 2021-10-25 17:28 吖~
阅读(2241)
评论(0)
推荐(0)
ImportError: cannot import name 'get_file' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py)
摘要: 用from tensorflow.keras.utils import get_file 代替 from keras.utils import get_file 原文地址:https://exerror.com/importerror-cannot-import-name-to-categorica
阅读全文
posted @ 2021-10-24 09:28 吖~
阅读(2038)
评论(0)
推荐(0)
pip install nltk 之后from nltk.tokenize import RegexpTokenizer仍然报错SyntaxError: invalid syntax
摘要: 找了好几个小时终于解决了 如果是python2.7版本,那么需要nltk的版本是3.0 pip install nltk==3.0 原文:https://stackoverflow.com/questions/61560956/invalid-syntax-on-importing-nltk-in-
阅读全文
posted @ 2021-10-15 16:15 吖~
阅读(174)
评论(0)
推荐(0)
TypeError: Cannot handle this data type: (1, 1, 6), |u1
摘要: PIL_im = Image.fromarray(np.uint8(img)) PIL_att = Image.fromarray(np.uint8(one_map)).convert('RGB') 运行一部分之后报错 TypeError: Cannot handle this data type:
阅读全文
posted @ 2021-10-15 09:20 吖~
阅读(3456)
评论(0)
推荐(0)
unet每层参数形状
摘要: 原文链接:https://blog.csdn.net/weixin_39875161/article/details/103378281?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~aggregatepage~fir
阅读全文
posted @ 2021-10-14 16:53 吖~
阅读(217)
评论(0)
推荐(0)
ZeroDivisionError: integer division or modulo by zero
摘要: 路径的问题,没有找到图片。。。。明明都在一个文件夹不知道为啥就不能写相对路径 不过最后结果终于粗来了。。。。。
阅读全文
posted @ 2021-10-13 16:11 吖~
阅读(757)
评论(0)
推荐(0)
transform.Normalize()
摘要: 原文链接:https://blog.csdn.net/b_dxac/article/details/115611780 ToTensor() 能够把灰度范围从0-255变换到0-1之间,而后面的transform.Normalize()则把0-1变换到(-1,1).具体地说,对每个通道而言,Norm
阅读全文
posted @ 2021-10-12 17:31 吖~
阅读(290)
评论(0)
推荐(0)
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
摘要: 方法一:把loss.data[0]后边的[0]删除 方法二:将代码中的 train_loss+=loss.data[0] #修改为: train_loss+=loss.item() #bingo 我的用法二解决
阅读全文
posted @ 2021-10-10 15:19 吖~
阅读(183)
评论(0)
推荐(0)
trans_to_tensor = transforms.ToTensor() 做个记录
摘要: https://github-wiki-see.page/m/FiveBigGuys/Learning/wiki/LearnPTTransforms
阅读全文
posted @ 2021-10-05 17:56 吖~
阅读(446)
评论(0)
推荐(0)
下一页
公告