Spaces:
Runtime error
Runtime error
Update app.py
Browse files37 unmodified lines38394041424344454647484950515253545556575837 unmodified linesdef __init__(self, input_dim, output_dim):super().__init__()self.conv1 = nn.Conv1d(1, 16, kernel_size=3, padding=1)self.bn1 = nn.BatchNorm1d(16)self.conv2 = nn.Conv1d(16, 32, kernel_size=3, padding=1)self.bn2 = nn.BatchNorm1d(32)self.conv3 = nn.Conv1d(32, 64, kernel_size=3, padding=1)self.bn3 = nn.BatchNorm1d(64)self.pool = nn.AdaptiveAvgPool1d(1)self.fc = nn.Linear(64, output_dim)def forward(self, x):x = x.unsqueeze(1) # (batch, 1, 76)x = torch.relu(self.bn1(self.conv1(x)))x = torch.relu(self.bn2(self.conv2(x)))37 unmodified lines38394041424344454647484950515253545556575837 unmodified linesdef __init__(self, input_dim, output_dim):super().__init__()self.conv1 = nn.Conv1d(1, 32, kernel_size=7, padding=3)self.bn1 = nn.BatchNorm1d(32)self.conv2 = nn.Conv1d(32, 64, kernel_size=5, padding=2)self.bn2 = nn.BatchNorm1d(64)self.conv3 = nn.Conv1d(64, 128, kernel_size=3, padding=1)self.bn3 = nn.BatchNorm1d(128)self.pool = nn.AdaptiveAvgPool1d(1)self.fc = nn.Linear(128, output_dim)def forward(self, x):x = x.unsqueeze(1)x = torch.relu(self.bn1(self.conv1(x)))x = torch.relu(self.bn2(self.conv2(x)))
app.py+8-8