- 博客(16)
- 问答 (1)
- 收藏
- 关注
原创 torch.nn.functional.grid_sample() 函数实例
前言:以下仅为个人在学习过程中的记录和总结,有问题欢迎友善讨论。仅以4D input为例(对应二维图片)torch.nn.functional.grid_sample(input, grid,mode='bilinear', padding_mode='zeros', align_corners=None)Args:input (N,C,Hin,Win) (N,C,H_{in}, W_{in})(N,C,Hin,Win)N:batch sizeC:feature dimen.
2021-09-29 11:23:12
1109
原创 pytorch3d_installaion_ubuntu
pytorch3d_installationRequirmentsRequirmentscore libiraryLinux or macOS or WindowsPython 3.6, 3.7 or 3.8PyTorch 1.4, 1.5.0, 1.5.1, 1.6.0, 1.7.0, or 1.7.1.torchvision that matches the PyTorch installation. You can install them together as explained
2021-04-23 16:05:59
562
1
原创 代码学习_KPConv_models.blocks
代码学习_KPConv_models.blocksclass KPConv(nn.Module)二级目录三级目录class KPConv(nn.Module)初始化赋值创建kernel points: K_points_numpy # Initialize weights [n_kpoints, in_fdim, out_fdim] self.weights = Parameter(torch.zeros((self.K, in_channels, out_cha
2021-04-12 16:56:41
772
原创 代码学习_KPConv_kernels.kernel_points
代码学习_KPConv_kernels.kernel_pointsload_kernels()kernel_point_optimization_debug()load_kernels()kernel_point_optimization_debug() """ Creation of kernel point via optimization of potentials. Args: radius: Radius of the kernels, 1
2021-04-11 20:09:42
472
2
原创 记录_torch.utils.data.DataLoader
torch.utils.data.DataLoader作用:用来将数据包装为Dataset类,然后传入DataLoader中,再使用DataLoader这个类来更加快捷的对数据进行操作class DataLoader(object): r""" Data loader. Combines a dataset and a sampler, and provides single- or multi-process iterators over the dataset.
2021-04-11 14:45:59
99
原创 torch.nn.Conv1d & torch.nn.Conv2d
torch.nn.Conv1d Args: in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (int or tuple): Size of the convolving kernel stride (int or tupl
2021-04-04 17:09:31
140
原创 记录_List多索引
遇到问题:列表中的索引为一个列表记录代入具体值试验的结果example_1points = torch.rand((5, 4, 3))b_idx = torch.randint(4, (5, 2))idx = torch.randint(4, (5, 2))new = points[b_idx, idx, :]points: >>>tensor([[[5.9856e-01, 8.5678e-01, 9.8524e-01], [7.0864e-01.
2021-04-02 16:19:45
226
原创 记录_nn.functional.one_hot
记录_nn.functional.one_hot(x, num_classes)作用:将x的元素转化为0/1标签值Return.shape: (x.size, num_classes)num_classes 为目标类别数,需要>=实际类别数(输入x的元素值的类别)a = torch.randint(0, 24, (3, 4, 5)) >>>tensor([[[21, 2, 0, 5, 19], [10, 6, 10, 1, 5],
2021-03-26 14:12:25
1889
原创 记录_broadcast
记录_broadcastcodeseed = 0n_approx = 5num_cells = 4dimension = 3X = np.random.rand(n_approx, dimension)print(X, X.shape)kernel_points = np.random.rand(num_cells, dimension)print(kernel_points, kernel_points.shape)>>>[[0.26214758 0.051704
2021-03-23 21:41:04
71
原创 Ubuntu18.04_anaconda3_pytorch_pycharm(community)
Ubuntu18.04_anaconda3_pytorch_pycharm(community) 1. anaconda31.1 下载1.2 安装1.3 配置环境变量2. pytorch2.1 创建环境2.2官网下载3. Pycharm(community)3.1 下载3.2 安装3.3 创建桌面快捷方式4. 总结默认已完成NVIDIA驱动、CUDA、CuCNN的配置本文章为自己的操作记录,仅供参考1. anaconda31.1 下载登陆官网1.2 安装进入安装目录,启动安装程序
2021-03-11 20:46:06
219
原创 Ubuntu18.04_NVIDA驱动460_Cuda11.2_CuDNN8
Ubuntu18.04_NVIDA_Cuda_CuDNNNVIDA显卡驱动安装NVIDIA CudaCuDNNNVIDA显卡驱动在应用程序中找到 Software & Updates(软件和更新)选择一个驱动,推荐最近的版本(末尾数字更大),点击Apply changes(应用更改)重启电脑安装NVIDIA Cuda依次点击对应模块:出现如下信息:(截至2021/3/10)按照上述顺序出现错误,经尝试,我成功的方案如下:wget https://developer.do
2021-03-11 13:46:47
4334
4
原创 Ubuntu 18.04 新手教程_火狐浏览器flash插件安装
Ubuntu 18.04 新手教程_火狐浏览器flash插件安装1.Flash Player官网下载Flash Player官网地址选择:Linux(64-bit)选择:(.tar.gz)- NPAPI选择NPAPI的说明:2.解压与安装_命令行方式2.1 打开命令行: ctrl + alt + t2.2 切换到Downloads文件夹cd Downloads2.3 解压tar -zxvf flash_player_npapi_linux.x86_64.tar.gz
2021-03-10 13:52:06
589
原创 CATIA卸载不完全,导致右击新建中有残留——注册表处理方法
我通过计算机自带的“卸载程序”,卸载CATIA时,出现“找不到指定文件”的情况,又不想下载相关第三方软件,遂尝试本地删除。首先删除安装目录下的文件其次删除以下目录中的 Dassault SystemesC:\ProgramDataC:\Program FilesC:\Users\用户名\AppData\LocalC:\Users\用户名\AppData\Roaming最后删除 部分的 注册表(右击新建中的CATIA相关)进入注册表“开始”–>“运行”–>输入“reg
2021-03-07 19:13:21
7407
原创 grid cell generation_pytorch
网格生成过程步骤生成3×3网格grid_size = 3grid = np.arange(grid_size)a, b = np.meshgrid(grid, grid) a = [[0 1 2] [0 1 2] [0 1 2]] b = [[0 0 0] [1 1 1] [2 2 2]]x_offset,y_offsetx_offset = torch.FloatTensor(a).view(-1, 1) # -1表示自适应y_off
2021-02-21 20:46:28
113
原创 pytorch中张量的阶数理解
pytorch中张量的阶数理解推荐打开2个页面,对比原四阶张量理解各阶的对应关系。创建一个四阶张量:import torchx = torch.linspace(0,71,72).view(2,3,3,4)print(x)输出:tensor([[[[ 0., 1., 2., 3.], [ 4., 5., 6., 7.], [ 8., 9., 10., 11.]], [[12., 13.,
2021-02-20 21:46:09
1055
原创 张量的理解
4维张量的实例创建4维张量import torchx = torch.linspace(0,71,72).view(2,3,3,4)print(x)4维张量输出:tensor([[[[ 0., 1., 2., 3.], [ 4., 5., 6., 7.], [ 8., 9., 10., 11.]], [[12., 13., 14., 15.], [16., 17., 18.
2021-02-20 20:46:56
761
空空如也
pycharm中通过anaconda3安装sklearn包却无法导入?
2021-01-17
TA创建的收藏夹 TA关注的收藏夹
TA关注的人