MISC (TMP NOTES)

sucks @
caffe开发过程中使用了哪些工具? - 软件开发 - 知乎 @

作者:贾扬清

还是挺标准的 linux 开发流程:

  • 编辑器:vim(因为要远程在服务器上编辑)+ Sublime Text(本地编辑)
  • 编译:gcc + nvcc + Makefile
  • 调试:gdb + cuda-gdb (cuda-gdb 用得很少),valgrind
  • 调试 cuda 代码速度:nvvp
  • 代码管理:git + github

补充一些不是那么相关的:

  • 远程 ssh 自动重连:mosh
  • 命令行下多窗口:tmux
  • 偶尔需要用到的 vnc:TigerVNC server + Chicken (mac client)
  • 本地多种环境的集成测试:docker(当年没用到,后来开始用)
  • 服务器上的集成测试:Travis CI

主要用到的 dependency:

  • glog:打印调试信息,这个对于调错很有用。
  • gflags:命令行参数
  • gtest:测试框架
  • protobuf:数据的序列化
  • boost:一些类似 C++11 的 feature,因为早期 cuda 不支持 c++11
  • opencv:图像处理函数
  • leveldb,lmdb:简单的本地数据库。
  • cuda:这个就不用说了
  • atlas/mkl/eigen:线性代数计算库

downloads

CVPR 2016 有什么值得关注的亮点? - 深度学习(Deep Learning) - 知乎

nothing special.

对人工智能有着一定憧憬的计算机专业学生可以阅读什么材料或书籍真正开始入门人工智能的思路和研究? - 计算机科学 - 知乎

too good! too much!

fzliu/style-transfer: An implementation of “A Neural Algorithm of Artistic Style” by L. Gatys, A. Ecker, and M. Bethge. http://arxiv.org/abs/1508.06576.

李飞飞:如何教计算机理解图片_李飞飞:如何教计算机理解图片_网易公开课

简短地回答是: 这是因为微软十年如一日地烧钱养了一个叫微软研究院的机构,里面一帮科学家不用做产品没事干天天琢磨怎么把科幻变成现实。终于碰上个能放到产品里了,产品的硬实力立马把没有科研积累的苹果和谷歌甩了一大截(当然市场表现另论)。

除了我说的两种很厉害的学者之外,还有两种 vision 的研究者。第一种是“性能挂帅”:今天整个 HOG+SIFT,明天换个 boosting 的目标函数,后天再来个局部特征 + 整体特征;别人发现了 deep learning 管用了自己马上也摇身变成了 deep learning 的砖家,跟在别人后面用现有的技术把性能从 81% 做到 82% 就开始在社交网络上吹嘘自己实现了里程碑,超越了谷歌 MIT。这不是做研究,这是山寨。第二种是“数学挂帅”。遇到这种老板更要趁早退学或者转行,否则学术界工业界的工作都不好找。大家对号入座,看看自己和自己的导师是哪一种 :)

getSelection().toString(), or "*p

此外有人提到了 Feifei 对学生的态度。有个故事,到 Feifei 的主页上查学生去向,在一群硅谷 scientist,professor 中间有一个空白的,这个人去了街上,收入是其他人的和。

使用同样模式运营的 lab(青睐国内优秀本科毕业生,要求动手能力强,做大量实验)的华人 CV 大牛还有 UCLA 的朱松纯、NUS 的颜水城等。

print("Accuracy: {:.3f}".format(accuracy));

include/solver.prototxt @
net: "models/finetune_flickr_style/train_val.prototxt"
test_iter: 100
test_interval: 1000
# lr for fine-tuning should be lower than when starting from scratch
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
# stepsize should also be lower, as we're closer to being done
stepsize: 20000
display: 20
max_iter: 100000
momentum: 0.9
weight_decay: 0.0005
snapshot: 10000
snapshot_prefix: "models/finetune_flickr_style/finetune_flickr_style"
# uncomment the following to default to CPU mode solving
# solver_mode: CPU
models/finetune_flickr_style/train_val.prototxt @
name: "FlickrStyleCaffeNet"
layer {
  name: "data"
  type: "ImageData"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {
    mirror: true
    crop_size: 227
    mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
  }
  image_data_param {
    source: "data/flickr_style/train.txt"
    batch_size: 50
    new_height: 256
    new_width: 256
  }
}
layer {
  name: "data"
  type: "ImageData"
  top: "data"
  top: "label"
  include {
    phase: TEST
  }
  transform_param {
    mirror: false
    crop_size: 227
    mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
  }
  image_data_param {
    source: "data/flickr_style/test.txt"
    batch_size: 50
    new_height: 256
    new_width: 256
  }
}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 96
    kernel_size: 11
    stride: 4
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}
layer {
  name: "pool1"
  type: "Pooling"
  bottom: "conv1"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "norm1"
  type: "LRN"
  bottom: "pool1"
  top: "norm1"
  lrn_param {
    local_size: 5
    alpha: 0.0001
    beta: 0.75
  }
}
layer {
  name: "conv2"
  type: "Convolution"
  bottom: "norm1"
  top: "conv2"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 2
    kernel_size: 5
    group: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 1
    }
  }
}
layer {
  name: "relu2"
  type: "ReLU"
  bottom: "conv2"
  top: "conv2"
}
layer {
  name: "pool2"
  type: "Pooling"
  bottom: "conv2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "norm2"
  type: "LRN"
  bottom: "pool2"
  top: "norm2"
  lrn_param {
    local_size: 5
    alpha: 0.0001
    beta: 0.75
  }
}
layer {
  name: "conv3"
  type: "Convolution"
  bottom: "norm2"
  top: "conv3"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 384
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "relu3"
  type: "ReLU"
  bottom: "conv3"
  top: "conv3"
}
layer {
  name: "conv4"
  type: "Convolution"
  bottom: "conv3"
  top: "conv4"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 384
    pad: 1
    kernel_size: 3
    group: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 1
    }
  }
}
layer {
  name: "relu4"
  type: "ReLU"
  bottom: "conv4"
  top: "conv4"
}
layer {
  name: "conv5"
  type: "Convolution"
  bottom: "conv4"
  top: "conv5"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    group: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 1
    }
  }
}
layer {
  name: "relu5"
  type: "ReLU"
  bottom: "conv5"
  top: "conv5"
}
layer {
  name: "pool5"
  type: "Pooling"
  bottom: "conv5"
  top: "pool5"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "fc6"
  type: "InnerProduct"
  bottom: "pool5"
  top: "fc6"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 4096
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
      value: 1
    }
  }
}
layer {
  name: "relu6"
  type: "ReLU"
  bottom: "fc6"
  top: "fc6"
}
layer {
  name: "drop6"
  type: "Dropout"
  bottom: "fc6"
  top: "fc6"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc7"
  type: "InnerProduct"
  bottom: "fc6"
  top: "fc7"
  # Note that lr_mult can be set to 0 to disable any fine-tuning of this, and any other, layer
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 4096
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
      value: 1
    }
  }
}
layer {
  name: "relu7"
  type: "ReLU"
  bottom: "fc7"
  top: "fc7"
}
layer {
  name: "drop7"
  type: "Dropout"
  bottom: "fc7"
  top: "fc7"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc8_flickr"
  type: "InnerProduct"
  bottom: "fc7"
  top: "fc8_flickr"
  # lr_mult is set to higher than for other layers, because this layer is starting from random while the others are already trained
  param {
    lr_mult: 10
    decay_mult: 1
  }
  param {
    lr_mult: 20
    decay_mult: 0
  }
  inner_product_param {
    num_output: 20
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "fc8_flickr"
  bottom: "label"
  top: "accuracy"
  include {
    phase: TEST
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "fc8_flickr"
  bottom: "label"
  top: "loss"
}
rbgirshick (Ross Girshick) @

rbg


Song-Chun Zhu’s homepage

结束语: 选择专业方向和博士导师是改变你人生轨迹的抉择, 绝非游戏,望你慎重考虑, 谋定而动, 锲而不舍。 你最好认真浏览本实验室的活动、demo、科研项目,多读几篇论文, 问你自己是否愿意长期投身这个方向。“道不同,不相为谋”,如果你不确定、还没想好, 最好不要报, 更不要谎报。