xx
This commit is contained in:
parent
7d0a91cdd6
commit
9cf3179317
12
run.py
12
run.py
@ -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 = {
|
||||
|
1414
test-A/out.tsv
1414
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user