自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 收藏
  • 关注

原创 vimrc支持python3,放弃python2

2022-12-07 19:47:25 428

原创 from pytorch3d import _C报错

试过了很多方法,最后还是重装环境解决conda create -n pytorch3d python=3.8conda activate pytorch3dconda install -c fvcore -c iopath -c conda-forge fvcore iopathpip install ‘torch1.6.0+cu101’ -f https://download.pytorch.org/whl/torch_stable.htmlpip install 'torchvision0.7

2022-05-25 10:13:53 4237 3

原创 运行时caffe2_detectron_ops_gpu.dll找不到 pyinstaller打包

注意报的warning我这里报找不到对应的dll在资源管理器,搜索这个dll,找到目录,要是和你torch版本一样的编译时参考https://blog.csdn.net/qq_35924690/article/details/120483806,这个里面的多个文件记住生成spec后,在spec的pathex,加入刚刚的目录,还有system32的,这个system32目录参考http://www.javashuo.com/article/p-rptyzkrj-dr.html最后pathex

2022-04-27 21:22:33 3678

原创 win10和ubuntu双系统,切换优先启动

安装了ubuntu双系统,参考https://blog.csdn.net/baidu_36602427/article/details/86548203安装完成后启动ubuntu系统必须要通过,其他选项——ubuntu,也就是主界面没有ubuntu,选项只有win10系统和另一个U大师备用恢复系统,尝试,easybcd不行,转而使用easyuefi,没有效果最后使用如下命令更改优先启动使用管理员开启命令行,运行下面命令,该路径可通过easyuefi获得ubuntu系统bcdedit /se.

2022-02-12 15:16:39 2568 1

原创 fastai更新后训练速度较慢——未使用GPU

fastai更新后训练速度慢的问题!很久没用fastai,使用时发现训练速度很慢,后来发现是没用GPU原因是torch更新时更新成了CPU版本下面代码查看是否能用GPUimport torchprint(torch.cuda.is_available())print(torch.__version__)print(torch.version.cuda)print(torch.backends.cudnn.version())如果是false,且version是cpu版本,那么将原版本卸载

2021-11-25 15:45:17 1557

原创 postman post请求,踩坑(未解决)

raw格式可以请求到数据,但是x-www-form-urlencoded格式不行header的content-type是application/x-www-form-urlencoded; charset=UTF-8奇怪的是python的request的post可以请求到别的网页没有这样的问题是因为携带的数据有一个值是列表带字典吗??还是因为参数有中文的问题?...

2021-01-19 12:59:48 840

原创 爬虫get/post返回值为空

1.检查输入url2.检查是post还是get请求3.检查核对para参数对不对4.检查header1-4步可以用postman尝试使用postman可参考:https://www.zhihu.com/question/60256922/answer/174211193注意注意!!!参数里面不要多空格!如果还是不行,可能是header里面要加 Content-Type属性,建议用postman调试...

2021-01-18 19:33:20 1081

原创 爬虫xpath

xpath解析:最常用且最便捷高效的一种解析方式。通用性。- xpath解析原理: - 1.实例化一个etree的对象,且需要将被解析的页面源码数据加载到该对象中。 - 2.调用etree对象中的xpath方法结合着xpath表达式实现标签的定位和内容的捕获。- 环境的安装: - pip install lxml- 如何实例化一个etree对象:from lxml import etree - 1.将本地的html文档中的源码数据加载到etree对象中:

2021-01-17 13:46:46 185

原创 爬取糗图百科图片

import requestsimport reimport os'''爬取糗事百科所有图片(利用re表达式)'''# 如果目录不存在,则创建目录if not os.path.exists('./pics'): os.makedirs('./pics')headers = { 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom

2021-01-17 09:21:35 1539

原创 python文件读取写入

123.txt23121231233123with open("123.txt",'r') as fp: t=fp.read()print(t)with open("123.txt",'r') as fp: for t in fp: print(t)with open("123.txt",'r') as fp: t=fp.readlines()#替换for _ in t: _=_.replace("2","9") print(_

2021-01-14 17:08:39 118

原创 爬取网站图片

import requestsimport jsonurl="https://bkimg.cdn.bcebos.com/pic/c8ea15ce36d3d539aaa9079a3b87e950342ab0d6"print(requests.get(url))data=requests.get(url=url)# text字符串 content 二进制数据 json对象with open("1.jpg","wb") as fp: fp.write(data.content)总结:图片

2021-01-13 21:50:40 193

原创 爬取化妆品资质证

import requestsimport jsondef get_company_detail(id): url = 'http://scxk.nmpa.gov.cn:81/xk/itownet/portalAction.do?method=getXkzsById' headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like G

2021-01-13 21:49:43 122

原创 爬取豆瓣电影排行

import requestsimport jsonif __name__=='__main__': # url是post请求的url url='https://movie.douban.com/j/chart/top_list' # UA伪装 headers={ 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)

2021-01-13 21:47:46 244

原创 爬取肯德基门店信息

import requestsimport jsonif __name__=='__main__': # url是post请求的url url='http://www.kfc.com.cn/kfccda/ashx/GetStoreList.ashx?op=keyword' # UA伪装 headers={ 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

2021-01-13 21:46:47 222

原创 爬取百度翻译结果

应用post请求爬取百度翻译结果import requestsimport jsonif __name__=="__main__": post_url="https://fanyi.baidu.com/sug" # UA伪装 headers = { 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.

2021-01-13 21:41:10 221

原创 爬取搜狗搜索页面

功能,爬取搜狗搜索的页面,保存到本地import requestsfrom tkinter import *def func_search(): word=entry_key_word.get() print(word) param={} param["query"]=word # UA伪装 headers={ 'User-Agent':"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWe

2021-01-13 21:36:59 1004

原创 tkinter 网址汇总

查询具体方法https://blog.csdn.net/u014380159/article/details/51941842/

2021-01-06 21:36:46 663

原创 IQ调制

IQ调制IQ调制定义数字调制的过程就是将原始数据比特流按照一定的规则映射至IQ坐标系的过程。映射完成后将得到数字I和Q信号,再分别由DAC转换为模拟I和Q信号,最后经IQ调制器上变频至射频频段。IQ定义reference: 知乎....

2020-11-04 14:46:20 524

原创 7-mnist-cnn

mnist cnn导入包%reload_ext autoreload%autoreload 2%matplotlib inlinefrom fastai.vision import *导入数据path = untar_data(URLs.MNIST)path.ls()[WindowsPath('C:/Users/Wither8848/.fastai/data/mnist_pn...

2020-03-29 13:37:49 184

原创 6-热力图

数据增强导入包%reload_ext autoreload%autoreload 2%matplotlib inlinefrom fastai.vision import *bs = 64path = untar_data(URLs.PETS)/'images'数据增强p_affine仿射变换发生概率p_lighting光照变换发生概率tfms = get_tran...

2020-03-29 13:35:08 298

原创 6-kaggle-rossman

rossman导入包%reload_ext autoreload%autoreload 2from fastai.tabular import *数据预处理加入时间的表示,如周几在rossmandataclean完成add_datepart(train, "Date", drop=False)add_datepart(test, "Date", drop=False)载入数...

2020-03-29 13:32:49 267

原创 4-协同过滤(推荐系统)

协同过滤导入包,数据from fastai.collab import *from fastai.tabular import *path = untar_data(URLs.ML_SAMPLE)pathWindowsPath('C:/Users/Wither8848/.fastai/data/movie_lens_sample')ratings = pd.read_csv(p...

2020-03-29 13:27:43 540

原创 4-tablur

处理表格数据导入包,数据集from fastai.tabular import *path = untar_data(URLs.ADULT_SAMPLE)df = pd.read_csv(path/'adult.csv')指定哪些是类别变量,哪些是连续变量数据预处理procsdep_var = 'salary'cat_names = ['workclass', 'educa...

2020-03-29 13:25:04 172

原创 3-imdb

3-imdb数据集导入包%reload_ext autoreload%autoreload 2%matplotlib inline导入的为.text包from fastai.text import *导入,查看样本数据path = untar_data(URLs.IMDB_SAMPLE)path.ls()[WindowsPath('C:/Users/Wither884...

2020-03-29 13:23:05 657

原创 3-unet-camvid

unet图像分割导入包,数据集%reload_ext autoreload%autoreload 2%matplotlib inlinefrom fastai.vision import *from fastai.callbacks.hooks import *from fastai.utils.mem import *path = untar_data(URLs.CAMVID)...

2020-03-08 14:10:22 469 2

原创 3-unet-回归

unet回归导入包,数据集%reload_ext autoreload%autoreload 2%matplotlib inlinefrom fastai.vision import *cal是相机的校正数字,必须要使用path = untar_data(URLs.BIWI_HEAD_POSE)cal = np.genfromtxt(path/'01'/'rgb.cal', s...

2020-03-08 14:07:01 1309

原创 fastai 3-planet

多标签分类导入包,路径%reload_ext autoreload%autoreload 2%matplotlib inlinefrom fastai.vision import *path = Config.data_path()/'planet'path.mkdir(parents=True, exist_ok=True)pathWindowsPath('C:/Users/W...

2020-03-07 15:38:42 264

原创 2-sgd

随机梯度下降导入包,数据%matplotlib inlinefrom fastai.basics import *n=100x = torch.ones(n,2) x[:,0].uniform_(-1.,1)x[:5]tensor([[ 0.9955, 1.0000], [-0.0753, 1.0000], [ 0.4918, 1.0000],...

2020-03-06 11:26:12 121

原创 fastai 2-download

运用下载的数据集训练导入包,查看数据from fastai.vision import *path = Path('data/bears')path.ls()[WindowsPath('data/bears/black'), WindowsPath('data/bears/teddy'), WindowsPath('data/bears/white')]classes = [...

2020-03-05 18:10:33 738 2

原创 宠物分辨使用resnet-34迁移学习

#在执行代码时自动载入需要的模块%reload_ext autoreload%autoreload 2%matplotlib inline # 将matplotlib的图表直接嵌入到Notebookfrom fastai.vision import * # 导入包from fastai.metrics import error_rate # 导入评价指标path = untar_...

2020-03-04 20:48:27 741 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除