Mathematica中文论坛-非官方

标题: ubuntu install Deep Tensor Neural Networks [打印本页]

作者: meatball1982    时间: 2017-12-1 14:03
标题: ubuntu install Deep Tensor Neural Networks
本帖最后由 meatball1982 于 2017-12-1 14:42 编辑

看NC的一个文儿。觉得蛮好的(老板觉得蛮好的)
K.T. Schütt. F. Arbabzadah. S. Chmiela, K.-R. Müller, A. Tkatchenko.
Quantum-chemical insights from deep tensor neural networks.

Nature Communications 8. 13890 (2017)
doi: 10.1038/ncomms13890


重复他的工作。
具体干什么的,还得一点点的看。
把环境build起来先。因为作者把它的工作都给你了。剩下的,就是重新来一下。
具体的,在

https://github.com/atomistic-machine-learning/dtnn



要求:
Requirements:
你M,除了numpy(实际上我的是python2.7下的,在python3.4下的,我也是不满足),其它的都不满足。

整!!!!
花了我整整三天的时间,从一点点的安装,到重新安装,再安装,安装,安装。。。。。。
我操。


因为自己的机器有cuda7.5 和cuda-9.0
要求的是cuda8.0 ,
sudo ln -s /usr/local/cuda-9.0/lib64/libcublas.0.9.0 /usr/local/cuda-9.0/lib64/libcublas.0.8.0

没少用(特别是在import tensorflow as tf)的时候,它告诉你,少libcublas.0.8.0,你就在0.9.0那里放一个link。
我的机器是python2.7

安装pip3先。
sudo atp-get install pip3

告诉你要安装一个我也记不起来的
好像是 python3-pip之类的。这个得sudo

然后是
pip3 install ase
这个花的时间挺长,但会把numpy也给安装了。
GPU:
pip3 install tensorflow-gpu
注意,要是用GPU跑,就用这个。


CPU
pip3 install tensorflow-cpu

会安装一堆东西,和 tensorflow官网让你安装的差不多(这个先题是你的cuda,cudnn都安装完了)
然后
python3
进来后
import tensorflow as tf
tf.__version__
注意,是两个_
我的tf是1.4
我的python3是3.5

在跑例子的时候,work_train.py就是rain_dtnn_gdb9.py

CUDA_VISIBLE_DEVICES="0,1" python3 work_train.py ../dtnn/datasets/ ../out_res/

要在import dtnn前加
import sys
sys.path.append('/the path where u put you dtnn/dtnn-master/')
import dtnn

CUDA_VISIBLE_DEVICES是指定你用哪个GPU,实验室华丽的K80,我和DL一人一半。

而我的w530,16G内存,2G显存,是跑不起来的。

当看到在训练的时候,TM差点哭出来。
记录下来,有问题问meatball1982@163.com






dtnn-master (1).zip

19.46 KB, 下载次数: 0


作者: meatball1982    时间: 2019-7-13 14:02
如果不行,可以全程使用conda 进行安装 。
conda install cudatoolkit
conda install cudnn
(安装特定版本的toolkit)conda install cudatoolkit==10.0.0
conda install tensorflow-gpu
conda install -c conda-forge ase

conda真是好啊。






欢迎光临 Mathematica中文论坛-非官方 (http://ilovemathematica.com/) Powered by Discuz! X3.2