Machine Learning, Sentiment Analysis, Vertex AI, Programming, Bert.
dtype=torch.long).to(DEVICE) return x, y # --- Model definition --- class SentimentBERT(nn.Module): def __init__(self, bert_model): super().__init__() self.bert_module = bert_model self.dropout = nn.Dropout(0.1) self.final = nn.Linear(in_features=128, out_features=3, bias=True) def forward(self,