本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。
安装开发所需要的一些基本包
sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| // tokenize(str) | |
| // extracts semantically useful tokens from a string containing English-language sentences | |
| // @param {String} the string to tokenize | |
| // @returns {Array} contains extracted tokens | |
| function tokenize(str) { | |
| var punct='\\['+ '\\!'+ '\\"'+ '\\#'+ '\\$'+ // since javascript does not | |
| '\\%'+ '\\&'+ '\\\''+ '\\('+ '\\)'+ // support POSIX character | |
| '\\*'+ '\\+'+ '\\,'+ '\\\\'+ '\\-'+ // classes, we'll need our |