<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4" -->

---
title: Mini PyTorch from Scratch — Module 6 (part 2) | daily.dev
description: Introduces the 2d upsampling operation using nearest neighbor interpolation, an alternative to transposed convolution to avoid checkerboard artifacts. The post...
canonical: https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Mini PyTorch from Scratch — Module 6 (part 2) | daily.dev
og:description: Introduces the 2d upsampling operation using nearest neighbor interpolation, an alternative to transposed convolution to avoid checkerboard artifacts. The post...
og:url: https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4
og:image: https://api.daily.dev/og/posts/JAOL6zsi4.png
og:image:alt: Mini PyTorch from Scratch — Module 6 (part 2)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Mini PyTorch from Scratch — Module 6 (part 2)

**[ITNEXT](https://daily.dev/sources/itnext)** · 2 min read · 17 upvotes · 0 comments

## Summary

Introduces the 2d upsampling operation using nearest neighbor interpolation, an alternative to transposed convolution to avoid checkerboard artifacts. The post details the implementation of the Upsample2d class, which includes methods for resizing with nearest neighbor interpolation. This lays the groundwork for building complex image generation networks like UNet and GANs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://itnext.io/mini-pytorch-from-scratch-module-6-part-2-4ec73440e528>

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#python](https://daily.dev/tags/python), [#deep-learning](https://daily.dev/tags/deep-learning), [#pytorch](https://daily.dev/tags/pytorch), [#image-processing](https://daily.dev/tags/image-processing)

[View this post on daily.dev](https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Mini PyTorch from Scratch — Module 6 (part 2)","url":"https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4"},"datePublished":"2024-08-05T10:20:13.814Z","dateModified":"2024-10-05T18:37:00.076Z","description":"Introduces the 2d upsampling operation using nearest neighbor interpolation, an alternative to transposed convolution to avoid checkerboard artifacts. The post...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8065b7fd344b5eb0f5e4fcaca7256432?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8065b7fd344b5eb0f5e4fcaca7256432?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"ITNEXT","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ITNEXT","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/itnext2","url":"https://daily.dev/sources/itnext"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mini-pytorch-from-scratch-module-6-part-2--jaol6zsi4","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":17},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,python,deep-learning,pytorch,image-processing","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ITNEXT","item":"https://daily.dev/sources/itnext"},{"@type":"ListItem","position":3,"name":"Mini PyTorch from Scratch — Module 6 (part 2)"}]}
```

