Ivan

个人博客

[Github] Github ssh配置

流程 本地生成rsa key: ssh-keygen -t rsa -C "xxx@xxx.com" -t 密钥类型 默认rsa-C 注释文字-f 文件存储名 Github Settings添加ssh key,复制本地~/.ssh/id_ras.pub 测试:ssh -T git@github.com 绑定远程库并上传:git remote add origin git@github.com:xxx/xxx.git...git push -u origin master

[机器学习] 信息量、熵、交叉熵、KL散度,互信息

信息量I(x)=−logp(x) I(x) = - \log p(x)I(x)=−logp(x) 事件发生概率越低,信息量越大 熵H(X)=−∑p(x)logp(x) H(X)=-\sum p(x) \log p(x)H(X)=−∑p(x)logp(x) 熵是在结果出来之前对可能产生的信息量求期望-考虑该随机变量的所有可能取值描述随机变量不确定程度,熵越大,信息量越大 交叉熵H(p∣q)=−∑p(x)logq(x) H(p|q)=-\sum p(x) \log q(x)H(p∣q)=−∑p(x)logq(x) p为gt,q为预测分布 KL散度(相对熵)DKL(p∣∣q)=∑p(x)logp(x)q(x) D_{KL}(p||q)= \sum p(x) \log \frac {p(x)}{q(x)} D​KL​​(p∣∣q)=∑p(x)log​q(x)​​p(x)​​ Kl散......

[MySQL] MySQL备份与还原

备份单数据库mysqldump -u root -p dbname table1 table2 > backup.sql tabel1 table2 缺省则为备份整个数据库 多数据库mysqldump -u root -p --databases dbname1 dbname2 > backup.sql全部数据库mysqldump -u root -p -all-databases > backup.sql还原mysql -u root -p dbname < backup.sql 当出现ERROR at line : Unknown command ‘\’’错误,是由字符集编码导致的,加上–default-character-set=utf8参数: mysql -u root -p --default-character-set=utf8 dbname < backup.sql

[JavaScript] Editor.md 图片复制粘贴拖拽js插件

IntroductionEditor.md富文本编辑器没有自带复制粘贴图片的功能,自己手写了个,支持复制粘贴、拖拽的方式插入编辑器中;并自动上传图片至博客后台的图床,省去了手动上传的麻烦。代码如下: function initPasteDragImg(Editor){ var doc = document.getElementById(Editor.id) doc.addEventListener('paste', function (event) { var items = (event.clipboardData || window.clipboardData).items; var file = null; if (items && items.length) { // 搜索剪切板items ......

[C++] OpenGL Demo

opengl, glut

opengl-icgThis repo is an opengl demo of Intelligent Computer Graphics course.This scene contains five objects and corresponding operations, including scaling, rotating, and moving.项目地址:https://github.com/ivanwhaf/opengl-icg Usage run OpenGLDemo.exe directlysee readme.txt for more operation details
C++

[机器学习] 自动驾驶AI小车

基于遗传算法优化神经网络

genetic-carSelf-learning car using genetic algorithm项目完整地址:genetic-car UsagePlease run manual version, do not run auto version, it has not been implemented! 1. Run program$ python genetic_car_manual.py 2. Select elites manuallyAfter each round, just click the blue cars who have Best performance, and their colors wouldturn to red, then press Space key to enter next loop 3. Repeat until cars can fin......

[深度学习] Yolov1-pytorch

yolov1-pytorchThis repo is a pytorch implementation of yolov1.项目完整链接:yolov1-pytorch Deep Learning based yolov1 object detector, using Pytorch deep learning frameworkThis project can be also transplanted to other edge platforms like Raspberry PiPaper: https://arxiv.org/pdf/1506.02640.pdf DemoRun in command linedetect.py runs inference on a variety of sources, cd your project path and type: $ pytho......

[软件安装] MySQL配置踩坑

重置密码vim /etc/my.cnf 加上一条: --skip-grant-tables保存并退出 mysql -u -p 直接敲回车不用密码直接进入 use mysqlupdate user set authentication_string=password('root') where user='root'; 修改root默认密码 外网访问1.配置防火墙,3306端口2.给mysql用户授权外网访问权限mysql -u root -pselect user,host from user;update user set host='%' where user='root'grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;flush privileges;

[软件安装] Centos7安装python3

下载Python3wget https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tar.xz 解压tar -xvJf Python-3.7.8.tar.xz 创建编译安装目录mkdir /usr/local/python3 编译安装cd Python-3.7.8 ./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl make && make install 修改软链接ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3

[机器学习] NLNL: Negative Learning for Noisy Labels论文解读

0x01 Introduction 最近在做数据筛选方面的项目,看了些噪声方面的论文,今天就讲讲之前看到的一篇发表于ICCV2019上的关于Noisy Labels的论文《NLNL: Negative Learning for Noisy Labels》 论文地址:https://arxiv.org/pdf/1908.07387.pdf 这篇论文的核心思想是NL(Negative Learning)也就是利用complementary label(互补标签)对模型进行训练从而提升噪声鲁棒性 0x02 Negative Learning 对于一个图像分类任务,传统的学习策略PL(Positive Learning)利用图像正确的标签:”input image belongs to this label”。但在噪声情况下,PL会提供错误的信息,随着训练的进行会逐渐拟合噪声标签从而降低模型性能。......