Open lix19937 opened 1 year ago
import sys
print(sys.path)
export PYTHONPATH=""
echo $PYTHONPATH
import sys
import torch
print(sys.path)
print(torch.__version__)
print(torch.cuda.is_available())
print(torch.cuda.device_count())
print(torch.version.cuda)
a = torch.Tensor([1.])
print(a)
ca = a.cuda()
print(a, ca)
from torch.backends import cudnn
print(cudnn.is_acceptable(a.cuda()))
import torch.utils
import torch.utils.cpp_extension
print(torch.utils.cpp_extension.CUDA_HOME)
print(torch.cuda.get_arch_list())
print(torch.cuda.get_device_capability())
print(torch.cuda.get_device_name())
print(torch.cuda.get_device_properties(0))
print(torch.cuda.get_gencode_flags())
import spconv
print(spconv.__version__)
from spconv.utils import rbbox_intersection, rbbox_iou
import tensorflow as tf
import os
# os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
print('GPU>>>>>>', tf.test.is_gpu_available())
a = tf.constant(2.0)
b = tf.constant(4.0)
print(a + b)
print(tf.reduce_sum(tf.random.normal([1000, 1000])))
sess = tf.Session()
# [batch, in_height, in_width, in_channels]
input =tf.reshape( tf.constant([2,5,3,3,8,2,6,1,1,2,5,4,7,9,2,3,-1,3], tf.float32),[1,3,3,2])
# [filter_height, filter_width, in_channels, out_channels]
kernel = tf.reshape(tf.constant([3,1,-2,2,-1,-3,4,5], tf.float32),[2,2,2,1])
print(tf.Session().run(input))
print(tf.Session().run(kernel))
print(tf.Session().run(tf.nn.depthwise_conv2d(input,kernel,[1,1,1,1],"VALID")))
验证opencv 是否安装成功