jeffheaton / t81_558_deep_learning

T81-558: Keras - Applications of Deep Neural Networks @Washington University in St. Louis
https://sites.wustl.edu/jeffheaton/t81-558/
Other
5.72k stars 3.03k forks source link

Error: NameError Traceback (most recent call last) #124

Closed naruto112 closed 3 years ago

naruto112 commented 3 years ago

Hi @jeffheaton how are you ?

I'm trying to run this training function and it generates this error after 60 minutes running. Can you help me ?

Captura de Tela 2021-09-29 às 18 53 17

jeffheaton commented 3 years ago

Which file/notebook in the repo are you reporting this issue on?

jeffheaton commented 3 years ago

The error means exactly what it says "hms_string" is not defined. Make sure that you executed all previous cells.

# Nicely formatted time string
def hms_string(sec_elapsed):
    h = int(sec_elapsed / (60 * 60))
    m = int((sec_elapsed % (60 * 60)) / 60)
    s = sec_elapsed % 60
    return f"{h}:{m:>02}:{s:>05.2f}"
naruto112 commented 3 years ago

O erro significa exatamente o que diz "hms_string" não está definido. Certifique-se de ter executado todas as células anteriores.

# Nicely formatted time string
def hms_string(sec_elapsed):
    h = int(sec_elapsed / (60 * 60))
    m = int((sec_elapsed % (60 * 60)) / 60)
    s = sec_elapsed % 60
    return f"{h}:{m:>02}:{s:>05.2f}"

Hi @jeffheaton

Thanks very much ... I hadn't seen this function... I'm running again