latent_3d_points代碼付現:Learning Representations and Generative Models For 3D Point Clouds

本文介绍了latent_3d_points项目的实践过程,包括从GitHub下载代码、配置Ubuntu 16.04环境、安装Python 2.7、CUDA 9和TensorFlow 1.12.0等依赖,以及制作makefile和下载数据集。然而,在运行和训练阶段遇到困难,目前缺乏明确的指导,期待社区的帮助。
摘要由CSDN通过智能技术生成

第一步:geihub下載代碼

latent_3d_points:https://github.com/optas/latent_3d_points

第二:安裝環境

Ubuntu 16.04
Python 2.7

cudnn 7

(latent_3d_points) l@l-THUNDEROBOT-PC:~/Desktop$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 0
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

cuda 9

(latent_3d_points) l@l-THUNDEROBOT-PC:~/Desktop$ cat /usr/local/cuda/version.txt
CUDA Version 9.0.176

tensorflow 1.12.0

(latent_3d_points) l@l-THUNDEROBOT-PC:~/Desktop$ pip install tensorflow_gpu==1.12.0
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tensorflow_gpu==1.12.0
  Downloading https://files.pythonhosted.org/packages/3d/21/63bf11a6bb4c1c85d52b259578bec20ef6f8894a13870f8f4f8b69635586/tensorflow_gpu-1.12.0-cp27-cp27mu-manylinux1_x86_64.whl (281.7MB)
     |████████████████████████████████| 281.7MB 257kB/s 
Requirement already satisfied: astor>=0.6.0 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (0.8.0)
Requirement already satisfied: enum34>=1.1.6 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.1.6)
Requirement already satisfied: protobuf>=3.6.1 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (3.9.2)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.1.0)
Requirement already satisfied: gast>=0.2.0 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (0.3.2)
Requirement already satisfied: six>=1.10.0 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.12.0)
Requirement already satisfied: wheel in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (0.33.6)
Requirement already satisfied: absl-py>=0.1.6 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (0.8.0)
Requirement already satisfied: backports.weakref>=1.0rc1 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.0.post1)
Requirement already satisfied: termcolor>=1.1.0 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.1.0)
Collecting tensorboard<1.13.0,>=1.12.0 (from tensorflow_gpu==1.12.0)
  Downloading https://files.pythonhosted.org/packages/51/ae/9840c4837c6f54034ac942b5344396e8c3d74686a9bd29beafdf633cc221/tensorboard-1.12.2-py2-none-any.whl (3.0MB)
     |████████████████████████████████| 3.1MB 2.1MB/s 
Requirement already satisfied: numpy>=1.13.3 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.16.5)
Requirement already satisfied: grpcio>=1.8.6 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.24.0)
Requirement already satisfied: mock>=2.0.0 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (3.0.5)
Requirement already satisfied: keras-applications>=1.0.6 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorflow_gpu==1.12.0) (1.0.8)
Requirement already satisfied: setuptools in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from protobuf>=3.6.1->tensorflow_gpu==1.12.0) (41.2.0)
Requirement already satisfied: werkzeug>=0.11.10 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow_gpu==1.12.0) (0.16.0)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow_gpu==1.12.0) (3.3.0)
Requirement already satisfied: markdown>=2.6.8 in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow_gpu==1.12.0) (3.1.1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow_gpu==1.12.0) (1.0.2)
Requirement already satisfied: h5py in /home/l/.virtualenvs/latent_3d_points/lib/python2.7/site-packages (from keras-applications>=1.0.6->tensorflow_gpu==1.12.0) (2.10.0)
Installing collected packages: tensorboard, tensorflow-gpu
  Found existing installation: tensorboard 1.13.1
    Uninstalling tensorboard-1.13.1:
      Successfully uninstalled tensorboard-1.13.1
Successfully installed tensorboard-1.12.2 tensorflow-gpu-1.12.0


(latent_3d_points) l@l-THUNDEROBOT-PC:~/Desktop$ python
Python 2.7.12 (default, Aug 22 2019, 16:36:40) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
tf.estimator package not installed.
tf.estimator package not installed.
>>> import tensorflow as tf
>>> tf.Variable(0)
<tf.Variable 'Variable:0' shape=() dtype=int32_ref>
>>> 
[4]+  Stopped                 python

第三部:按照官網給出進行 nake

cd latent_3d_points/external
with your editor modify the first three lines of the makefile to point to
your nvcc, cudalib and tensorflow library.
make

修改後:
nvcc = /usr/local/cuda-9.0/bin/nvcc
cudalib =  /usr/local/cuda-9.0/lib64
tensorflow = /home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include

運行

(latent_3d_points) l@l-THUNDEROBOT-PC:~/Documents/latent_3d_points-master/external/structural_losses$ make
make: Circular tf_approxmatch_g.cu <- tf_approxmatch_g.cu.o dependency dropped.
/usr/local/cuda-9.0/bin/nvcc -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o tf_approxmatch_g.cu.o tf_approxmatch_g.cu -I /home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2
g++ -std=c++11 tf_approxmatch.cpp tf_approxmatch_g.cu.o -o tf_approxmatch_so.so -shared -fPIC -I /home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include -lcudart -L /usr/local/cuda-9.0/lib64 -O2 -D_GLIBCXX_USE_CXX11_ABI=0
make: Circular tf_nndistance_g.cu <- tf_nndistance_g.cu.o dependency dropped.
/usr/local/cuda-9.0/bin/nvcc -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o tf_nndistance_g.cu.o tf_nndistance_g.cu -I /home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2
/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr __host__ function("real") from a __host__ __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr __host__ function("imag") from a __host__ __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr __host__ function("real") from a __host__ __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr __host__ function("imag") from a __host__ __device__ function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/l/.virtualenvs/latent_3d_points/local/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relax
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值