#NoPayJan Offer - Access all CloudxLab Courses for free between 1st to 31st Jan

  Enroll Now >>

Training the Autoencoder

Let us fit the autoencoder model to the train data.

  • Import time module.

    import  << your code comes here >>
  • Use start = time.time() to record the start time of training execution.

    start = time.time()
  • Use fit on stacked_ae to train on X_train, X_train for 20 epochs and validation_data=(X_valid, X_valid).

    history = stacked_ae.<< your code comes here >>(X_train, X_train, epochs=20,
                     validation_data=(X_valid, X_valid))
  • Use end = time.time() to record the end time of training execution.

    end = time.time()
  • Print the time of execution:

    print("Time of execution:", round(end-start,2),"seconds")

No hints are availble for this assesment

Answer is not availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...