随笔分类 -  Python

摘要:TLDR: 更新v1 不要安装 pytorch 和 python,直接安装 fedml 即可 0. 排坑 fedml 中有一个包 MNN==1.1.6 只支持 Python 3.9/3.8/3.7/3.6/3.5,另一个包 mpi4py 只支持 Python 3.8/3.7/3.6 因此创建环境的整 阅读全文
posted @ 2022-06-14 22:42 林東雨 阅读(685) 评论(0) 推荐(0)
摘要:详见:https://zhuanlan.zhihu.com/p/59870808?ivk_sa=1024320u 官方文档:https://github.com/jupyterlab/jupyterlab 阅读全文
posted @ 2021-12-15 03:13 林東雨 阅读(155) 评论(0) 推荐(0)
摘要:安装 使用 阅读全文
posted @ 2021-11-11 16:20 林東雨 阅读(99) 评论(0) 推荐(0)
摘要:配置本地环境 1,file → open: 打开一个本地环境/文件夹 2,file → settings → Project:xxxx → Python Interpreter: 配置本地环境的解释器 3,Python Interpreter ⚙ → add: 添加解释器 4,Conda Envir 阅读全文
posted @ 2021-07-29 19:30 林東雨 阅读(878) 评论(0) 推荐(0)
摘要:简言之,torch.nn.Conv2d 的 weight 无法自定义,而需要手动设置 weight 时需要用到 torch.nn.function.conv2d。 参考资料:https://www.freesion.com/article/5206237781/ 阅读全文
posted @ 2021-07-21 19:33 林東雨 阅读(263) 评论(0) 推荐(0)
摘要:问题原因:Python装在D盘,系统没有分配虚拟内存 解决方法: 参考资料 https://www.cnblogs.com/20183544-wangzhengshuai/p/14814459.html 阅读全文
posted @ 2021-07-07 16:24 林東雨 阅读(7974) 评论(0) 推荐(2)
摘要:使用 pathlib 库一键搞定! from pathlib import Path 获取当前路径 cur_path = Path.cwd() 获取上层 or 上上层路径 cur_path.parent cur_path.parent.parent 获取子目录 or 拼接目录 file_path = 阅读全文
posted @ 2021-07-06 23:21 林東雨 阅读(982) 评论(0) 推荐(0)
摘要:这时我们只需找到对应python文件中的名称为pywin32_system32的文件将里面的内容全部复制到系统文件C:\Windows\System32中即可解决。 pywin32_system32在我的系统路径如下:D:\python\Anaconda3\envs\t1\Lib\site-pack 阅读全文
posted @ 2021-01-12 02:13 林東雨 阅读(6603) 评论(1) 推荐(0)
摘要:常见问题 urllib.error.HTTPError: HTTP Error 403: Forbidden 有些服务器会拒绝非浏览器查看内容,此时需要添加headers参数,将爬虫程序伪装成浏览器 Chrome版本信息 地址:chrome://version/ 1 # coding: utf-8 阅读全文
posted @ 2020-09-14 09:03 林東雨 阅读(399) 评论(0) 推荐(0)
摘要:1. Python3安装及环境配置 1. 访问Python官网:https://www.python.org/ 2. 下载Python安装包 3. 安装Python 4. 配置Python环境 5. 检查安装是否成功 【WIN+R】输入cmd调出命令提示符,输入python 2. IDE 开发环境搭 阅读全文
posted @ 2020-01-05 16:29 林東雨 阅读(477) 评论(0) 推荐(0)