Skip to content

Commit

Permalink
train.py: Remove train model execution section from module
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Wawrzynski <[email protected]>
  • Loading branch information
adamwawrzynski committed Jun 7, 2019
1 parent 8546943 commit c48a4ac
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions modules/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,50 +265,3 @@ def predict_model(model,

result = ap.convert_number_to_phoneme(result, phonemes)
create_transcription(result, transcription_path, window_width=width, verbose=verbose)


if __name__ == "__main__":
import argparse

# initiate the parser
parser = argparse.ArgumentParser()

# add long and short argument
parser.add_argument("--dataset",
"-d",
help="path to dataset root directory",
dest="dataset",
required=True)
parser.add_argument("--alphabet",
"-a",
help="path to alphabet file",
dest="alphabet",
required=True)
parser.add_argument("--weights",
"-w",
help="path to weights file",
dest="weights",
required=True)
parser.add_argument("--epochs",
"-e",
help="number of epochs",
dest="epochs",
default=100,
type=int,
required=False)

# read arguments from the command line
args = parser.parse_args()

model, test_func = md.best_model(38)

train_model(name="clarin",
model=model,
model_weights_path=args.weights,
test_func=test_func,
epochs=args.epochs,
alphabet_path=args.alphabet,
dataset_path=args.dataset,
restore=False,
tensorboard=False,
verbose=True)

0 comments on commit c48a4ac

Please sign in to comment.