fastmachinelearning / hls4ml-tutorial

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

incoherent tensorflow version #5

Open SerenaC94 opened 3 years ago

SerenaC94 commented 3 years ago

Hi,

in environment.yaml Tensorflow version 2.3.1 is required. However when I run the notebooks on jupiter hub this happens:

print(tf.__version__)
2.1.0

This is the cause of a weird problem I am seeing when I run the code locally on my machine, i.e. a different number of training samples with respect to what is used on jupiter hub.

thesps commented 3 years ago

Thanks for pointing this out. With which Tensorflow version do you see the small number of training samples?

SerenaC94 commented 3 years ago

2.3.1

At this point I am not sure it's really a smaller number of samples (the accuracy in the end is almost identical), maybe there's just a change in what is printed out? This is my output:

Epoch 1/30 1/487 [..............................] - ETA: 0s - loss: 1.6388 - accuracy: 0.3027

and this is the corresponding output in the notebook:

Epoch 1/30 493568/498000 [============================>.] - ETA: 0s - loss: 1.3310 - accuracy: 0.5150

SerenaC94 commented 3 years ago

Digging around a bit more I can confirm that the number of training samples is the same, but TF 2.1 prints the number of samples while TF 2.3 prints the number of batches. The functionality remains the same, however I think it would be better to align the env file with what is used on jupiter hub.

thesps commented 3 years ago

Thanks for chasing it down!

I think it would be better to align the env file with what is used on jupiter hub.

I agree, I will update the Hub image soon.