Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lacking examples #2

Open
RSKothari opened this issue Dec 6, 2022 · 0 comments
Open

Lacking examples #2

RSKothari opened this issue Dec 6, 2022 · 0 comments

Comments

@RSKothari
Copy link

RSKothari commented Dec 6, 2022

Hello,

Could you please provide examples comparing your interpolation implementation with, say, https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html

Examples such as

    H = 256
    W = 256
    
    num_x_pts = 10
    num_y_pts = 10
    
    interp_obj = interpolation_method(H, W, mode='bilinear')
       
    xx = torch.linspace(0, W, num_x_pts)
    yy = torch.linspace(0, H, num_y_pts)
    
    Y_grid, X_grid = torch.meshgrid(yy, xx, indexing='ij')
    
    X = X_grid.reshape(-1)
    Y = Y_grid.reshape(-1)
    Z = torch.rand(num_y_pts*num_x_pts, )
    
    out = interp_obj.forward(X, Y, Z)

Here, interpolation_method could be your implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant