<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Alexwu555的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/Alexwu555</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Alexwu555]]></copyright><item><title><![CDATA[TypeError:can‘t convert CUDA tensor to numpy.]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108608253</link><guid>https://blog.csdn.net/Alexwu555/article/details/108608253</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 20:09:06 +0800</pubDate><description><![CDATA[问题：

TypeError:can't convert CUDA tensor to numpy.

解决：

把导致报错的tensor X，改成x.cpu()
]]></description><category></category></item><item><title><![CDATA[RuntimeError :excepted object of type torch.cuda.floatTensor but found type torch.floatTensor]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108608119</link><guid>https://blog.csdn.net/Alexwu555/article/details/108608119</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 20:06:12 +0800</pubDate><description><![CDATA[问题：

RuntimeError :excepted object of type torch.cuda.floatTensor but found type torch.floatTensor

解决：

将导致报错的tensor X，改成X.cuda()
]]></description><category></category></item><item><title><![CDATA[RuntimeError :excepted object of type torch.floatTensor but found type torch.DoubleTensor]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108608063</link><guid>https://blog.csdn.net/Alexwu555/article/details/108608063</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 20:02:48 +0800</pubDate><description><![CDATA[问题：

很多类似的tensor类型错误



解决：

tensor.to(torch.float34),括号具体是什么具体问题具体分析
]]></description><category></category></item><item><title><![CDATA[功能性小代码简记001]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108607774</link><guid>https://blog.csdn.net/Alexwu555/article/details/108607774</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 19:58:28 +0800</pubDate><description><![CDATA[1、查看变量类型

numpy和tensor都适用：type(bianliang)

tensor专门查看数据类型：tensor.dtype。如：tensor.float64



注意：

在gpu上运行pytorch时，报错信息出现的“RuntimeError :excepted object of type torch.floatTensor but found type torch.DoubleTensor"中的DoubleTensor指的是float64,floatTensor是float32.
]]></description><category></category></item><item><title><![CDATA[AttributeError：module ‘numpy‘ has no attribute ‘nancumprod‘]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108607053</link><guid>https://blog.csdn.net/Alexwu555/article/details/108607053</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 19:22:59 +0800</pubDate><description><![CDATA[问题：

在import skimage这个包时，报错AttributeError：module 'numpy' has no attribute 'nancumprod'



怀疑：

skimage的依赖包numpy的版本不符合

解决：

把numpy从1.11.3升级到1.13.3。

















但是，

在使用skimage其他功能时，又报其他错，目前还未解决，但我怀疑依然是包的版本不对。










...]]></description><category></category></item><item><title><![CDATA[2020-09-15Value Error：Unsuported or unknown xxx:‘xxx‘!win10和Linux系统不同args对命令行参数解析机制不同，会多出引号问题]]></title><link>https://blog.csdn.net/Alexwu555/article/details/108606645</link><guid>https://blog.csdn.net/Alexwu555/article/details/108606645</guid><author>Alexwu555</author><pubDate>Tue, 15 Sep 2020 19:13:36 +0800</pubDate><description><![CDATA[问题：

args解析命令行在Linux上的服务器跑时，不会报错，在自己笔记本（win10）下报错。



查看GPU是可用的。





解决：

Win10下的args解析的命令行输入带单引号，导致无法和字典keyword匹配。



可直接指定为0或者加eval()函数可以去掉一对单引号。注意：若单引号不是完整的一对，用eval()也会报错，可手动补全单引号再eval()


...]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day06]]></title><link>https://blog.csdn.net/Alexwu555/article/details/107532220</link><guid>https://blog.csdn.net/Alexwu555/article/details/107532220</guid><author>Alexwu555</author><pubDate>Thu, 23 Jul 2020 11:24:17 +0800</pubDate><description><![CDATA[python自学小记录04
一、python易忘点
1、(string)*重复string0次或多次；
(string)+重复1次或多次；
(string)-重复0次或1次。
{x,y} 重复x次或y次


2、特殊序列是\ d，\ s和\ w，分别匹配数字，空格和单词字符。
在ASCII模式下，它们等效于[0-9]，[\ t \ n \ r \ f \ v]和[a-zA-Z0-9_]。
\D匹配一个非数字字符。等价于 [^0-9]。
4、\Z匹配字符串结束，如果是存在换行，只匹配到换行前的结束字符串；
\]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day05]]></title><link>https://blog.csdn.net/Alexwu555/article/details/106892787</link><guid>https://blog.csdn.net/Alexwu555/article/details/106892787</guid><author>Alexwu555</author><pubDate>Sun, 21 Jun 2020 23:02:50 +0800</pubDate><description><![CDATA[python自学小记录03
一、python易忘点
1、magic method
给python原有函数前后加双下划线，重定义该函数

2、”note “.join(sqe)
以note为间隔，隔开sqe的东西

3、format():把传统的%替换为{}来实现格式化输出

4、没懂python单双下划线导致的访问权限问题！！！
？无public单halfprivate双private（实例不能访问）
5、Python中3种方式定义类方法：常规方式, @classmethod修饰方式,@staticmeth]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day04]]></title><link>https://blog.csdn.net/Alexwu555/article/details/106811636</link><guid>https://blog.csdn.net/Alexwu555/article/details/106811636</guid><author>Alexwu555</author><pubDate>Wed, 17 Jun 2020 16:29:27 +0800</pubDate><description><![CDATA[（past time补充）
吴恩达dl再学习

















]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day03]]></title><link>https://blog.csdn.net/Alexwu555/article/details/106811152</link><guid>https://blog.csdn.net/Alexwu555/article/details/106811152</guid><author>Alexwu555</author><pubDate>Wed, 17 Jun 2020 16:15:51 +0800</pubDate><description><![CDATA[python自学小记录02
一、pytorch易忘点
1、tensor的创建function可以被查看，requires_grad=true跟踪tensor所有操作
2、调用 .backward()来自动计算所有梯度，该张量的梯度将累积到 .grad 属性中。
若求导tensor是一元（标量），则 .backward()不需参数；
否则， .backward()里要指定一个和待求导的tensor一样规模的tensor做参数。
net.parameters()可获得网络的各层权重。
3、疑惑：net.zero]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day02]]></title><link>https://blog.csdn.net/Alexwu555/article/details/106418043</link><guid>https://blog.csdn.net/Alexwu555/article/details/106418043</guid><author>Alexwu555</author><pubDate>Thu, 04 Jun 2020 14:41:01 +0800</pubDate><description><![CDATA[一、python错题集
1、


]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day01]]></title><link>https://blog.csdn.net/Alexwu555/article/details/104884477</link><guid>https://blog.csdn.net/Alexwu555/article/details/104884477</guid><author>Alexwu555</author><pubDate>Sun, 15 Mar 2020 19:58:42 +0800</pubDate><description><![CDATA[视频学习

为什么有些小样本数据集可以用很小的minibatch，好像有16，8的？

感觉就是平均的规则太“死板”，所以弄个加权。而普通加权又是另一种“死板”，所以用前面的所有“平均”代表当前数。之所以“指数”，是因为，按公式一层层套进去之后，其实就是一个和贝塔有关的指数。

同理，普通梯度下降，梯度更新也太“死板”，所以借用指数加权平均思想，来更新梯度。（视频有个球滚下碗的比喻，贝塔比喻摩擦，...]]></description><category></category></item><item><title><![CDATA[摆脱肥宅，从我做起—day00]]></title><link>https://blog.csdn.net/Alexwu555/article/details/104863304</link><guid>https://blog.csdn.net/Alexwu555/article/details/104863304</guid><author>Alexwu555</author><pubDate>Sat, 14 Mar 2020 17:11:15 +0800</pubDate><description><![CDATA[肥宅的自我觉醒

原定二月初回学校，由于疫情原因，结果给自己放了整整两个月肥宅假。临近三月中了，被毕业支配的恐惧，我要立下flag，从明天起，每日更新一篇杂记，主要记录当天学习情况。（后悔没有把电脑带回家）


...]]></description><category></category></item><item><title><![CDATA[RuntimeError: Error(s) in loading state_dict for ***: Missing key(s) in state_dict:]]></title><link>https://blog.csdn.net/Alexwu555/article/details/103362069</link><guid>https://blog.csdn.net/Alexwu555/article/details/103362069</guid><author>Alexwu555</author><pubDate>Tue, 03 Dec 2019 10:05:57 +0800</pubDate><description><![CDATA[问题：



分析：加载模型参数时，关键字不匹配，每个都多了“module”



解决：

只要给自己的net再套一层torch.nn.DataParallel()，就行。
]]></description><category></category></item><item><title><![CDATA[pytorch的可视化工具visdom无法连接]]></title><link>https://blog.csdn.net/Alexwu555/article/details/103356591</link><guid>https://blog.csdn.net/Alexwu555/article/details/103356591</guid><author>Alexwu555</author><pubDate>Mon, 02 Dec 2019 20:36:00 +0800</pubDate><description><![CDATA[问题：



在conda下运行



导入jsonpatch模块后



测试小例子


from visdom import Visdom
import numpy as np

image = np.zeros((128, 128))
vis = Visdom()
vis.text("hello world!!!")
vis.image(image)
vis.line(Y=np.column...]]></description><category></category></item><item><title><![CDATA[import arpack无法加载属于scikit-image版本问题]]></title><link>https://blog.csdn.net/Alexwu555/article/details/103263662</link><guid>https://blog.csdn.net/Alexwu555/article/details/103263662</guid><author>Alexwu555</author><pubDate>Tue, 26 Nov 2019 19:37:41 +0800</pubDate><description><![CDATA[问题：



按网上博客，把scikit-image改成1.14.1，报以下错：



最后，解决方法：





把两个库换成对应版本。

可参考以下链接：https://github.com/scikit-image/scikit-image/issues/3906#issuecomment-492039622
...]]></description><category></category></item><item><title><![CDATA[ModuleNotFoundError: No module named 'cPickle']]></title><link>https://blog.csdn.net/Alexwu555/article/details/103088930</link><guid>https://blog.csdn.net/Alexwu555/article/details/103088930</guid><author>Alexwu555</author><pubDate>Fri, 15 Nov 2019 17:15:19 +0800</pubDate><description><![CDATA[原因：python2有cPickle，python3没有cPickle；

解决办法：将cPickle改为pickle
]]></description><category></category></item><item><title><![CDATA[jupyther notebook进入除默认C盘以外的盘]]></title><link>https://blog.csdn.net/Alexwu555/article/details/102979659</link><guid>https://blog.csdn.net/Alexwu555/article/details/102979659</guid><author>Alexwu555</author><pubDate>Fri, 08 Nov 2019 20:16:58 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[jupyter notebook 导入自己写的模块]]></title><link>https://blog.csdn.net/Alexwu555/article/details/100834499</link><guid>https://blog.csdn.net/Alexwu555/article/details/100834499</guid><author>Alexwu555</author><pubDate>Sat, 14 Sep 2019 20:10:28 +0800</pubDate><description><![CDATA[jupyter notebook 导入自己写的模块，自定义模块要.py文件，不能是jupyter notebook 自己的文件格式
]]></description><category></category></item><item><title><![CDATA[引入keras后出现的Using TensorFlow backend的错误]]></title><link>https://blog.csdn.net/Alexwu555/article/details/100834377</link><guid>https://blog.csdn.net/Alexwu555/article/details/100834377</guid><author>Alexwu555</author><pubDate>Sat, 14 Sep 2019 20:08:47 +0800</pubDate><description><![CDATA[问题：用Anaconda检索keras-gpu，apply后，理论上应该自动配好相关的cuddn和tensorflow-gpu及其相应版本，但运行程序时出现如标题错误和一堆报错。按网上一堆方法改，都不好用。比如，加os.environ['KERAS_BACKEND']='tensorflow-gpu'，更新setup tool等。

解决：最后误打误撞，在Anaconda上修改tensorflow...]]></description><category></category></item></channel></rss>