tsaddev commited on
Commit
bd41a2f
·
1 Parent(s): 17076f1

Update app/Hackathon_setup/exp_recognition_model.py

Browse files
app/Hackathon_setup/exp_recognition_model.py CHANGED
@@ -2,6 +2,11 @@ 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,12 +50,20 @@ class facExpRec(torch.nn.Module):
45
 
46
  def forward(self, x):
47
  x = self.conv1(x)
 
48
  x = self.conv2(x)
 
49
  x = self.conv3(x)
 
 
50
  x = x.view(-1, 512*3*3)
 
51
  x = self.fc1(x)
 
52
  x = self.fc2(x)
 
53
  x = self.fc3(x)
 
54
  return x
55
 
56
  # Sample Helper function
 
2
  import torchvision
3
  import torch.nn as nn
4
  from torchvision import transforms
5
+ from transformers.utils import logging
6
+
7
+ logging.set_verbosity_info()
8
+ logger = logging.get_logger("transformers")
9
+
10
  ## Add more imports if required
11
 
12
  ####################################################################################################################
 
50
 
51
  def forward(self, x):
52
  x = self.conv1(x)
53
+ logger.info(x.shape)
54
  x = self.conv2(x)
55
+ logger.info(x.shape)
56
  x = self.conv3(x)
57
+ logger.info(x.shape)
58
+ logger.info(x.shape)
59
  x = x.view(-1, 512*3*3)
60
+ logger.info(x.shape)
61
  x = self.fc1(x)
62
+ logger.info(x.shape)
63
  x = self.fc2(x)
64
+ logger.info(x.shape)
65
  x = self.fc3(x)
66
+ logger.info(x.shape)
67
  return x
68
 
69
  # Sample Helper function