随笔分类 - [32] Python
摘要:同一个wandb包,使用相同的conda虚拟环境,在pycharm中导入失败,在command窗口中导入成功。 同一个ssl包,使用相同的conda虚拟环境,在pycharm中导入失败,在command窗口中导入成功。 在 PyCharm 中,环境:bert_env , 执行 import wand
阅读全文
摘要:NotImplementedError: Cannot convert a symbolic Tensor (lstm/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Te
阅读全文
摘要:s= datetime.now().strftime(u"%Y年%m月%d日 %H:%M:%S" )UnicodeEncodeError: 'locale' codec can't encode character '\u5e74' in position 2: encoding error 可行方
阅读全文
摘要:在PyCharm中运行 wandb.login() wandb: ERROR api_key not configured (no-tty). call wandb.login(key=[your_api_key])Traceback (most recent call last): File "E
阅读全文
摘要:Traceback (most recent call last): File "E:/tion-AiLi-v2.py", line 37, in <module> from keras.callbacks import Callback File "E:\Eprogramfiles\Anacond
阅读全文
摘要:(base) C:\Users\Administrator>conda create -n bert_env python=3.7.12 Collecting package metadata (current_repodata.json): doneSolving environment: fai
阅读全文
摘要:解决方法: def conv_2(batch, channel=256): mydevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu') ### aimin li, added for x in batch: x.to
阅读全文
摘要:原因: 两个地方里面的包的版本不一致。 需要一个一个检查版本:比如python的版本,torch的版本。 out = F.conv2d(input=x, weight=weights, bias=b, stride=1, padding=1) # out: (1, unit_channel, l,
阅读全文
摘要:pip list 可以查到某个包,但是,import某个包,出现 ModuleNotFoundError: No module named (segmamba) [root@ibiomed ~]# pip list | grep gen gensim 4.3.3 (segmamba) [root@i
阅读全文
摘要:from wandb.keras import WandbCallback ModuleNotFoundError: No module named 'wandb.keras' Successfully installed annotated-types-0.7.0 eval-type-backpo
阅读全文
摘要:ERROR: Could not build wheels for ml-dtypes, optree, which is required to install pyproject.toml-based projects pip install ml-dtypes ml_dtypes-0.5.3.
阅读全文
摘要:Error An error occurred while retrieving installed packages. EnvironmentLocationNotFound: Not a conda environment: E:\Eprogramfiles\Anaconda3\envs\Ana
阅读全文
摘要:PyCharm log in via gitee 使用 Log in with token 可行。
阅读全文
摘要:pycharm 返回上一处位置/pycharm在ctrl+左键点击后返回原来位置(上次位置,最后位置) 快捷键 ctrl+alt+左方向键(←) 后退 ctrl+alt+右方向键(→) 前进 VS code (vscode) 怎么退回到上一个编辑位置 快捷键是后退 Alt + LeftArrow 前
阅读全文
摘要:python_五级_中国电子学会_2021年_真题_汉诺塔 汉诺塔是一道非常经典的题,12月5日悦儿姐在考python五级时又遇见它了,在这里给大家分享一下。题目:设计一个算法,汉诺塔(又称河内塔)问题是源于印度一个古老传说的益智玩具。大梵天创造世界的时候做了三根金刚石柱子,在一根柱子上从下往上按照
阅读全文
摘要:二分查找 a=[1,3,5,7,9] # 序列 k=3 # 目标 l=0 # 开头(注意,是索引号) r=4 # 结尾(注意,是索引号) while l+1!=r: # 是否只剩一个 mid=int((l+r)//2) # 中间(注意,是索引号) if a[mid]<k: # 小于目标 l=mid
阅读全文
摘要:Django Nginx+uwsgi 安装配置 使用 python manage.py runserver 来运行服务器。这只适用测试环境中使用。 正式发布的服务,我们需要一个可以稳定而持续的服务器,比如 apache, Nginx, lighttpd 等,本文将以 Nginx 为例。 你也可以直接
阅读全文
摘要:安装 git 准备好文件夹 E:\_prjct\boshi_xinxi_caiji\codes2 启动 git bash $ pwd/E/_prjct/boshi_xinxi_caiji/codes2 $ git clone https://gitee.com/xautstar/doctoral-d
阅读全文
摘要:https://pynative.com/python/quizzes/ https://pynative.com/python-exercises-with-solutions/ https://www.w3resource.com/python-exercises/ https://www.w3
阅读全文
摘要:pycharm 收起/折叠所有代码(Collapse All)的操作方法
阅读全文