- 博客(191)
- 资源 (2)
- 收藏
- 关注

原创 Why I can't reproduce my results
1. Pytorch's CPU's and GPU's seeds are independent. So set/save/load them independentlyhttps://discuss.pytorch.org/t/are-gpu-and-cpu-random-seeds-independent/1422. If you use randomness on several...
2019-02-16 13:51:49
227
原创 恢复item2和oh-my-zsh的配置
2. 加载onedrive里的传家宝iterm2_default_profile.json,让iterm2的配置生效。3. 安装agnoster主题相关的字体。6. 改.zshrc让plugins生效。2. 然后正常安装oh-my-zsh。4. 改.zshrc让主题生效。1. 首先正常安装item2。5. 添加plugin。
2023-05-06 17:13:31
1381
1
原创 pytorch DistributedDataParallel提示未参与loss计算的变量错误
错误提示:RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing
2021-01-29 22:20:21
12846
2
原创 提交spark任务偶尔报错 org.apache.spark.SparkException: A master URL must be set in your configuration
错误信息可谓恶心至极,其中有几个关键词,在代码里压根没有,但是我的debug能力也专门针对恶心的 错误信息优化过,所以最终还是解决了。错误信息:20/11/24 22:32:00 INFO DAGScheduler: ResultStage 0 (take at Base64UserEmb.scala:57) failed in 16.761 s due to Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times,
2020-11-24 23:08:15
544
原创 NVIDIA/Apex安装时遇到 C++编译:unrecognized command line option ‘-std=c++14’ 错误解决
0、问题编译安装apex的时候,报错C++编译:unrecognized command line option ‘-std=c++14’,后面紧跟着ninja也没有编译成功。发现是编译器版本太老(gcc-4.8.5)外加没有设置CC环境变量。对于C++14:gcc5就可以完全支持,gcc4部分支持,gcc3及以下版本不支持。既然4.8.5不支持c++14,就重新编译了g++呗。1、解决的环境版本依赖原本的环境配置:操作系统环境是:tlinux2.2-64bit-4...
2020-10-31 18:22:23
2387
6
原创 AttributeError: 'DistributedDataParallel' object has no attribute 'blahblah'
Pytorch DDP would fail when using the parameters directly to calculate the loss.These are my scripts:# train.py:class Model(nn.Module): def __init__(self, params): ... self.xnli_proj = nn.Linear(dim, 3)...model = Model(params)output = model.x
2020-05-12 00:06:19
4129
1
原创 detectron2 demo cuda10.0 py3.6
conda create -n detectron python=3.6 pipconda activate detectronconda install pytorch torchvision cudatoolkit=10.0 ...
2020-03-14 19:24:45
852
原创 DataLoader, when num_worker >0, there is bug
Since PyTorch seems to adopt lazy way of initializing workers, this means that the actual file opening has to happen inside of thegetitemfunction of the Dataset wrapper.https://discuss.pytorch.org...
2020-01-14 12:04:01
260
原创 caffe compilation memo
Compile caffe from sourceNCCL (nvidia.com has been blocked ???? download local installer then apt update to install)# https://docs.nvidia.com/deeplearning/sdk/nccl-install-guide/index.html# download ...
2019-10-24 11:35:27
159
原创 在ubuntu里烧win10安装盘
How to Create a Bootable Windows 10 USB in Linuxhttps://itsfoss.com/bootable-windows-usb-linux/
2019-07-31 14:42:09
509
原创 python built-in cache (don't reinvent the wheel)
@functools.lru_cachedef func(): ...very useful for loading/rolling out huge image features.
2019-02-16 16:39:56
312
原创 最近ubuntu+gpu装机记录
Background: a new machine with 2 GeForce RTX 2080 Ti without OSSteps:ubuntu desktop + rufus + sandisk usb 制作系统安装盘(desktop相对server更方便安装,因为有界面)minimal installationinstall third-party softwar...
2018-12-20 08:12:56
471
原创 配置jupyter notebook到conda env虚拟环境里可运行
python -m ipykernel install --user --name env_name
2018-06-19 23:04:44
1751
原创 connect to ubuntu 16.04 from windows 10 using x11vnc
以前ubuntu上不但装过vnc,还配置成功过一次,但是登陆之后桌面会变成gnome一个奇奇怪怪的样子。所以这次重新搞。主要是通过x11vnc,使得远程访问能够完美还原unity桌面。最近升级18.04,全gnome了,于是follow: http://c-nergy.be/blog/?p=11187 搞定了。1. terminal:sudo apt-get install x11v...
2018-06-07 17:44:13
486
原创 神经网络中快速傅立叶变换(FFT)的梯度传递
最近需要在神经网络中构造复数酉矩阵做权重系数,使用了快速傅立叶变换和反变换.但是FFT不是theano的现成操作模块(有人写过对应的代码,所以应该会很快加进去了),所以想自己去写梯度传递来彻底搞清楚这件事.重新学一遍离散Fourier transform再加找梯度相关的文献学习,整整花了一周时间.从本科一毕业DFT就忘光了...在此总结了下,不得不说推倒的结果出来以后,真是出乎意料的漂
2017-09-05 21:24:42
6422
3
原创 Install Rouge and Pyrouge for python 2.7 (conda virtual env) on Linux 64
Install Rouge and PyrougeStep 1: Create a new conda virtual envconda create -n py27env python=2.7 pipsource activate py27env# use " source deactivate" to deactivate the env
2017-08-23 17:32:48
2599
原创 解决Pycharm里远程调试缺乏DISPLAY环境变量的TkAgg报错
错误: TclError: no display name and no $DISPLAY environment variable Backend TkAgg is interactive backend. Turning interactive mode on.解决: 随便一个靠前的代码里加入import matplotlibmatplotlib.use('Agg')
2017-08-21 00:46:40
9608
原创 windows上配置新的conda env+torch
conda create -n myenv scipy nb_conda -c peterjc123 torchpip install torchvision
2017-07-05 15:25:45
851
原创 ubuntu 备份
https://yq.aliyun.com/ziliao/110763备份前及恢复前,需要用root用户,所以要打开root密码(http://www.cnblogs.com/youxin/archive/2013/04/07/3006201.html),备份及恢复之后,需要把root登录密码关闭(https://askubuntu.com/questions/20450/disable-
2017-06-29 22:09:53
373
原创 stl的multiset和set和priority_queue区别
优先级队列只允许按照排序顺序访问一个元素 - 即,可以获得最高优先级的项目,而当删除该项目时,可以获得下一个最高优先级,依此类推。 优先级队列还允许重复元素,因此它更像是一个multiset而不是set .一个set允许以排序顺序进行完全访问,例如,可以在集合的中间某处找到两个元素,然后按照从一个到另一个的顺序遍历。
2016-12-12 10:10:21
2524
原创 flask+apache2+ubuntu
假设安装好了apache2 virtualenv。mkdir venvvirtualenv venvsource venv/bin/activatepip install flask/var/www/flask-prod/webtool.py:from flask import Flaskapp = Flask(__name__)@app.route("/")def hello():
2016-11-28 18:53:10
2844
原创 ubuntu+intellij IDEA+android环境配置
前半截完全按照这个:http://askubuntu.com/questions/318246/complete-installation-guide-for-android-sdk-adt-bundle-on-ubuntu之后注意遇到无法clean是因为程序都在挂载的盘上,所以用这个解决:http://stackoverflow.com/questions/32914499/error-ex
2016-11-28 14:40:47
875
原创 ubuntu上装texlive
先把基本的texlive装好之前提前就把微软字体复制到/usr/share/fonts下了。sudo apt-get install perl-tk(为了用tlmgr)记得如果用texlive 2015的tlmgr装包的话,一定要改repo:tlmgr option repository ftp://tug.org/historic/systems/texlive/
2016-11-12 21:46:32
1368
原创 重定向[推荐系统]
https://www.flashtalking.com/us/dynamic-ads/http://www.socialmediaexaminer.com/retarget-content-to-facebook-custom-audiences/http://www.criteo.com/https://www.zhihu.com/question/21737987http
2016-10-10 13:11:54
985
2
转载 svd相关
http://blog.youkuaiyun.com/wanglulu2014/article/details/21170111http://recsyswiki.com/wiki/SVDFeaturehttp://blog.youkuaiyun.com/huruzun/article/details/51055327
2016-10-10 13:07:35
377
原创 mac上解决中文乱码, arara实现LaTex多命令执行, LaTeXiT法文界面转英文
强迫症犯了花了一天解决了mac上的latex中文及周边问题。首先,处理mac上的中文乱码问题:将win上的转成无BOM的utf8+macintoch格式然后开头结尾和中间共三处加入条件编译语句。复制到mac上以后设置texshop默认打开编码为utf-8(cmd+Q关闭重开),用XeLaTex编译。搞定。(参考:http://liam0205.me/2014/11/02/latex-macte
2016-10-06 16:57:30
4760
1
原创 非root用户暴力法解决选择性使用两个cudnn
之前学弟安装了一个cuda, 放在默认的地方/usr/local/cuda-7.5/后来加入cuDNN的lib64和include也拷贝到了这里,但是他是su,我不是。但这个cuDNN版本是5103,我的theano需要5,不需要5.1,不然总是有warning。又折腾了一天。下面是我的方法:从/usr/local/cuda-7.5/拷贝所有除了lib64和include的文件夹到
2016-09-21 13:38:06
2305
转载 解决linux的screen中gpu无法在theano中正常启用的问题
http://stackoverflow.com/questions/36781461/how-to-use-theano-within-screen-sessionI use theano on a remote server that I first ssh into (I don't have root on that system). This works fine, howeve
2016-09-20 01:05:47
1411
原创 换了一种管用pip安装方法,还有管用的python版hdf5(包名为h5py)安装方法
pip:之前在stackoverflow上找到一个方法,下载了一个get-pip.py的脚本进行安装的,但是一旦pip install --upgrade pip,就会报错syntax error。这次也是stackoverflow上的方法,彻底解决了之前的问题。 下载https://pypi.python.org/packages/2.7/s/setuptools/setuptoo
2016-08-24 11:35:53
11102
转载 Python中函数的参数传递与可变长参数
http://www.cnblogs.com/xudong-bupt/p/3833933.html1.Python中也有像C++一样的默认缺省函数1 def foo(text,num=0):2 print text,num3 4 foo("asd") #asd 05 foo("def",100) #def 100定义有默认参数的函数时,这些默认值
2016-08-23 15:13:58
456
转载 How would a model change if we minimized absolute error instead of squared error? What about the oth
https://www.quora.com/How-would-a-model-change-if-we-minimized-absolute-error-instead-of-squared-error-What-about-the-other-way-aroundMinimizing the squared error (L2L2) over a set of numbers
2016-08-16 15:54:01
568
转载 XGBoost原理及在Python中使用XGBoost
译文转自:http://blog.youkuaiyun.com/zc02051126/article/details/46771793在Python中使用XGBoost下面将介绍XGBoost的Python模块,内容如下: * 编译及导入Python模块 * 数据接口 * 参数设置 * 训练模型l * 提前终止程序 * 预测A walk through pyth
2016-08-16 14:34:37
2789
转载 从item-base到svd再到rbm,多种Collaborative Filtering(协同过滤算法)从原理到实现
http://blog.youkuaiyun.com/dark_scope/article/details/17228643
2016-08-15 10:49:00
442
原创 在实验室服务器毫无阻拦的安装pip3
curl "https://bootstrap.pypa.io/3.2/get-pip.py" -o "get-pip.py"sudo python3 get-pip.py
2016-07-27 17:38:01
900
转载 theano中的index好怪异。。比如最大似然估计的损失计算部分。
# NLL is a symbolic variable ; to get the actual value of NLL, this symbolic # expression has to be compiled into a Theano function (see the Theano # tutorial for more details) NLL = -T.sum(T
2016-07-13 14:26:46
450
原创 pycharm远程调试报错cant ser remote tunneling
一开始就报错cant ser remote tunneling就把远程的etc/ssh/sshd_config里面的AllowTcpForwarding改成yes然后service sshd restart 还是不行!!!后来找到python console上面有好多好多错误,最后一行显示的是traitlets.traitlets.TraitError: No default va
2016-07-06 17:29:02
1288
转载 深度学习主机攒机小记
http://www.52nlp.cn/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E4%B8%BB%E6%9C%BA%E6%94%92%E6%9C%BA%E5%B0%8F%E8%AE%B0#rd?sukey=3997c0719f1515201eb94ed2673e1d2690f90d1de927d1b322c4bc483108686ac518bbf5dc34ee16
2016-07-05 11:52:52
1664
原创 给公司的电脑配置theano
anaconda安装的pythonpip install theano安装theano输入import theano遇到warning提示没有找到g++conda install mingw输入import theano遇到报错屏幕爆炸,其中提示Problem occurred during compilation with the command line below:D:\
2016-07-05 11:44:22
506
转载 sometimes my file just freezes in my vi |vim, what happened?
Ctrl-S is probably the culprit; it stops your screen output in most terminals. As Michael mentioned, you can restore your screen to normal by enteringCtrl-Q.Theoretically, setting stty -ixon shoul
2016-05-19 11:12:51
596
PRML模式识别和机器学习 中文版PDF
2017-11-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人