Adapters
English
code
medical
UANN / Models /vision_expert.py
dnnsdunca's picture
Create Models/vision_expert.py
efe6bf3 verified
raw
history blame contribute delete
482 Bytes
import torch
import torch.nn as nn
import torch.nn.functional as F
class VisionExpert(nn.Module):
def __init__(self):
super(VisionExpert, self).__init__()
self.conv1 = nn.Conv2d(3, 32, 3, 1)
self.conv2 = nn.Conv2d(32, 64, 3, 1)
self.fc1 = nn.Linear(64 * 6 * 6, 128)
def forward(self, x):
x = F.relu(self.conv1(x))
x = F.relu(self.conv2(x))
x = x.view(-1, 64 * 6 * 6)
x = F.relu(self.fc1(x))
return x