Thanks for the reply and clear explanation.
I just got this error again
" [ValueError: pic should be 2/3 dimensional. Got 4 dimensions]".
I believe i am missing a small trick to convert image shape to the right format.  Any idea?