conda设置清华源以及更换删除源|conda常用命令集锦
全文包括: 显示目前使用的源channel 增加channel 删除channel 其他命令 1 显示channel: 首先,conda config –show能够显示出所有conda的config信息。 [crayon-680f94c […]
[mcj]Conda安装后Jupyter Notebook如何更改默认工作目录
安装完anaconda之后,一般默认会安装Jupyter Notebook,一般在终端输入jupyter notebook即可打开。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
C:\Users\mcj>conda activate qoe (qoe) C:\Users\mcj>jupyter notebook [I 15:10:02.356 NotebookApp] Writing notebook server cookie secret to C:\Users\mcj\AppData\Roaming\jupyter\runtime\notebook_cookie_secret [I 15:10:04.688 NotebookApp] JupyterLab beta preview extension loaded from E:\ProgramData\Anaconda3\lib\site-packages\jupyterlab [I 15:10:04.688 NotebookApp] JupyterLab application directory is E:\ProgramData\Anaconda3\share\jupyter\lab [I 15:10:05.237 NotebookApp] Serving notebooks from local directory: C:\Users\mcj [I 15:10:05.237 NotebookApp] 0 active kernels [I 15:10:05.237 NotebookApp] The Jupyter Notebook is running at: [I 15:10:05.237 NotebookApp] https://localhost:8888/?token=94bb0ee83f45a13246d69c032f3c9999fcc89c49f54f0d85 [I 15:10:05.237 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 15:10:05.237 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: https://localhost:8888/?token=94bb0ee83f45a13246d69c032f3c9999fcc89c49f54f0d85&token=94bb0ee83f45a13246d69c032f3c9999fcc89c49f54f0d85 [I 15:10:05.646 NotebookApp] Accepting one-time-token-authenticated connection from ::1 |
这样打开的jupyter noteboo […]
[mcj]Conda如何分享环境给其他人|Conda迁移环境
有时候我们用conda配置好了环境之后,合作时为了防止版本问题,想让别人也用同样的环境进行测试,这时就可以把目前的环境分享给对方了,首先激活想要分享的环境
1 |
conda activate qoe |
然后生成yml文件 […]
[mcj]Windows下Pycharm2018.2.4安装及破解
Pycharm的安装很简单,只需要下载安装包,然后双击安装就行~~ 我这边习惯用2018.2.4版本,所以就安装了这个版本,大家也可以自行选择。 关于pycharm的破解,网上一般流传三个版本,分别是服务器激活、修改hosts激活以及破解文 […]
[mcj]北工大IPV6不能用|北京工业大学IPV6不能用了
根据PT网站的统计,已经好久都不能用了~~有知道的可以透露一下~ 最近国家在建设IPV6不是,为啥不能用了呢?难道是怕免费? 统计信息更新于: 2019 年 4月 10日, 周三, 11:31, 其时 ‘H3C___7510E& […]
[mcj]IDM重新安装chrome插件|IDM谷歌插件
一般来说,我们只需要重新安装IDM即可,下载地址为: https://www.internetdownloadmanager.com/download.html 但是,有时候我们并不想重新安装,这个时候,需要单独的安装插件~ 打开谷歌应用商 […]
[mcj]记录一下最近的收录情况
现在基本上bing秒收,Google当天收录,Baidu隔天收录,360目前只收录了首页,搜狗和神马还没有动静~ 几个网站的提交入口: bing:https://www.bing.com/webmaster/home/mysites?ord […]
[mcj]AttributeError: module ‘torch.nn.functional’ has no attribute ‘sigmod’
使用pytorch的时候,如果我们使用torch.nn.functional中的sigmoid和tanh函数的话
1 2 3 4 |
y_relu = F.relu(x).data.numpy y_sigmod = F.sigmod(x).data.numpy y_tanh = F.tanh(x).data.numpy y_softplus = F.softplus(x).data.numpy |
可能会报错: [crayon-680f94c3bba9d35 […]
[mcj]RuntimeError: Trying to backward through the graph a second time, but the buffers have….
pytorch 进行反向传播有时会报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
RuntimeError Traceback (most recent call last) <ipython-input-52-049eeb1d9b54> in <module> ----> 1 v_out.backward() 2 print(variable.grad) ~/.conda/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py in backward(self, gradient, retain_graph, create_graph) 100 products. Defaults to ``False``. 101 """ --> 102 torch.autograd.backward(self, gradient, retain_graph, create_graph) 103 104 def register_hook(self, hook): ~/.conda/envs/pytorch/lib/python3.6/site-packages/torch/autograd/__init__.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables) 88 Variable._execution_engine.run_backward( 89 tensors, grad_tensors, retain_graph, create_graph, ---> 90 allow_unreachable=True) # allow_unreachable flag 91 92 RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time. |
这是因为第一次反向传播之后,这个计算图的内存就会被释放掉,这样的话再次进行反向传播就不行了,解决方法就是添加retain_graph […]
[mcj]如何在ubuntu的Jupyter中使用对应的环境
在安装了anaconda之后,我新建了一个环境pytorch,然后我想在以后用jupyter notebook来操作这个pytorch虚拟环境,那么我该怎么做呢?有两个方法 方法1: 首先激活虚拟环境 [crayon-680f94c3bf7 […]