上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 参考资料: https://pytorch.org/docs/stable/data.html 我们都知道,Pytorch加载数据的常规流程是先定义一个Dataset,然后使用DataLoader来成Batch地加载数据。当我们在Dataset中定义的__getitem__返回的数据是array或者 阅读全文
posted @ 2021-08-12 11:44 思念殇千寻 阅读(967) 评论(0) 推荐(0)
摘要: 参考资料: https://pytorch.org/docs/stable/generated/torch.meshgrid.html 在此记录下torch.meshgrid的用法,该函数常常用于生成二维的网格: >>> x = torch.tensor([1, 2, 3]) >>> y = tor 阅读全文
posted @ 2021-08-10 15:26 思念殇千寻 阅读(945) 评论(0) 推荐(0)
摘要: 参考资料: https://zhuanlan.zhihu.com/p/34395749 https://docs.python.org/zh-cn/3/library/argparse.html 说起Python的命令行参数,不得不提的就是argparse这个东东了。参考资料里已经将argparse 阅读全文
posted @ 2021-08-09 11:41 思念殇千寻 阅读(231) 评论(0) 推荐(0)
摘要: 参考资料: https://blog.csdn.net/HYESC/article/details/89763114 使用git管理项目的时候,经常发现项目里面多出来了奇怪的东西。有很多缓存文件或者大文件我们不想同步到云端仓库里,此时我们可以使用.gitignore文件方便地管理。python语言常 阅读全文
posted @ 2021-08-09 11:08 思念殇千寻 阅读(339) 评论(0) 推荐(0)
摘要: 参考资料: https://stackoverflow.com/questions/37534440/passing-command-line-arguments-to-argv-in-jupyter-ipython-notebook 这个问题一直困扰了我很久,众所周知jupyter noteboo 阅读全文
posted @ 2021-08-09 10:49 思念殇千寻 阅读(834) 评论(0) 推荐(0)
摘要: 参考资料: https://blog.csdn.net/superjunenaruto/article/details/111609404 conda和pip应该是python现在使用最广泛的包管理器了,其中又尤以conda的功能最为强大。很多时候我们配好了一个环境,此时我们想通过当前环境导出配置y 阅读全文
posted @ 2021-08-07 18:49 思念殇千寻 阅读(213) 评论(0) 推荐(0)
摘要: 使用matplotlib在jupyter中作图时,经常会发现展示的图片分辨率不高,此时我们可以通过一行命令提高展示图片的分辨率: %config InlineBackend.figure_format = 'retina' 效果对比如下: 使用前: 使用后: 在这张图片上效果不明显,但是当分辨率更高 阅读全文
posted @ 2021-08-02 14:14 思念殇千寻 阅读(639) 评论(0) 推荐(0)
摘要: 参考资料:之前借鉴过的代码 pandas是python中用于数据处理的一个很方便的包,一般我们希望在训练的时候将相关的训练数据记录在一个csv文件中,这样能方便我们监控实验进程,效果如下所示: 那么该如何完成这一需求?两种办法: 1. 新建链表保存数据,整个存入csv文件 import pandas 阅读全文
posted @ 2021-07-22 11:11 思念殇千寻 阅读(167) 评论(0) 推荐(0)
摘要: 参考资料:https://nocomplexity.com/documents/jupyterlab/tip-autoloadmodule.html 阅读全文
posted @ 2021-07-19 18:08 思念殇千寻 阅读(595) 评论(0) 推荐(0)
摘要: 参考资料:天瀚和加哥 EasyDict是Python里一个能够将字典用点引用的包。 使用方式也是非常简单,一张图就可以解释清楚。 阅读全文
posted @ 2021-07-16 10:45 思念殇千寻 阅读(146) 评论(0) 推荐(0)
摘要: 参考资料: https://jupyter-notebook.readthedocs.io/en/stable/config.html?highlight=terminado_settings 在docker里面搭建了一个jupyter lab,但是点开终端默认的是sh而不是常用的bash。 因此通 阅读全文
posted @ 2021-05-07 12:05 思念殇千寻 阅读(937) 评论(0) 推荐(0)
摘要: 参考资料:自己debug 首先,我报错的问题的文本是:RuntimeError: CUDA error: device-side assert triggered以及 Assertion `input_val >= zero && input_val <= one` failed 把这两个文本放在前 阅读全文
posted @ 2021-04-14 14:51 思念殇千寻 阅读(12651) 评论(0) 推荐(3)
摘要: 参考资料: https://www.jianshu.com/p/fcaec99e7e2a:下面叫他教程A 如果你在搜索引擎中搜索,“Jupyter notebook添加内核”。你可以搜索到很多篇文章,但是在细节方面,这些文章往往没有点到位。这就导致读者多走很多弯路:比如我。今天是我对Jupyter 阅读全文
posted @ 2021-04-13 14:44 思念殇千寻 阅读(3543) 评论(0) 推荐(0)
摘要: 参考资料: https://www.jianshu.com/p/279f432deb0e https://www.pconline.com.cn/win10/1113/11135714.html 这里涉及到两个host文件的位置,1. 真正的host文件 2. ssh登录时的known_hosts 阅读全文
posted @ 2021-04-11 21:39 思念殇千寻 阅读(836) 评论(0) 推荐(0)
摘要: 参考资料: https://unix.stackexchange.com/questions/101916/copy-only-regular-files-from-one-directory-to-another 作为一个经常进行机器学习训练的人,你可能会想给你的训练代码的每一次run都重新创建一 阅读全文
posted @ 2021-03-28 14:55 思念殇千寻 阅读(1237) 评论(0) 推荐(0)
摘要: 参考资料: https://blog.csdn.net/qq_22210253/article/details/85229988 阅读全文
posted @ 2021-03-25 16:33 思念殇千寻 阅读(187) 评论(0) 推荐(0)
摘要: 参考资料: https://zhuanlan.zhihu.com/p/166161217 本人最常使用到显卡和CUDA的东西莫过于Pytorch了。这篇文章着重说明两个问题:1. 如何import torch并使之输出比较完备的CUDA信息 2. 在服务器上有多张卡的环境下,如何使任务在特定的卡或特 阅读全文
posted @ 2021-03-01 13:29 思念殇千寻 阅读(1262) 评论(0) 推荐(0)
摘要: 参考资料: https://blog.csdn.net/qq_33547243/article/details/107433616 https://www.cnblogs.com/shoufu/p/12904832.html https://github.com/NVIDIA/nvidia-dock 阅读全文
posted @ 2021-02-24 22:42 思念殇千寻 阅读(39726) 评论(4) 推荐(4)
摘要: 参考资料: https://blog.csdn.net/nima1994/article/details/82844988 参考资料已经把问题的解决方案阐述的很详细了,在这里记录一下精简的过程: from tensorboard.backend.event_processing import eve 阅读全文
posted @ 2021-01-01 23:10 思念殇千寻 阅读(2050) 评论(0) 推荐(0)
摘要: 参考资料: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-threshold 当你找到这个博客的时候,说明你遇到了和我一样的尴尬 阅读全文
posted @ 2021-01-01 15:09 思念殇千寻 阅读(25799) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页