This commit is contained in:
ZarebaMichal 2022-05-21 19:48:03 +02:00
parent 7d0a91cdd6
commit 9cf3179317
2 changed files with 715 additions and 711 deletions

12
run.py
View File

@ -11,6 +11,7 @@ from tensorflow.keras.layers import Dense
train = pd.read_csv("train/in.tsv", header=None, sep="\t")
train_expected = pd.read_csv("train/expected.tsv", header=None, sep="\t")
dev_expected = pd.read_csv("dev-0/expected.tsv", header=None, sep="\t")
dev_0 = pd.read_csv("dev-0/in.tsv", header=None, sep="\t")
test_A = pd.read_csv("test-A/in.tsv", header=None, sep="\t")
@ -35,10 +36,11 @@ def preprocess_data(df_to_process, main_df=None):
return final_df
f_train = pd.concat([train, dev_0])
train_df = preprocess_data(train)
f_train = preprocess_data(f_train)
# dev_df = preprocess_data(dev_0, train_df)
test_A_df = preprocess_data(test_A, train_df)
y = train_expected[0]
test_A_df = preprocess_data(test_A, f_train)
y_expected = pd.concat([train_expected, dev_expected])
y = y_expected[0]
# Define model
# model = Sequential()
@ -69,7 +71,9 @@ model = tensorflow.keras.models.Sequential(
#model.summary() #Print model Summary
model.compile(loss= "mean_squared_error" , optimizer="adam", metrics=["mean_squared_error"])
model.fit(train_df, y, epochs=100)
f_train = np.asarray(f_train).astype(np.float32)
y = np.asarray(y).astype(np.float32)
model.fit(f_train, y, epochs=100)
# param_grid = {

File diff suppressed because it is too large Load Diff