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

Adds OUTPUT_PADDING to ConvTrans2D #890

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Jan 26, 2024

  1. Configuration menu
    Copy the full SHA
    5c532ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb91f13 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Merge pull request #1 from rainiwu/remove-ftz

    Remove ftz
    swfsql committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    24a8593 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. avoid conv1d bound for cudnn

    swfsql committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    4e3f7c7 View commit details
    Browse the repository at this point in the history
  2. bump gemm

    swfsql committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    a8bc54c View commit details
    Browse the repository at this point in the history
  3. clippy fix

    swfsql committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    557687c View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Merge pull request #2 from swfsql/avoid-ci-errors

    Avoid ci errors
    swfsql committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    1175903 View commit details
    Browse the repository at this point in the history
  2. Adds OUTPUT_PADDING to ConvTrans2D

    - Draft state.
    - Unsure if correct, but a very simple and quick test gives the same
      result from pytorch.
    - Note: Tensorflow result differs, both from dfdx and from pytorch.
    
    Reference pytorch test:
    ```python
    import torch
    
    x = np.array([[[[0.1, 0.7], [0.3, 0.4]]]])
    w = np.array([[[[-0.1, -0.3, 0.7], [0.8, -0.2, 0.1], [0.3, 0.4, -0.5]]]])
    
    a = torch.nn.ConvTranspose2d(output_padding=0, in_channels=1, out_channels=1, kernel_size=3, stride=2, padding=1, bias = False)
    b = torch.nn.ConvTranspose2d(output_padding=1, in_channels=1, out_channels=1, kernel_size=3, stride=2, padding=1, bias = False)
    
    x = torch.from_numpy(x).float()
    w0 = torch.from_numpy(w).float()
    
    with torch.no_grad():
        a.weight = torch.nn.Parameter(w0)
        b.weight = torch.nn.Parameter(w0)
    
    ya = a(x)
    yb = b(x)
    
    print(ya.size()) # torch.Size([1, 1, 3, 3])
    print(yb.size()) # torch.Size([1, 1, 4, 4])
    
    print(ya)
    print(yb)
    ```
    swfsql committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    e81228c View commit details
    Browse the repository at this point in the history