The output of LSTM layer is output, (h_n, c_n) (see LSTM — PyTorch 1.10.1 documentation)
The hidden state of the last layer is usually utilized to do the binary classification.
To do so,
#define Model
class LSTMClassifier(nn.Module):
    def __init__(self, input_size, lstm1_hidden_size,num_layers, num_classes):
        super(LSTMClassifier, self).__init__()
        #shape = (1,8192,16)
        self.lstm1 = nn.LSTM(input_size=input_size, hidden_size=lstm1_hidden_size, num_layers=num_layers, batch_first=True)
        self.classifier = nn.Linear(lstm1_hidden_size, num_classes)
        self.sigmoid = nn.Sigmoid()

    def forward(self, x):
        last_h, _ = self.lstm1(x)[1] #hidden state is returned
        # (tensor of shape (D * num_layers, N, H_out))
        last_h = last_h.permute(1, 0, 2).flatten(start_dim=1)
        pred = self.classifier(last_h)
        pred = self.sigmoid(pred)
        return pred

The above is an example code to help your understand.