Transpose Convolutions

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 14

  • @yahiaslimani867
    @yahiaslimani867 24 дня назад +1

    very clear thank you

  • @KianaMaillet
    @KianaMaillet Месяц назад

    very clear! thank you

  • @debabratagon7289
    @debabratagon7289 11 месяцев назад

    How is Transpose Convolutions performed in 2D images with multiple channels?

    • @ankitbhattacharya295
      @ankitbhattacharya295 10 месяцев назад +1

      I also have the same doubt...can anybody please elaborate

    • @nirmalbaishnab4910
      @nirmalbaishnab4910 9 месяцев назад +1

      consider the given example. say output channel is m and input channel is n. The filter size will be 3x3xm. now we just need to repeat the process described in the video on n input channels. number of parameters will be (3x3xm + 1) x n

  • @ittest4451
    @ittest4451 25 дней назад

    why the output is 4*4 ? please explain

  • @swamyyeturu7434
    @swamyyeturu7434 2 месяца назад

    Stride 1..?

  • @lidpage
    @lidpage 4 месяца назад +2

    “There’s a mistake, this result isn’t possible. Normally, we should get 3x3 as the output and not 4x4, so his method is at least questionable. It just goes to show that even the great Ng can be wrong.”

    • @GAZ___
      @GAZ___ 4 месяца назад

      What

    • @lidpage
      @lidpage 4 месяца назад

      @@GAZ___ "I had some doubt because the formula for calculating the output of a transposed convolution is as follows:
      𝑂=(𝐼−1)×𝑠 + 𝐾 −2𝑝 = (2-1)*2 + 3 -2*1= 3
      "I thought it wasn’t possible, so I did the calculation with PyTorch and got the same result. The output is a (3,3) ."
      import torch
      from torch import nn
      Input = torch.tensor([[2.0, 1.0], [3.0, 2.0]])
      Kernel = torch.tensor([[1.0, 2.0,1.0], [2.0, 0.0,1.0],[0.0,2.0,1.0]])
      Input = Input.reshape(1, 1, 2, 2)
      Kernel = Kernel.reshape(1, 1, 3, 3)
      Transpose convolution Layer
      Transpose = nn.ConvTranspose2d(in_channels =1,
      out_channels =1,
      kernel_size=3,
      stride = 2,
      padding=1,
      bias=False)

      # Initialize Kernel
      Transpose.weight.data = Kernel
      # Output value
      Transpose(Input)
      tensor([[[[ 0., 4., 0.],
      [10., 7., 6.],
      [ 0., 7., 0.]]]], grad_fn=)
      If I'm wrong, please correct me

    • @5pointpulse-75
      @5pointpulse-75 3 месяца назад

      You are right!

    • @myrthestruver5262
      @myrthestruver5262 3 месяца назад

      he isn't, also don't get why but my professor does it the same.. if anyone gets why lmk:)

    • @zohaib123451
      @zohaib123451 3 месяца назад

      The answer is 4x4 because of the kernel, and the parameters padding and stride. You can also get a 3x3 if you use a 2x2 kernel