with '#' will be ignored, and an empty message aborts the commit.
Minor changes, run autoencoder on ml node
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "adsbpy",
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
@@ -124,7 +124,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.13.9"
|
||||
"version": "3.11.13"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# %%
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from aiRNN import preprocessors
|
||||
|
||||
# %%
|
||||
df = pd.read_csv("../all_second_lines.csv", header=None, names=["icao", "r", "t", "timestamp", "lat", "lon", "alt", "ias"])
|
||||
_ = preprocessors.create_category_mappings(df)
|
||||
|
||||
# %%
|
||||
df = preprocessors.map_categories(df, _)
|
||||
|
||||
# %%
|
||||
X_a_1 = F.one_hot(torch.tensor(df["R_1_IDX"].values)).float()
|
||||
X_a_2 = F.one_hot(torch.tensor(df["R_2_IDX"].values)).float()
|
||||
X_t = F.one_hot(torch.tensor(df["T_IDX"].values)).float()
|
||||
|
||||
# %%
|
||||
print(X_a_1.shape, X_a_2.shape, X_t.shape)
|
||||
|
||||
# %%
|
||||
preprocessors.train_autoencoder(X_a_1=X_a_1, X_a_2=X_a_2, X_b=X_t, num_epochs=500, learning_rate=0.011)
|
||||
|
||||
# %%
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user