hls4ml-tutorial icon indicating copy to clipboard operation
hls4ml-tutorial copied to clipboard

incoherent tensorflow version

Open SerenaC94 opened this issue 4 years ago • 4 comments

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.

SerenaC94 avatar Nov 04 '20 16:11 SerenaC94

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

thesps avatar Nov 05 '20 11:11 thesps

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 avatar Nov 05 '20 11:11 SerenaC94

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.

SerenaC94 avatar Nov 05 '20 13:11 SerenaC94

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.

thesps avatar Nov 05 '20 14:11 thesps