class CNN(nn.Module):
  def __init__(self):
    super(CNN, self).__init__()
    self.relu = nn.ReLU()
    self.maxpool = nn.MaxPool2d(kernel_size = 2, stride = 2)
    self.conv1 = nn.Conv2d(3,32,3,stride = 1, padding = 1)
    self.conv2 = nn.Conv2d(32,64,3,stride = 1, padding = 1)
    self.conv3 = nn.Conv2d(64,128,3,stride = 1, padding = 1)
    self.conv4 = nn.Conv2d(128,256,3,stride = 1, padding = 1)

    self.dropout = nn.Dropout(p = 0.5)
    self.fc1 = nn.Linear(14*14*256, 4096)
    self.fc2 = nn.Linear(4096,1024)
    self.fc3 = nn.Linear(1024, 10)
    
  def forward(self, x):
    x = self.maxpool(self.relu(self.conv1(x)))
    x = self.maxpool(self.relu(self.conv2(x)))
    x = self.maxpool(self.relu(self.conv3(x)))
    x = self.maxpool(self.relu(self.conv4(x)))

    x = x.view(-1, 14*14*256)
    x = self.dropout(self.relu(self.fc1(x)))
    x = self.dropout(self.relu(self.fc2(x)))
    x = self.fc3(x)

    return x

model = CNN().to(device)

criterion = nn.CrossEntropyLoss()

optimizer = torch.optim.Adam(model.parameters(), lr = learning_rate)

############## TENSORBOARD ########################
writer.add_graph(model, example_data.to(device))
writer.close()
{}
tensorboard region:us
TAGS
#tensorboard #region-us 

class CNN(nn.Module):
  def __init__(self):
    super(CNN, self).__init__()
    URL = nn.ReLU()
    self.maxpool = nn.MaxPool2d(kernel_size = 2, stride = 2)
    self.conv1 = nn.Conv2d(3,32,3,stride = 1, padding = 1)
    self.conv2 = nn.Conv2d(32,64,3,stride = 1, padding = 1)
    self.conv3 = nn.Conv2d(64,128,3,stride = 1, padding = 1)
    self.conv4 = nn.Conv2d(128,256,3,stride = 1, padding = 1)

    self.dropout = nn.Dropout(p = 0.5)
    self.fc1 = nn.Linear(14*14*256, 4096)
    self.fc2 = nn.Linear(4096,1024)
    self.fc3 = nn.Linear(1024, 10)
    
  def forward(self, x):
    x = self.maxpool(URL(self.conv1(x)))
    x = self.maxpool(URL(self.conv2(x)))
    x = self.maxpool(URL(self.conv3(x)))
    x = self.maxpool(URL(self.conv4(x)))

    x = x.view(-1, 14*14*256)
    x = self.dropout(URL(self.fc1(x)))
    x = self.dropout(URL(self.fc2(x)))
    x = self.fc3(x)

    return x

model = CNN().to(device)

criterion = nn.CrossEntropyLoss()

optimizer = URL.Adam(model.parameters(), lr = learning_rate)

############## TENSORBOARD ########################
writer.add_graph(model, example_data.to(device))
URL()
###### TENSORBOARD ########################
writer.add_graph(model, example_data.to(device))
URL()
TAGS
#tensorboard #region-us 
 ###### TENSORBOARD ########################
writer.add_graph(model, example_data.to(device))
URL()
TAGS
#tensorboard #region-us 
###### TENSORBOARD ########################
writer.add_graph(model, example_data.to(device))
URL()