深度学习
BigData-0
这个作者很懒,什么都没留下…
展开
-
no attribute ‘ix‘ \ xlrd >= 1.0.0 f\ no attribute ‘imread‘
df.ix[:0,0] 更改为 df.iloc[:0,1]原创 2022-08-23 22:39:34 · 165 阅读 · 0 评论 -
pytorch测试gpu
import torcht = torch.tensor([2, 3])print(t)x=torch.randn(3,4)print(x)# x_gpu=x.cuda(0)x_gpu2=x.cuda()print(x_gpu2)x_cpu=x_gpu2.cpu()print(x_cpu)x_arr=x_cpu.cpu().numpy()print(x_gpu2)print(x_arr)原创 2021-11-09 22:43:42 · 3761 阅读 · 0 评论 -
Fatal error in launcher: Unable to create process using tensorboard
卸载重装pip uninstall tensorboardpip install tensorboard原创 2021-11-07 17:43:02 · 476 阅读 · 0 评论 -
tensorflow输入x和y拟合线性曲线,求k,b
import numpy as npimport tensorflow as tfx_data=np.random.rand(1000)y_data=x_data*10 +77print(x_data)print(y_data)k=tf.Variable(0.,name='k')b=tf.Variable(0.)y=k*x_data+bloss = tf.reduce_mean(tf.square(y-y_data))optimizer = tf.train.GradientDes原创 2021-11-07 12:17:41 · 310 阅读 · 0 评论 -
jupyter Fatal error in launcher: Unable to create process using
反编译修改容易出错,建议用以下方式修改pip uninstall jupyter jupyter-client jupyter-console jupyter-core jupyterlab-pygments jupyterlab-widgets删除script目录下面的文件然后安装 pip install jupyter...原创 2021-06-29 23:50:53 · 604 阅读 · 0 评论 -
‘gbk‘ codec can‘t decode byte 0x9d in position 1793: illegal multibyte seque
raw_text=open('Winston_Churchil.txt').read()????raw_text=open('Winston_Churchil.txt','r',encoding='UTF-8').read()原创 2021-06-09 23:52:00 · 584 阅读 · 0 评论 -
pytorch运行出错:AttributeError: module ‘torch‘ has no attribute ‘ops‘
pytorch运行出错:AttributeError: module ‘torch‘ has no attribute ‘ops‘pip install torchvision==0.4.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/原创 2021-03-06 11:56:03 · 3521 阅读 · 2 评论 -
slicing multiple dimensions at the same time isn‘t supported yet
参考其他大佬,在 @torch.jit.script 这个注释前加注释 :# @torch.jit.script,可以解决!原创 2021-03-06 11:54:29 · 172 阅读 · 0 评论 -
python安装库报权限问题时使用pip install torch --user ,会将模块安装自己的文件目录下
python安装库报权限问题时使用pip install torch --user ,会将模块安装自己的文件目录下原创 2021-01-26 22:16:30 · 301 阅读 · 0 评论 -
boy or girl tensorflow
原创 2021-01-06 21:55:07 · 140 阅读 · 0 评论 -
验证码识别rnn训练模型代码
机器性能太弱,不能设置太多参数,梯度下降难import numpy as npimport randomfrom PIL import Imageimport matplotlib.pyplot as pltimport tensorflow as tfdef code_cnn(x,y): #conv->relu->max_pool->conv->relu->max_pool->dropout # ->conv->relu-&g原创 2020-11-08 23:05:53 · 261 阅读 · 0 评论 -
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[64,1,5,5]
参数太多,gpu内存不足,适当减少参数原创 2020-11-08 22:55:26 · 187 阅读 · 0 评论 -
ValueError: not enough values to unpack (expected 3, got 2)
数量要一样原创 2020-11-08 22:52:51 · 320 阅读 · 0 评论 -
使用卷积神经网络识别验证码的训练集
import osimport randomimport numpy as npfrom captcha.image import ImageCaptchafrom random import randintfrom PIL import Imageimport matplotlib.pyplot as pltcode_char_set = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd原创 2020-11-01 22:50:04 · 334 阅读 · 0 评论 -
数据增强
原创 2020-11-01 11:09:27 · 185 阅读 · 0 评论 -
梯度下降的理解
原创 2020-11-01 10:25:51 · 109 阅读 · 0 评论