Skip to content

Commit

Permalink
update weight
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroBlackstone committed Oct 11, 2024
1 parent a23a66a commit e431315
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file removed model/model-0.91502.jld2
Binary file not shown.
Binary file added model/model-0.92091.jld2
Binary file not shown.
2 changes: 1 addition & 1 deletion src/data_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Predict left hand or right hand by output.
predict_y(y) = y > 0.5f0 ? 1 : 0

function generate_midi(input_file::String; output_file::String="",
weight_file=pkgdir(PianoHands,"model","model-0.91502.jld2"),HIDDEN_SIZE=14)
weight_file=pkgdir(PianoHands,"model","model-0.92091.jld2"),HIDDEN_SIZE=14)

midi_file = load(input_file)
hand_classify = inferance_midi(midi_file,weight_file,HIDDEN_SIZE)
Expand Down
2 changes: 1 addition & 1 deletion src/training.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ end
function train_piano(DATASET_PATH,
TESTSET_PATH;
BATCH_SIZE = 12,
SEQ_LENGTH = 75,
SEQ_LENGTH = 65,
HIDDEN_SIZE = 14,
LEARNING_RATE = 0.0005f0,
MAX_EPOCH = 200,
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ using Test,PianoHands,MIDI,Lux,Random,Printf,LuxCUDA,Optimisers,Zygote,JLD2
@testset "pig to feature" begin
# train_piano("../PianoFingeringDataset/dataset/",
# "../PianoFingeringDataset/testset/";
# SEQ_LENGTH=75,
# SEQ_LENGTH=65,
# BATCH_SIZE=12,
# LEARNING_RATE = 0.0005f0,
# HIDDEN_SIZE = 14,
# EVALUATE_PER_N_TRAIN = 50
# )

generate_midi("./ymsn_full.mid";weight_file="../model/model-0.91502.jld2")
generate_midi("./ymsn_full.mid";weight_file="../model/model-0.92091.jld2")
end

0 comments on commit e431315

Please sign in to comment.