added code until tf3.4 (not tested)
t3.5