Spaces:
Runtime error
Runtime error
Update app/Hackathon_setup/exp_recognition_model.py
Browse files
app/Hackathon_setup/exp_recognition_model.py
CHANGED
|
@@ -2,6 +2,9 @@ import torch
|
|
| 2 |
import torchvision
|
| 3 |
import torch.nn as nn
|
| 4 |
from torchvision import transforms
|
|
|
|
|
|
|
|
|
|
| 5 |
## Add more imports if required
|
| 6 |
|
| 7 |
####################################################################################################################
|
|
@@ -45,13 +48,14 @@ class facExpRec(torch.nn.Module):
|
|
| 45 |
|
| 46 |
|
| 47 |
def forward(self, x):
|
|
|
|
| 48 |
x = self.conv1(x)
|
| 49 |
x = self.conv2(x)
|
| 50 |
x = self.conv3(x)
|
| 51 |
x = self.conv4(x)
|
| 52 |
-
|
| 53 |
x = x.view(-1, 512)
|
| 54 |
-
|
| 55 |
x = self.fc1(x)
|
| 56 |
x = self.fc2(x)
|
| 57 |
x = self.fc3(x)
|
|
|
|
| 2 |
import torchvision
|
| 3 |
import torch.nn as nn
|
| 4 |
from torchvision import transforms
|
| 5 |
+
import transformers
|
| 6 |
+
|
| 7 |
+
transformers.logging.set_verbosity_info()
|
| 8 |
## Add more imports if required
|
| 9 |
|
| 10 |
####################################################################################################################
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
def forward(self, x):
|
| 51 |
+
logger.info(x.shape)
|
| 52 |
x = self.conv1(x)
|
| 53 |
x = self.conv2(x)
|
| 54 |
x = self.conv3(x)
|
| 55 |
x = self.conv4(x)
|
| 56 |
+
logger.info(x.shape)
|
| 57 |
x = x.view(-1, 512)
|
| 58 |
+
logger.info(x.shape)
|
| 59 |
x = self.fc1(x)
|
| 60 |
x = self.fc2(x)
|
| 61 |
x = self.fc3(x)
|