Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample number setting #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion kegra/train.py
Expand Up @@ -17,10 +17,13 @@
SYM_NORM = True # symmetric (True) vs. left-only (False) normalization
NB_EPOCH = 200
PATIENCE = 10 # early stopping patience
TRAIN_NUM = 200 # munbers of train samples
VAL_NUM = 300 # munbers of validation samples
TEST_NUM = 1000 # munbers of test samples

# Get data
X, A, y = load_data(dataset=DATASET)
y_train, y_val, y_test, idx_train, idx_val, idx_test, train_mask = get_splits(y)
y_train, y_val, y_test, idx_train, idx_val, idx_test, train_mask = get_splits(y, TRAIN_NUM, VAL_NUM, TEST_NUM))

# Normalize X
X /= X.sum(1).reshape(-1, 1)
Expand Down