- douda.py跑在CPU上正常,但是在GPU上跑,是报错的: douda_gpu_erro.txt
- 只要能描述清楚了(文学编程的最高境界),就能lispλ化=>只要特征能描述清楚了,就能hylisp可微分化
- Clojure和Java的互操作,迁移到Hylisp和Python的互操作:
test_hy.hy
编译生成pyctest_hy.pyc
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))
export PATH=/home/hylisp/anaconda3/bin:$PATH
### anaconda3 死活都用不了GPU ==>> Ubuntu自带的Python可以
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda
alias vv=' vi ~/.zshrc ; source ~/.zshrc '
## pip install --upgrade tensorflow-gpu
alias gd='git diff '
alias gs='git status '
## https://github.com/globus/globus-jupyter-notebooks
alias pyweb=' jupyter notebook --ip="*" --no-browser '
## .e.g: ➜ learn git:(master) ✗ jupyter notebook --ip="*" --no-browser
alias http=' python -m http.server 2222 '
alias e=' emacs -q -l ~/clojure_emacs/init.el '
alias gpu_t=' nvidia-smi -l '
##export CUDA_VISIBLE_DEVICES=0
alias gch=' git checkout '