Update app.py
Browse files
app.py
CHANGED
@@ -274,7 +274,7 @@ class LSTMAutoencoder(nn.Module):
|
|
274 |
return out
|
275 |
|
276 |
|
277 |
-
def lstm_anomaly_detection(X, feature_columns, raw_embedding_columns, epochs=100):
|
278 |
device = 'cuda'
|
279 |
X = torch.FloatTensor(X).to(device)
|
280 |
if X.dim() == 2:
|
@@ -319,8 +319,8 @@ def lstm_anomaly_detection(X, feature_columns, raw_embedding_columns, epochs=100
|
|
319 |
|
320 |
return mse_all, mse_comp, mse_raw
|
321 |
|
322 |
-
def embedding_anomaly_detection(embeddings, epochs=100):
|
323 |
-
device = '
|
324 |
X = torch.FloatTensor(embeddings).to(device)
|
325 |
if X.dim() == 2:
|
326 |
X = X.unsqueeze(0)
|
|
|
274 |
return out
|
275 |
|
276 |
|
277 |
+
def lstm_anomaly_detection(X, feature_columns, raw_embedding_columns, epochs=100, batch_size=64):
|
278 |
device = 'cuda'
|
279 |
X = torch.FloatTensor(X).to(device)
|
280 |
if X.dim() == 2:
|
|
|
319 |
|
320 |
return mse_all, mse_comp, mse_raw
|
321 |
|
322 |
+
def embedding_anomaly_detection(embeddings, epochs=100, batch_size=64):
|
323 |
+
device = 'cuda'
|
324 |
X = torch.FloatTensor(embeddings).to(device)
|
325 |
if X.dim() == 2:
|
326 |
X = X.unsqueeze(0)
|