Skip to content

Caution in Training Steps  #18

@Andrew-Ma-2001

Description

@Andrew-Ma-2001

I notice that in the training steps given in the file Train Model-All Words.ipynb in line 12 training dataset part

# create the datasets for training
batch_size = 32

train_dataset = Dataset.from_tensor_slices(
    (X_train, Y_train)
).repeat(
    count=-1
).shuffle(
    len(X_train)
).batch(
    batch_size
)

validation_dataset = Dataset.from_tensor_slices((X_validate, Y_validate)).batch(X_validate.shape[0]//10)

test_dataset = Dataset.from_tensor_slices((X_test, Y_test)).batch(len(X_test))

We can see that for train_dataset it have an option of Dataset.repeat(count=-1) which repeats the dataset infiniely while in training. I want to mention that for those who use custom audio dataset and apply the author code should take full consideration of using this option. For dataset that are umbalanced it may cause training hard to converge or over-fitting model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions