Skip to content

Commit

Permalink
change save loc
Browse files Browse the repository at this point in the history
  • Loading branch information
euisuk-chung committed Dec 6, 2021
1 parent 415f852 commit 9930562
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data/
etc/
result/
save_model/
gen_data/
vae_gen_data/
gan_gen_data/
tensorboard/

### Notebook ###
Expand Down
3 changes: 1 addition & 2 deletions run_timegan.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
print('>>>> TRAINING COMPLETE!')
if args.is_generate:
gen_data=timegan_generator(model, args.num_generation, args)
np.save(os.getcwd()+"\\save_data\\",gen_data)

np.save(f'./gan_gen_data/gen_data',gen_data)



16 changes: 8 additions & 8 deletions run_vrae.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@

# save original data
train_org = pd.DataFrame(TRAIN_DF if args.undo == True else TRAIN_SCALED, columns= cols)
train_org.to_csv(f'./gen_data/train/original_{args.scale_type}_un_{args.undo}.csv')
print('>> SAVED TRAIN ORIGINAL Data!! (Loc: gen_data)')
train_org.to_csv(f'./vae_gen_data/train/original_{args.scale_type}_un_{args.undo}.csv')
print('>> SAVED TRAIN ORIGINAL Data!! (Loc: vae_gen_data)')

# save reconstructed data
train_gen = pd.DataFrame(train_recon, columns= cols)
train_gen.to_csv(f'./gen_data/train/VRAE_{args.scale_type}_un_{args.undo}_hidden_{args.hidden_layer_depth}_win_{args.sequence_length}_ep_{args.n_epochs}.csv')
print('>> SAVED TRAIN RECONSTRUCTED Data!! (Loc: gen_data)')
train_gen.to_csv(f'./vae_gen_data/train/VRAE_{args.scale_type}_un_{args.undo}_hidden_{args.hidden_layer_depth}_win_{args.sequence_length}_ep_{args.n_epochs}.csv')
print('>> SAVED TRAIN RECONSTRUCTED Data!! (Loc: vae_gen_data)')

# TEST dataset reconstruction
if args.is_generate_test:
Expand All @@ -132,13 +132,13 @@

# save original data
test_org = pd.DataFrame(TRAIN_DF if args.undo == True else TRAIN_SCALED, columns= cols)
test_org.to_csv(f'./gen_data/test/original_{args.scale_type}_un_{args.undo}.csv')
print('>> SAVED TEST ORIGINAL Data!! (Loc: gen_data)')
test_org.to_csv(f'./vae_gen_data/test/original_{args.scale_type}_un_{args.undo}.csv')
print('>> SAVED TEST ORIGINAL Data!! (Loc: vae_gen_data)')

# save reconstructed data
test_gen = pd.DataFrame(test_recon, columns= cols)
test_gen.to_csv(f'./gen_data/test/VRAE_{args.scale_type}_un_{args.undo}_hidden_{args.hidden_layer_depth}_win_{args.sequence_length}_ep_{args.n_epochs}.csv')
print('>> SAVED TEST RECONSTRUCTED Data!! (Loc: gen_data)')
test_gen.to_csv(f'./vae_gen_data/test/VRAE_{args.scale_type}_un_{args.undo}_hidden_{args.hidden_layer_depth}_win_{args.sequence_length}_ep_{args.n_epochs}.csv')
print('>> SAVED TEST RECONSTRUCTED Data!! (Loc: vae_gen_data)')

# IF Both TRAIN and TEST data reconstruction is conducted
if args.is_generate_train and args.is_generate_test:
Expand Down
22 changes: 22 additions & 0 deletions vrae_experiment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

BATCH_SIZE=8
EPOCH=10
LR=5e-5
ACCUMULATION_STEP=1

# N_ENC=6
# N_DEC=6

# run distilBART-6-3
python ./src/kobart/main.py\
--batch-size=${BATCH_SIZE}\
--lr=${LR}\
--epoch=${EPOCH}\
--gradient-accumulation-step=${ACCUMULATION_STEP}\
--amp\
--distributed
# --distill\
# --n_enc=${N_ENC}\
# --n_dec=${N_DEC}\

0 comments on commit 9930562

Please sign in to comment.