
问题解决
j-o-l-i-n
半路出家机房扫地僧,沉迷火炉炼丹和修仙。精通徒手写bug,曾出版《如何一秒爆显存》。
展开
-
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 阅读 · 0 评论 -
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 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
如何用python一个字一个字的输出汉字
for z in zi.decode('utf-8'): print(z.encode('utf-8'))原创 2016-05-12 19:17:48 · 13641 阅读 · 2 评论 -
用nohup重定向python输出到文件不成功的解决办法
原因是:It looks like you need to flush stdout periodically (e.g. sys.stdout.flush()). In my testing Python doesn't automatically do this even with print until the program exits.You can run Python wit原创 2016-05-15 21:25:38 · 3601 阅读 · 0 评论 -
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 阅读 · 0 评论 -
在实验室服务器毫无阻拦的安装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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
成功在家用ssh远程连上了学校电脑虚拟机当中的ubuntu(代价是虚拟机全部黑屏只能用SSH连接了!)
首先打开虚拟机,安装openssh server,开启ssh服务用ifconfig查询虚拟机ip 比如192.168.159.133如图所示,虚拟网络编辑器-> VMnet8-> NAT设置-> 端口转发-> add -> IP:192.168.159.133,PORT:22原创 2016-05-01 22:30:34 · 1768 阅读 · 0 评论 -
ubuntu登陆死循环(全是搜狗拼音的锅!!!!!!!!!!!)
搜狗拼音不知道为啥安装失败,然后重启计算机在登陆界面怎么都登陆不了查了很多很多很多网页,现在3点20了,终于找到答案了!!!!!!!!!!!!!!!!!!!!1http://askubuntu.com/questions/705319/cannot-uninstall-fcitx-without-causing-a-login-loop0down v原创 2016-05-01 03:19:07 · 898 阅读 · 0 评论 -
github上传时出现error: src refspec master does not match any解决办法
原因引起该错误的原因是,目录中没有文件,空目录是不能提交上去的解决方法$ touch README.md$ git add README.md $ git remote add origin https://github.com/jolinxql/HexoTest.git$ git commit -m 'first commit'$ git push -u origin m原创 2016-05-01 01:30:56 · 1569 阅读 · 0 评论 -
How can I force Python's file.write() to use the same newline format in Windows as in Linux (“\r\n”
https://www.google.com/#q=write+lf+instead+of+crlf+python转载 2016-05-11 17:20:35 · 568 阅读 · 0 评论 -
安装boost
apt-get libboost-dev包不够用,就apt-get libboost-all-dev依赖崩了,就apt-get update然后install原创 2016-03-14 13:09:06 · 336 阅读 · 0 评论 -
ln: 创建符号链接 “include/asm”: 不支持的操作
http://blog.chinaunix.net/uid-24467128-id-2606182.html出错现象: 创建符号链接 “include/asm”: 不支持的操作出错原因:因为在linux中使用虚拟VMware共享工具访问了Windows的共享文件实际上为另一个分区;而单单"ln"命令,则建立一个硬链接,硬链接是不能跨分区,所以会产生错误。转载 2016-02-21 19:56:57 · 1934 阅读 · 0 评论 -
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 阅读 · 0 评论 -
换了一种管用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 · 11103 阅读 · 0 评论 -
在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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
配置jupyter notebook到conda env虚拟环境里可运行
python -m ipykernel install --user --name env_name原创 2018-06-19 23:04:44 · 1751 阅读 · 0 评论 -
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 · 487 阅读 · 0 评论 -
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 阅读 · 0 评论 -
神经网络中快速傅立叶变换(FFT)的梯度传递
最近需要在神经网络中构造复数酉矩阵做权重系数,使用了快速傅立叶变换和反变换.但是FFT不是theano的现成操作模块(有人写过对应的代码,所以应该会很快加进去了),所以想自己去写梯度传递来彻底搞清楚这件事.重新学一遍离散Fourier transform再加找梯度相关的文献学习,整整花了一周时间.从本科一毕业DFT就忘光了...在此总结了下,不得不说推倒的结果出来以后,真是出乎意料的漂原创 2017-09-05 21:24:42 · 6422 阅读 · 3 评论 -
解决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 阅读 · 2 评论 -
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 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 评论 -
解决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 阅读 · 0 评论 -
修复VMware 下Ubuntu启动不了问题
[摘要:因为某种缘由,如逼迫闭机,vmware下的ubuntu涌现启动没有了的状态。提醒以下疑息: Invalid argumentmount: mounting /sys on /root/sys failed:No such file or directorymount: mounting /dev on /root/dev failed: No such]由于某种原因,如强制关机转载 2016-02-18 17:21:40 · 22001 阅读 · 0 评论 -
dpkg:处理 xxx (--configure)时出错解决办法(转载)
今早安装torch zhiqian genghuan chengle 163 de mirrors yihou出现问题,找到该文,备份留用。然后在网上找到了这片文章,按步骤走就解决了,中间会提示自动卸载一下,执行那个命令就好了,我遇到的情况是在ubuntu上使用apt-get安装软件的时候出现如下错误:正在设置 nfs-common (1:1.2.2-4ubuntu5)转载 2016-02-16 19:47:05 · 5918 阅读 · 0 评论 -
NLP之路-实验nltk中的raw 和 words
原创 2014-10-02 17:41:09 · 1101 阅读 · 0 评论 -
在NPP运行Python报错:SyntaxError: Non-ASCII character '\xe5' in file的解决方法
SyntaxError: Non-ASCII character '\xe5' in file原创 2014-09-30 11:10:33 · 874 阅读 · 0 评论 -
解决开ServiceHost时候System.PlatformNotSupportedException: Operation is not supported on this platform.
方法一:以管理员身份运行VS。开启。方法二:添加配置文件方法原创 2014-10-23 14:53:15 · 11482 阅读 · 0 评论 -
Startup Script for Python(x,y)
碰巧在C:\Users\你的用户名\.ipython\profile_pysh\startup\文件夹下找到了README,里面写得很清楚,只要在此文件夹下放若干个.py文件,则会在ipython启动前执行这些文件(按照字母表顺序执行,如果有多个.py文件的话)。所以你就可以在这里各种import XXX as XX了。原创 2014-09-28 11:14:30 · 870 阅读 · 0 评论 -
Ruby On Rails --环境搭建之回眸一笑
http://blog.youkuaiyun.com/fan_hai_ping/article/details/67072481. Ruby on Rails开发环境1.1. Windows下安装在Windows上开始安装Ruby,最容易的方法是利用RubyInstaller安装包进行安装。确保从http://files.rubyforge.vm.bytemark.co.uk/r转载 2014-09-24 18:17:00 · 711 阅读 · 0 评论 -
安装dll
win8.1安装缺失的dll,需要将dll文件复制到c:/windows/system32/以及c:/windows/SysWOW64/各一份,然后再到命令行中执行regsvr32 xxxxxx.dll.原创 2014-06-01 12:58:12 · 496 阅读 · 0 评论 -
VC6.0打开或者添加工程文件崩溃的解决方法
http://blog.163.com/wjatnx@yeah/blog/static/12758622820138110530322/原创 2014-06-01 12:58:39 · 963 阅读 · 0 评论 -
readline/readline.h: No such file or directory
sudo aptitude install libreadline-dev原创 2014-06-01 12:59:32 · 1719 阅读 · 0 评论