-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Thank you for this work.
The generalizing ability of neural networks based on convolution layers is much greater.
class Model(torch.nn.Module):
def __init__(self):
super(Model, self).__init__()
from efficientnet_pytorch import EfficientNet
self.model = EfficientNet.from_pretrained('efficientnet-b4')
self.model = EfficientNet.from_pretrained('efficientnet-b4')
self.model._fc = torch.nn.Linear(1792, 1024)
self.conv1D = torch.nn.Conv1d(1, 128, 3, padding='same')
def forward(self, x):
x = self.model(x)
x = torch.unsqueeze(x, 1)
x = self.conv1D(x)
# return (batch, seq, dim)
return x
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels