Sane words early s2
This commit is contained in:
parent
7deda60d20
commit
f6f923d988
6310
dev-0/out.tsv
6310
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
21998
dev-0/out_float.tsv
21998
dev-0/out_float.tsv
File diff suppressed because it is too large
Load Diff
19
solution2.py
19
solution2.py
@ -85,8 +85,8 @@ for i in range(80):
|
||||
#print(str(i), " ; ", cost)
|
||||
if (cost.item() < 40000):
|
||||
learning_rate = torch.tensor(0.00001, dtype=torch.float)
|
||||
#if (cost.item() < 1614):
|
||||
# learning_rate = torch.tensor(0.000001, dtype=torch.float)
|
||||
if (cost.item() < 1700):
|
||||
learning_rate = torch.tensor(0.000001, dtype=torch.float)
|
||||
with torch.no_grad():
|
||||
W1 = W1 - learning_rate * W1.grad
|
||||
b1 = b1 - learning_rate * b1.grad
|
||||
@ -96,8 +96,9 @@ for i in range(80):
|
||||
dev_y_test = model(dev_x)
|
||||
dev_y_test_f = dev_y_test.numpy()
|
||||
dev_y_test = np.where(dev_y_test_f > 0.5, 1, 0)
|
||||
print(dev_y_test)
|
||||
score = f1_score(dev_y_test, dev_y_pred)
|
||||
#print(dev_y_test)
|
||||
recall = recall_score(dev_y_test, dev_y_pred, average='micro')
|
||||
F1 = f1_score(dev_y_test, dev_y_pred)
|
||||
|
||||
|
||||
W1.requires_grad_(True)
|
||||
@ -105,15 +106,15 @@ for i in range(80):
|
||||
W2.requires_grad_(True)
|
||||
b2.requires_grad_(True)
|
||||
|
||||
if (score < 0.35):
|
||||
if ((F1 > 0.3) & (F1<0.7)):
|
||||
break
|
||||
|
||||
|
||||
|
||||
print(score)
|
||||
print(str(i), " ; ", cost)
|
||||
print(dev_y_test)
|
||||
print(F1, recall )
|
||||
print(str(i), " ; ", cost)
|
||||
|
||||
if ((F1 > 0.3) & (F1<0.7)):
|
||||
break
|
||||
|
||||
|
||||
|
||||
|
6478
test-A/out.tsv
6478
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
22026
test-A/out_float.tsv
22026
test-A/out_float.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user