Neo's Blog

“生活就是个缓慢受锤的过程”, 只是有的人像铁, 有的人像牛,有的人像铁牛...


  • Home

  • About

  • Archives

  • Categories

  • Tags

使用alias和scp简化文件传输

Posted on 2017-11-22 | Edited on 2018-12-03 | In 工具 / Tools
Symbols count in article: 587 | Reading time ≈ 1 mins.

近期经常需要使用 scp 命令在本地和服务器之间传输数据,每次总免不了打上一长串远程服务器路径,很是枯燥。所以就想到是否能通过bash的 alias新建一个自己的命令来特定的 scp 需求写入到 bashrc中,这样就可以每次之间敲入自己的命令,然后再将需要传到服务器的文件拖到terminal中轻松完成了。

本来是想通过如下形式实现,可是发现scp不能在 alias 命令中再从命令行直接接受参数

1
alias 2server='scp -r $1 neo@10.88.88.88:~/me'

于是曲线救国:在根目录下新建一个sh脚本文件,实现scp从命令行接收参数的功能,再将这个脚本设置为可执行文件,最后将这个脚本通过alias来添加到系统命令中。

Read more »

深度学习/CV 网站、博客和书籍 | Resource Collections

Posted on 2017-11-15 | Edited on 2018-12-18 | In 机器学习 / Machine Learning
Symbols count in article: 654 | Reading time ≈ 1 mins.

网站 / Websites

Deep Learning Monitor

会列出一些深度学习相关内容的趋势(Papers, articles, etc.s)

书籍 / Books

Deep Learning (An MIT Press book)

经典的深度学习“花书”,由Ian Goodfellow, Yoshua Bengio, Aaron Courville编写的深度学习书

”花书“线代章节的笔记和代码

博客 / Blogs

Christopher Olah (colah)

C.Olah是Google Brain的Research Scientist,博客主要包含神经网络的基础知识和RNN (LSTM)相关内容。文章写的详细又不冗余,配图也都非常精确形象,用作者自己的话评价“explain them well”

个人主页 / Homepage

Yuandong Tian

田渊栋的个人主页,是FAIR的Research **Scientist。近期跟踪RL和VQA相关工作。

Chelsea Finn

UCB的Phd,做机器学习和机器人(machine learning and its intersection with robotic perception and control)

Max Jaderberg

DeepMind的senior research scientist,PhD在VGG组,领域是DL和RL,有很多有趣有影响力的工作。

Wei Liu

SSD和GoogLeNet的作者,UNC的PhD

Mac版Atom使用Hydrogen插件

Posted on 2017-11-03 | Edited on 2017-11-02 | In 工具 / Tools
Symbols count in article: 413 | Reading time ≈ 1 mins.

介绍

Hydrogen是一款优秀的Atom插件,可以实现在Atom中交互式调试代码,详细介绍可以去项目主页查看。

在Mac版Atom中使用Hydrogen插件

Hydrogen使用的是其他Kernal进行调试,常用的是Jupyter,如何安装参考官方的安装指南。安装好后可以直接选中要运行的代码使用cmd+enter运行。

常见问题:

  • 正常情况下,在Atom中可以直接ctrl+,进入install安装插件,但是不排除个别情况需要翻墙。
  • Mac安装Jupyter的问题请见此文章
  • 运行时需要注意,如果只选中了最后的语句很可能报错(没有import相应的包),因为Hydrogen只是运行当前句,而不是运行整个文件。所以如果想要运行的某段代码用到了某个import的包则需要先运行对应的 import *语句
  • 报错“没有*kernel”。这是由于Jupyter没有在运行,需要先在终端中运行一下Jupyter notebook

Curriculum Learning

Posted on 2017-10-31 | In 机器学习 / Machine Learning
Symbols count in article: 5.1k | Reading time ≈ 5 mins.

Inspired by and repost from gist and quora

1. Curriculum Learning

Introduction

  • Curriculum Learning - When training machine learning models, start with easier subtasks and gradually increase the difficulty level of the tasks.
  • Motivation comes from the observation that humans and animals seem to learn better when trained with a curriculum like a strategy.
  • Link to the paper.
Read more »

Mac上使用pip安装jupyter

Posted on 2017-09-27 | Edited on 2017-11-02 | In 工具 / Tools
Symbols count in article: 486 | Reading time ≈ 1 mins.

在 EI captain 版本以及以上系统的 Mac 上使用pip安装 python 相关的包的时候, 由于sip机制(System Integrity Protection)的不允许命令行写入内容到系统目录, 因此一个比较”优雅”的解决方案就是针对当前用户安装包

Read more »

vim常用设置与命令

Posted on 2017-09-16 | Edited on 2017-10-18 | In 工具 / Tools
Symbols count in article: 776 | Reading time ≈ 1 mins.

设置

编辑当前用户的配置文件以配置vim:

1
vim ~/.vimrc

1、显示行号

在文件末端添加一新行,输入 set nu

2、语法高亮

在文件中找到 “syntax on 这一行,去掉前面的双引号”,双引号是注释的意思(vim安装后默认是自动开启语法高亮的)

3、自动缩进

在文件末尾添加一行,输入 set autoindent
在添加一行,输入 set cindent
其中 autoindent 是自动缩进; cindent是特别针对 C语言语法自动缩进

4、可以为操作的一行添加下划线(功能类似sublime用浅灰色显示当前编辑行)

set cursorline

6、设置鼠标

使用VI编辑文本时,如果想修文件中改离光标较远的位置,可以打开鼠标定位功能.

set mouse=a

7、设置tab的缩进量
设置TAB键缩进量的方法:set shiftwidth=4 代表Tab转换为4个空格

复制/粘贴

  1. 按v键进入可视化模式, 然后按h/j/k/l进行右/下/上/左移动来选中要复制的内容/上/左移动来选中要复制的内容
  2. 选中后按y键复制内容,或按d键剪切内容
  3. 按esc键退出可视化模式后按h/j/k/l进行右/下/上/左移动确定要粘贴内容的位置
  4. 再次按v键进入可视化模式,按p键粘贴

    Read more »

TensorFlow使用中的常见问题

Posted on 2017-09-08 | Edited on 2017-11-08 | In 框架 / Framework
Symbols count in article: 796 | Reading time ≈ 1 mins.

安装指定版本的TensorFlow

1
2
3
4
# 安装cpu版本
pip install tensorflow==1.2.1
# 给特定用户安装gpu版本
pip install tensorflow-gpu==1.2.1 --user

找不到模型文件 / 用于初始化的预训练文件

perhaps your file is in a different file format and you need to use a different restore operator?

解决方法类似这里, 即设置的目录不是checkpoint文件所在目录, 还需要把Checkpoint的前缀(prefix)作为目录名的一部分.

例如名为myModel.ckpt.data-00000-of-00001和其相关的index等checkpoint文件一起放在~/model/文件夹下, 则传入的TensorFlow的参数需要设置为~/model/myModel.ckpt, 而不是/model/

Read more »

Shell 笔记

Posted on 2017-09-08 | Edited on 2017-12-01 | In 系统 / System
Symbols count in article: 881 | Reading time ≈ 1 mins.

lsof命令

lsof: list open files, 即列出当前系统打开的文件

在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等,系统在后台都为该应用程序分配了一个文件描述符,无论这个文件的本质如何,该文件描述符为应用程序与基础操作系统之间的交互提供了通用接口

格式

1
lsof [参数][文件]

可以使用该命令查看你进程开打的文件,打开文件的进程,进程打开的端口(TCP、UDP).

Read more »

Atom备份/同步神器

Posted on 2017-09-06 | Edited on 2017-10-25 | In 工具 / Tools
Symbols count in article: 1.7k | Reading time ≈ 2 mins.

介绍

Sync-settings可以通过使用Gist建立一个atom的package的描述文件packages.json来在不同设备之间同步Atom的设置和插件.

Read more »

tensorflow中的函数

Posted on 2017-09-02 | Edited on 2017-09-06 | In 框架 / Framework
Symbols count in article: 279 | Reading time ≈ 1 mins.

tf.expand_dims

1
2
3
4
5
6
expand_dims(
input,
axis=None,
name=None,
dim=None
)
Read more »
<i class="fa fa-angle-left" aria-label="Previous page"></i>1…456<i class="fa fa-angle-right" aria-label="Next page"></i>
江前云后

江前云后

Interested in
Deep Learning & Computer Vision
56 posts
13 categories
23 tags
GitHub zhihu Weibo
© 2021 江前云后 | 48k | 43 mins.
Powered by Hexo v4.2.0
|
Theme – NexT.Pisces v7.0.1
|