Skip to content

Add UNet encoder and decoder blocks - #8

Merged
Enskc05 merged 1 commit into
mainfrom
ml/feature/unet
Jul 16, 2026
Merged

Enskc05 merged 1 commit into
mainfrom
ml/feature/unet

Conversation

@edatosun

Copy link
Copy Markdown
Collaborator
  • Implemented UNet model architecture
  • Added encoder and decoder blocks
  • Added forward pass

Copilot AI review requested due to automatic review settings July 16, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial PyTorch UNet implementation under services/ml/models/ to support image-to-image training/inference in the ML service package.

Changes:

  • Introduces a DoubleConv building block (Conv-BN-ReLU ×2).
  • Implements a 4-level UNet with encoder/decoder blocks, transposed-conv upsampling, and skip connections.
  • Adds a forward pass that produces a single-channel output tensor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +73 to +87
x = self.up1(x5)
x = torch.cat([x, x4], dim=1)
x = self.dec1(x)

x = self.up2(x)
x = torch.cat([x, x3], dim=1)
x = self.dec2(x)

x = self.up3(x)
x = torch.cat([x, x2], dim=1)
x = self.dec3(x)

x = self.up4(x)
x = torch.cat([x, x1], dim=1)
x = self.dec4(x)
@Enskc05
Enskc05 merged commit 8aca96b into main Jul 16, 2026
1 check passed
@Enskc05
Enskc05 deleted the ml/feature/unet branch July 16, 2026 13:54
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

Successfully merging this pull request may close these issues.

3 participants