- 博客(5)
- 收藏
- 关注
原创 中国地图json
地址 https://datav.aliyun.com/portal/school/atlas/area_selector。选择城市下载json。
2023-06-01 16:33:02
255
1
原创 RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB,错误记录
代码运行报这个错误:RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.93 GiB total capacity; 94.84 MiB already allocated; 21.00 MiB free; 108.00 MiB reserved in total by PyTorch)import torch, gcgc.collect()torch.cuda.empty_cache()加入以上代码解决
2021-07-01 11:12:02
1923
2
原创 爬虫连接丢失!!1
爬虫被断开,请求失败。今天爬取网站突然给我连断开,我楞了好一会,检查了请求头,ip,多线程,我还想是不是我请求太快了。。这是报错:<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fash...
2020-04-01 10:20:37
943
原创 Python关于cv2库的使用案例!
不多说别的,直接看代码:import cv2```pythonimport cv2class Change(): def __init__(self, head_img): self.head_img = head_img def make(self): head_img = self.head_img # 读取图案...
2019-09-26 15:27:45
1848
原创 怎样用代码写出99成法口诀!
第一次写博客多多见谅!都说乘法表许多面试的都会有这么个题目就自己写了写,既然学的是python,就用Python写出来,不足支出多多指点啊!-----------------------(1) i = 1 while i<=9: q = 1 while q<=i: print("%d*%d=%d"%(q,i,q*i),end = "\t") ...
2019-04-09 20:44:46
729
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人