Skip to content

Instantly share code, notes, and snippets.

View itseffi's full-sized avatar
:octocat:
Juggling many things...please be patient!

Effi itseffi

:octocat:
Juggling many things...please be patient!
View GitHub Profile
@itseffi
itseffi / StyleTransferNet.py
Created January 4, 2024 15:34
Style Transfer Neural Network Implementation in PyTorch
import torch
class TransformerNet(torch.nn.Module):
def __init__(self):
super(TransformerNet, self).__init__()
# Initial convolution layers
self.conv1 = ConvLayer(3, 32, kernel_size=9, stride=1)
self.in1 = torch.nn.InstanceNorm2d(32, affine=True)
self.conv2 = ConvLayer(32, 64, kernel_size=3, stride=2)