fastmachinelearning / hls4ml-tutorial

Tutorial notebooks for hls4ml
http://fastmachinelearning.org/hls4ml-tutorial/
285 stars 123 forks source link

ImportError: cannot import name 'all_callbacks' #25

Closed Pythagoras21 closed 2 years ago

Pythagoras21 commented 2 years ago

Hi! i was going through with the hls4ml tutorial found here: https://github.com/fastmachinelearning/hls4ml-tutorial/blob/master/part1_getting_started.ipynb

upon doing : from callbacks import all_callbacks i got `--------------------------------------------------------------------------- ImportError Traceback (most recent call last)

in 3 from tensorflow.keras.optimizers import Adam 4 from tensorflow.keras.regularizers import l1 ----> 5 from callbacks import all_callbacks ImportError: cannot import name 'all_callbacks'` Please help me solve this issue
jmduarte commented 2 years ago

Hi @Pythagoras21,

This imports the function from here: https://github.com/fastmachinelearning/hls4ml-tutorial/blob/eb0ee0c116fa707f632680f29916d296c159892d/callbacks.py#L66

If it doesn't work, it may be that you are not in the same directory or this directory is not in your PYTHONPATH.