官方文档依次建立,so easy 文档
cudn安装没有给定教程,推荐参考 作者写的很详细,遇到的问题和我一样,瞬间得到解决
由于个人gpu为Pascal架构,查了一下是比费米级和开普勒更高级的新的gpu,所以在运行测试案例时遇到问题:
Error: invalid device function launching kernel kScaleAndBias_kernel
经查证作者回复,是因为目前dsstne不支持Pascal架构的gpu。但是作者给出了关于此类gpu的解决办法。见
None of us have Pascal GPUs yet. But you can probably get this to work by
changing src/amzon/dsstne/Makefile.inc line 19 from:
CU_FLAGS = -use_fast_math –ptxas-options=”-v” -gencode
arch=compute_50,code=sm_50 -gencode arch=compute_30,code=sm_30
-DOMPI_SKIP_MPICXX -std=c++11
to
CU_FLAGS = -use_fast_math –ptxas-options=”-v” -gencode
arch=compute_60,code=sm_60 -gencode arch=compute_50,code=sm_50-gencode
arch=compute_50,code=sm_50 -gencode arch=compute_30,code=sm_30
-DOMPI_SKIP_MPICXX -std=c++11
然后重新编译在测试。
使用步骤:
不知道什么原因每次重新开机都需要重新编译,不然找不到那些命令
cd amazon-dsstne/src/amazon/dsstne
export PATH=/usr/local/openmpi/bin:/usr/local/cuda/bin:$PATH
make clean
make
export PATH=`pwd`/bin:$PATH
之后进入数据目录依次执行数据转换、训练、预测
train -c config.json -i gl_input.nc -o gl_output.nc -n gl.nc -b 256 -e 250
predict -b 256 -d gl -i features_input -o features_output -k 10 -n gl.nc -f user_content_int_0to1 -s recs -r user_content_int_0to1
如果是数据生成不变,只需要修改模型再训练,则删掉原来的gl.nc系列训练模型进行train.