随笔分类 - python
摘要:a = f'da' f'da' 报错 a = (f'da' f'da') 没问题 不用f时候也是这样
阅读全文
摘要:a = [1,2,3,4,5,6] x = 0 a[x] = 1 a[a[x]] = 2 a[x], a[a[x]] = a[a[x]], a[x] # 实质执行了 xxx = a[a[x]], a[x] ; a[x], a[a[x]] = xxx print(a) # [2, 2, 1, 4, 5
阅读全文
摘要:做 leetcode 1774时候遇到的一个bug class Solution: def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int: ans = min(baseCost
阅读全文
摘要:res = ListNode(1) res.next = ListNode(2) # res 1->2 方式1 打印 1 2 , 这里是为什么? res1 = res.next res1 = None 方式2 打印 1 res.next = None while res: print(res.val
阅读全文
摘要:###参考 http://www.elecfans.com/d/779631.html https://blog.csdn.net/ashome123/article/details/117110042 import torch from torch import einsum a = torch.
阅读全文
摘要:转自https://www.cnblogs.com/qinchao0317/p/10699717.html 目录 %用法 format用法 %用法 1、整数的输出 %o —— oct 八进制%d —— dec 十进制%x —— hex 十六进制 1 >>> print('%o' % 20) 2 24
阅读全文
摘要:转自https://blog.csdn.net/edogawachia/article/details/80515038
阅读全文
摘要:###转载于https://blog.csdn.net/qq_31347869/article/details/104794515 画了这么久的图,脑子里还是乱的,每次想实现个效果都能查到不同的实现方法,什么 plt.plot 啦,ax.plot 啦,看起来好像都能达到目的?特别是到了精调绘图细节,
阅读全文
摘要:
阅读全文
摘要:https://blog.csdn.net/ftimes/article/details/107216346 怎么会有等号不写成等号的人呢哈哈哈哈
阅读全文
摘要:Pytorch详解BCELoss和BCEWithLogitsLoss torch.ge 函数 torch.clamp函数 Pytorch 中 nn.Linear 函数解读(包含维度) 各种优化算法(ps:梯度下降的解释去看矩阵微积分那篇文章) pytorch中RNN参数的详细解释 RNN 详解PyT
阅读全文
摘要:python二维图像输出操作大全(非常全) 分别使用plot()和scatter()画散点图,以及如何改变点的大小
阅读全文
摘要:https://blog.csdn.net/weixin_42128329/article/details/100005642 在Pycharm的Setting里安装的第三方库仅仅只针对于本项目有效(新装的库也就存在这个项目的Lib目录下)。如果每次做项目用的库差别不大,想要高效复用之前本地已经装好
阅读全文
