73a339fac0a9574ee16527ebf9b6d71073bb688b,torchgeometry/conversions.py,,convert_points_to_homogeneous,#Any#,101
Before Change
if torch.is_tensor(points.shape[-1]):
last_dim_shape = points.shape[-1].float()
last_dim_bit_length = torch.floor(torch.log2(last_dim_shape)) + 1
last_dim_bit_length = last_dim_bit_length.long()
else:
last_dim_bit_length = points.shape[-1].bit_length()
// create shape for ones tensor: Nx(...)xD-1
// new_shape = points.shape[:-1] + (int(points.shape[-1]).bit_length() - 1,)
new_shape = points.shape[:-1] + (last_dim_bit_length - 1,)
After Change
raise ValueError("Input must be at least a 2D tensor. Got {}".format(
points.shape))
return nn.functional.pad(points, (0, 1) , "constant", 1.0)
def transform_points(dst_pose_src, points_src):
rFunction that applies transformations to a set of points.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: arraiy/torchgeometry
Commit Name: 73a339fac0a9574ee16527ebf9b6d71073bb688b
Time: 2019-01-14
Author: kaplanonu@gmail.com
File Name: torchgeometry/conversions.py
Class Name:
Method Name: convert_points_to_homogeneous
Project Name: baldassarreFe/deep-koalarization
Commit Name: 3a25edce742db97d936ffb645185b520878d0c6d
Time: 2017-05-06
Author: baldassarre.fe@gmail.com
File Name: dataset/resize.py
Class Name: ImagenetResizer
Method Name: resize_img
Project Name: NifTK/NiftyNet
Commit Name: c8b28432a637a780eed96547260722ff3dede57e
Time: 2017-10-04
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_selective.py
Class Name:
Method Name: rand_choice_coordinates