NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3785 most downloaded on PyPI
TensorFlow is an open source machine learning framework for everyone.
Last release 12 days ago
22 Sep 2026
Release timing varies
gaps range from 8 days to 7 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
97 releases · first in 2019
<CAVEATS REGARDING THE RELEASE (BUT NOT BREAKING CHANGES).>
The TensorBoard dependency is no longer included by default. If you use tf.summary.* APIs or tf.keras.callbacks.TensorBoard, please install the tensorboard package separately (pip install tensorboard). Otherwise, TensorFlow will raise an ImportError.
In tensorflow/c/experimental/filesystem/filesystem_interface.h, removed TF_TransactionToken and associated APIs.
<CAVEATS REGARDING THE RELEASE (BUT NOT BREAKING CHANGES).>
<ADDING/BUMPING DEPENDENCIES SHOULD GO HERE>
<KNOWN LACK OF SUPPORT ON SOME PLATFORM, SHOULD GO HERE>
tf.lite
BatchFunction Operator
num_warmup_batch_threads op attribute to support a separate thread pool for processing warmup requests.per_criticality_batch_timeout_micros op attribute to support different batch timeouts for different criticality levels.TensorFlow API
__new__ in public API golden files for subclasses of tuple (like tf.io.FixedLenFeature) to fix false positives during static type checking.>tf.data
tf.data.Dataset.scan where the shape of the state returned by scan_func was not strictly validated against the initial state.tf.image.adjust_contrast
AdjustContrastv2 op, sotf.image.adjust_contrast can now be differentiated withGradientTape. Fixestf.nn.softsign
tf.nn.softsign. Differentiating twiceSoftsignGradtf.math.reciprocal
Reciprocal and Inv to the typesjit_compile=True no longer silentlytf.experimental.numpy
tf.experimental.numpy.isclose and tf.experimental.numpy.allclose nowrtol and atol to integer inputs, matching NumPy, instead ofoneDNN (MKL) convolution and transpose kernels
tf.image.non_max_suppression
jit_compile=True when boxes andscores are empty. The XLA lowering now returns an empty selection,<SIMILAR TO ABOVE SECTION, BUT FOR OTHER IMPORTANT CHANGES / BUG FIXES>
<IF A CHANGE CLOSES A GITHUB ISSUE, IT SHOULD BE DOCUMENTED HERE>
This release contains contributions from many people at Google, as well as:
, , , , ,
One column per quarter.
Support for Python 3.9 has been removed starting with TF 2.21.
tf.lite
tf.image
tf.data
NoneTensorSpec to the public API so that Nones in element_spec
can be identified via isinstance(..., tf.NoneTensorSpec).This release contains contributions from many people at Google, as well as:
Aaraviitkgp, Abhijeet, Abhinav Gunjal, Abhishek, Adam Paszke, Aditya Gupta, Aditya Jha, Aditya Sharma, Adrian Kuegel, Aiden Grossman, Akarsh, Akhil Goel, Alan Kelly, Aleksa Arsic, Aleksei, Aleksei Nurmukhametov, Alex, Alexander Belyaev, Alexander Grund, Alexander Lyashuk, Alexander Shaposhnikov, Alex Pivovarov, Aliia Khasanova, Alina Sbirlea, Allan Renucci, Amelia Thurdekoos, Amit Sabne, Andrei Ivanov, Andrew Dame, Andrey Portnoy, Anish Nair, Anlun Xu, Antonio Sanchez, anuj chincholikar, Anuj Chincholikar, Aravindh Balaji, aravindhbalaji1985, Arian Arfaian, Armin Felder, Artem Belevich, Ashish Rao, Ashitesh Singh, A. Unique TensorFlower, Bart Chrzaszcz, benediktjohannes, Benjamin Chetioui, Benjamin Kramer, Berkin Ilbeyi, Bhatu, Bhavani Subramanian, Bhupendra Dubey, Bill Varcho, Bixia Zheng, Blake Hechtman, Bodhi Silberling, BruceXinXin, Bryan Massoth, Buddh Prakash, Byungchul Kim, Ce Zheng, Changhui Lin, Chao, Charles Alaras, Chase Riley Roberts, Chenhao Jiang, Chris Ashton, Chris Jones, Chris Kennelly, Christian Sigg, Chuan He, Chunlei Niu, Chun-nien Chan, Chunyu Jin, Clive Verghese, Cong Liu, Corentin Kerisit, Daniel Chen, Daniel Kuts, Daniel Ng, Daniel Sosa, Daniel Suo, Danila Malyutin, David Dunleavy, David Majnemer, David Pizzuto, Deepika Rajani, deeptanshusekhri, dependabot[bot], Deqiang Chen, Derek Murray, Dillon Sharlet, Dimitar (Mitko) Asenov, Dimitris Vardoulakis, Dirk Hornung, DottsGit, Dragan Mladjenovic, Eetu Sjöblom, Elen Kalda, Emilio Cota, Emily Fertig, Eugene Zhulenev, Eusebio Durán Montaña, Evan Brown, Ezekiel Calubaquib, Faijul Amin, Felix Wang, Fengwu Yao, Fergus Henderson, Frederic Rechtenstein, Frederik Gossen, Gabriel Gerlero, Gagan Nagaraj, gaikwadrahul8, garry00107, gaurides, George Pawelczak, Georg Stefan Schmid, gns, Goran Flegar, Graham, Grant Jensen, Greg Olechwierowicz, Gregory Pataky, Grzegorz Gawryał, Gunhyun Park, guozhong.zhuang, Haibo Huang, Hana Joo, Hariprasad Ravishankar, Harsha H S, Harshit Monish, Henning Becker, Hittanshu, Hoeseong (Hayden) Kim, Hugo Mano, Hyeontaek Lim, Ibrahim Umit Akgun, ILCSFNO, Ilia Sergachev, Ilya Tikhonovskiy, Iman Hosseini, Ionel Gog, Isha Arkatkar, isharif168, Ivo Ristovski List, Jacques Pienaar, Jae H. Yoo, Jaeyoon Jung, Jake Harmon, James Hilliard, jameslovespancakes, James Spooner, Jane Liu, Jaroslav Sevcik, Jeff Parker, Jeffrey A. Dean, Jeremy Meredith, Jialei Chen, Jian Cai, Jian Li, Jie Luo, Jim Lin, Jing Pu, Jinliang Wei, Jiya Zhang, Joel Wee, Johannes Buchner, Johannes Reifferscheid, Johnny, Jorge Gorbe Moya, Joshua Lang, Joshua Wang, Joss Briody, jparkerh, Juanli Shen, Juhyun Lee, Jun Jiang, Junwhan Ahn, Kadir Barut, Kanglan Tang, Kanish Anand, Kanvi Khanna, Karlo Basioli, Ken Franko, Kevin Chen, Kevin Gleason, Kingston Mandisodza, Koki Ibukuro, Kostiantyn Liepieshov, Krishna Haridasan, Krishna Somani, Krzysztof Kosiński, Kuy Mainwaring, lambert, Larry Lansing, Lin Chai, Lord ε Rebel, Luke Baumann, Luke Hutton, madhavmadupu, Majid Dadashi, Mani Ananth, Manjunath Gaonkar, Marcello Maggioni, Marcin Radomski, Maria Lyubimtseva, Marissa Ikonomidis, Mark Daoust, Mason Chang, Matej Aleksandrov, Mateusz Sokół, Matthias Guenther, Matthias Kramm, Matt Hurd, Matt Kreileder, Maxime France-Pillois, Maxim Ermilov, Mehrdad Khani, Melissa Weber Mendonça, MERT-CKR, Michael Goldfarb, Michael Green, Michael Kuperstein, Michael Voznesensky, Michael Whittaker, Mihai Maruseac, Mikhail Goncharov, Ming-Xu Huang, Mircea Trofin, Misha Gutman, misterBart, mmakevic-amd, Mohamed AbdElmoneim, Mohamed Amine Zghal, Mohammadreza Heydary, Mohammed Anany, mraunak, Mudit Gokhale, Nayana Thorat, Nevi, nhatle, Nhat Le, Nihar0071, Nikhil, Nikita Putikhin, Niklas Vangerow, Nitin Srinivasan, Oleg Shyshkov, Olli Lupton, Om Thakkar, Pankaj Kanwar, Parker Schuh, Paul Ganssle, Pauline Sho, Pavithra Eswaramoorthy, Pedro Gonnet, pemeliya, Penporn Koanantakool, Perry Gibson, Peter Buchlovsky, Peter Gavin, Peter Hawkins, Pham Binh, Phani Paladugula, Philipp Hack, Praneeth Mandala, Praveen Batra, psinfinity, Qingwei Zhang, Quentin Khan, Quoc Truong, QZero, Rachel Han, Raffi Khatchadourian, Ram Rachum, RasheedAli-Shaik, Raviteja Gorijala, Reed Wanderman-Milne, Reilly Grant, Renjie Wu, Richard Levasseur, Robert David, Ryan M. Lefever, Sachin M, Sagun Bajra, Sai Ganesh Muthuraman, Saksham Singh Rathore, Sannidhya Chauhan, Sayan Saha, Sean Talts, Seher Ellis, Sergei Lebedev, Sergey Kozub, Sevin Fide Varoglu, Shahriar Rouf, Shanbin Ke, Shaogang Wang, Sharad Vikram, Shawn Lu, Siddhartha Menon, Siqiao Wu, skill, Smit Hinsu, snadampal, Sohaib Iftikhar, Soowon Jeong, spiao, Srijan Upadhyay, stevemcgregory, Subham Soni, Subhankar Shah, Swachhand Lokhande, Tai Ly, TensorFlower Gardener, Terry Heo, Terry Sun, Terry Tao, Theotime Combes, Thomas Joerg, Thomas Köppe, Tiago Quelhas, TJ Xu, Toli Yevtushenko, Tomás Longeri, Tom Hennigan, Tommy Chiang, Tom Natan, Tongfei Guo, Tori Baker, Uwe L. Korn, Vadym Matsishevskyi, Vamsi Manchala, Venkat6871, Victor Stone, Ville Vesilehto, Vitalii Dziuba, Vladimir Belitskiy, Vlad Sytchenko, Volodymyr Kysenko, Wai Hon Law, wan3x, Weiyi Wang, Will Froom, William S. Moses, wondertx, Xuefei Jiang, Yang Chen, Yash Katariya, Yasir Ashfaq, yasiribmcon, Yeou Chiou, Yicheng Luo, Yi Kong, Yimei Sun, Yin Zhang, Yuchen Yao, Yue Sheng, Yulia Baturina, Yunjie Xu, Yunlong Liu, Yun Peng, Yurii Topin, Zac Cranko, Zac Mustin, Zenong Zhang, Zeyu Wang, Zhanyong Wan, Zixuan Jiang, Ziyin Huang, Zviki Nozadze
Support for Python 3.9 has been removed starting with TF 2.21.
tf.lite
tf.image
tf.data
NoneTensorSpec to the public API so that Nones in element_spec
can be identified via isinstance(..., tf.NoneTensorSpec).This release contains contributions from many people at Google, as well as:
Aaraviitkgp, Abhijeet, Abhinav Gunjal, Abhishek, Adam Paszke, Aditya Gupta, Aditya Jha, Aditya Sharma, Adrian Kuegel, Aiden Grossman, Akarsh, Akhil Goel, Alan Kelly, Aleksa Arsic, Aleksei, Aleksei Nurmukhametov, Alex, Alexander Belyaev, Alexander Grund, Alexander Lyashuk, Alexander Shaposhnikov, Alex Pivovarov, Aliia Khasanova, Alina Sbirlea, Allan Renucci, Amelia Thurdekoos, Amit Sabne, Andrei Ivanov, Andrew Dame, Andrey Portnoy, Anish Nair, Anlun Xu, Antonio Sanchez, anuj chincholikar, Anuj Chincholikar, Aravindh Balaji, aravindhbalaji1985, Arian Arfaian, Armin Felder, Artem Belevich, Ashish Rao, Ashitesh Singh, A. Unique TensorFlower, Bart Chrzaszcz, benediktjohannes, Benjamin Chetioui, Benjamin Kramer, Berkin Ilbeyi, Bhatu, Bhavani Subramanian, Bhupendra Dubey, Bill Varcho, Bixia Zheng, Blake Hechtman, Bodhi Silberling, BruceXinXin, Bryan Massoth, Buddh Prakash, Byungchul Kim, Ce Zheng, Changhui Lin, Chao, Charles Alaras, Chase Riley Roberts, Chenhao Jiang, Chris Ashton, Chris Jones, Chris Kennelly, Christian Sigg, Chuan He, Chunlei Niu, Chun-nien Chan, Chunyu Jin, Clive Verghese, Cong Liu, Corentin Kerisit, Daniel Chen, Daniel Kuts, Daniel Ng, Daniel Sosa, Daniel Suo, Danila Malyutin, David Dunleavy, David Majnemer, David Pizzuto, Deepika Rajani, deeptanshusekhri, dependabot[bot], Deqiang Chen, Derek Murray, Dillon Sharlet, Dimitar (Mitko) Asenov, Dimitris Vardoulakis, Dirk Hornung, DottsGit, Dragan Mladjenovic, Eetu Sjöblom, Elen Kalda, Emilio Cota, Emily Fertig, Eugene Zhulenev, Eusebio Durán Montaña, Evan Brown, Ezekiel Calubaquib, Faijul Amin, Felix Wang, Fengwu Yao, Fergus Henderson, Frederic Rechtenstein, Frederik Gossen, Gabriel Gerlero, Gagan Nagaraj, gaikwadrahul8, garry00107, gaurides, George Pawelczak, Georg Stefan Schmid, gns, Goran Flegar, Graham, Grant Jensen, Greg Olechwierowicz, Gregory Pataky, Grzegorz Gawryał, Gunhyun Park, guozhong.zhuang, Haibo Huang, Hana Joo, Hariprasad Ravishankar, Harsha H S, Harshit Monish, Henning Becker, Hittanshu, Hoeseong (Hayden) Kim, Hugo Mano, Hyeontaek Lim, Ibrahim Umit Akgun, ILCSFNO, Ilia Sergachev, Ilya Tikhonovskiy, Iman Hosseini, Ionel Gog, Isha Arkatkar, isharif168, Ivo Ristovski List, Jacques Pienaar, Jae H. Yoo, Jaeyoon Jung, Jake Harmon, James Hilliard, jameslovespancakes, James Spooner, Jane Liu, Jaroslav Sevcik, Jeff Parker, Jeffrey A. Dean, Jeremy Meredith, Jialei Chen, Jian Cai, Jian Li, Jie Luo, Jim Lin, Jing Pu, Jinliang Wei, Jiya Zhang, Joel Wee, Johannes Buchner, Johannes Reifferscheid, Johnny, Jorge Gorbe Moya, Joshua Lang, Joshua Wang, Joss Briody, jparkerh, Juanli Shen, Juhyun Lee, Jun Jiang, Junwhan Ahn, Kadir Barut, Kanglan Tang, Kanish Anand, Kanvi Khanna, Karlo Basioli, Ken Franko, Kevin Chen, Kevin Gleason, Kingston Mandisodza, Koki Ibukuro, Kostiantyn Liepieshov, Krishna Haridasan, Krishna Somani, Krzysztof Kosiński, Kuy Mainwaring, lambert, Larry Lansing, Lin Chai, Lord ε Rebel, Luke Baumann, Luke Hutton, madhavmadupu, Majid Dadashi, Mani Ananth, Manjunath Gaonkar, Marcello Maggioni, Marcin Radomski, Maria Lyubimtseva, Marissa Ikonomidis, Mark Daoust, Mason Chang, Matej Aleksandrov, Mateusz Sokół, Matthias Guenther, Matthias Kramm, Matt Hurd, Matt Kreileder, Maxime France-Pillois, Maxim Ermilov, Mehrdad Khani, Melissa Weber Mendonça, MERT-CKR, Michael Goldfarb, Michael Green, Michael Kuperstein, Michael Voznesensky, Michael Whittaker, Mihai Maruseac, Mikhail Goncharov, Ming-Xu Huang, Mircea Trofin, Misha Gutman, misterBart, mmakevic-amd, Mohamed AbdElmoneim, Mohamed Amine Zghal, Mohammadreza Heydary, Mohammed Anany, mraunak, Mudit Gokhale, Nayana Thorat, Nevi, nhatle, Nhat Le, Nihar0071, Nikhil, Nikita Putikhin, Niklas Vangerow, Nitin Srinivasan, Oleg Shyshkov, Olli Lupton, Om Thakkar, Pankaj Kanwar, Parker Schuh, Paul Ganssle, Pauline Sho, Pavithra Eswaramoorthy, Pedro Gonnet, pemeliya, Penporn Koanantakool, Perry Gibson, Peter Buchlovsky, Peter Gavin, Peter Hawkins, Pham Binh, Phani Paladugula, Philipp Hack, Praneeth Mandala, Praveen Batra, psinfinity, Qingwei Zhang, Quentin Khan, Quoc Truong, QZero, Rachel Han, Raffi Khatchadourian, Ram Rachum, RasheedAli-Shaik, Raviteja Gorijala, Reed Wanderman-Milne, Reilly Grant, Renjie Wu, Richard Levasseur, Robert David, Ryan M. Lefever, Sachin M, Sagun Bajra, Sai Ganesh Muthuraman, Saksham Singh Rathore, Sannidhya Chauhan, Sayan Saha, Sean Talts, Seher Ellis, Sergei Lebedev, Sergey Kozub, Sevin Fide Varoglu, Shahriar Rouf, Shanbin Ke, Shaogang Wang, Sharad Vikram, Shawn Lu, Siddhartha Menon, Siqiao Wu, skill, Smit Hinsu, snadampal, Sohaib Iftikhar, Soowon Jeong, spiao, Srijan Upadhyay, stevemcgregory, Subham Soni, Subhankar Shah, Swachhand Lokhande, Tai Ly, TensorFlower Gardener, Terry Heo, Terry Sun, Terry Tao, Theotime Combes, Thomas Joerg, Thomas Köppe, Tiago Quelhas, TJ Xu, Toli Yevtushenko, Tomás Longeri, Tom Hennigan, Tommy Chiang, Tom Natan, Tongfei Guo, Tori Baker, Uwe L. Korn, Vadym Matsishevskyi, Vamsi Manchala, Venkat6871, Victor Stone, Ville Vesilehto, Vitalii Dziuba, Vladimir Belitskiy, Vlad Sytchenko, Volodymyr Kysenko, Wai Hon Law, wan3x, Weiyi Wang, Will Froom, William S. Moses, wondertx, Xuefei Jiang, Yang Chen, Yash Katariya, Yasir Ashfaq, yasiribmcon, Yeou Chiou, Yicheng Luo, Yi Kong, Yimei Sun, Yin Zhang, Yuchen Yao, Yue Sheng, Yulia Baturina, Yunjie Xu, Yunlong Liu, Yun Peng, Yurii Topin, Zac Cranko, Zac Mustin, Zenong Zhang, Zeyu Wang, Zhanyong Wan, Zixuan Jiang, Ziyin Huang, Zviki Nozadze
Support for Python 3.9 has been removed starting with TF 2.21.
tf.lite
tf.image
tf.data
NoneTensorSpec to the public API so that Nones in element_spec can be identified via isinstance(..., tf.NoneTensorSpec).This release contains contributions from many people at Google, as well as:
Aaraviitkgp, Abhijeet, Abhinav Gunjal, Abhishek, Adam Paszke, Aditya Gupta, Aditya Jha, Aditya Sharma, Adrian Kuegel, Aiden Grossman, Akarsh, Akhil Goel, Alan Kelly, Aleksa Arsic, Aleksei, Aleksei Nurmukhametov, Alex, Alexander Belyaev, Alexander Grund, Alexander Lyashuk, Alexander Shaposhnikov, Alex Pivovarov, Aliia Khasanova, Alina Sbirlea, Allan Renucci, Amelia Thurdekoos, Amit Sabne, Andrei Ivanov, Andrew Dame, Andrey Portnoy, Anish Nair, Anlun Xu, Antonio Sanchez, anuj chincholikar, Anuj Chincholikar, Aravindh Balaji, aravindhbalaji1985, Arian Arfaian, Armin Felder, Artem Belevich, Ashish Rao, Ashitesh Singh, A. Unique TensorFlower, Bart Chrzaszcz, benediktjohannes, Benjamin Chetioui, Benjamin Kramer, Berkin Ilbeyi, Bhatu, Bhavani Subramanian, Bhupendra Dubey, Bill Varcho, Bixia Zheng, Blake Hechtman, Bodhi Silberling, BruceXinXin, Bryan Massoth, Buddh Prakash, Byungchul Kim, Ce Zheng, Changhui Lin, Chao, Charles Alaras, Chase Riley Roberts, Chenhao Jiang, Chris Ashton, Chris Jones, Chris Kennelly, Christian Sigg, Chuan He, Chunlei Niu, Chun-nien Chan, Chunyu Jin, Clive Verghese, Cong Liu, Corentin Kerisit, Daniel Chen, Daniel Kuts, Daniel Ng, Daniel Sosa, Daniel Suo, Danila Malyutin, David Dunleavy, David Majnemer, David Pizzuto, Deepika Rajani, deeptanshusekhri, dependabot[bot], Deqiang Chen, Derek Murray, Dillon Sharlet, Dimitar (Mitko) Asenov, Dimitris Vardoulakis, Dirk Hornung, DottsGit, Dragan Mladjenovic, Eetu Sjöblom, Elen Kalda, Emilio Cota, Emily Fertig, Eugene Zhulenev, Eusebio Durán Montaña, Evan Brown, Ezekiel Calubaquib, Faijul Amin, Felix Wang, Fengwu Yao, Fergus Henderson, Frederic Rechtenstein, Frederik Gossen, Gabriel Gerlero, Gagan Nagaraj, gaikwadrahul8, garry00107, gaurides, George Pawelczak, Georg Stefan Schmid, gns, Goran Flegar, Graham, Grant Jensen, Greg Olechwierowicz, Gregory Pataky, Grzegorz Gawryał, Gunhyun Park, guozhong.zhuang, Haibo Huang, Hana Joo, Hariprasad Ravishankar, Harsha H S, Harshit Monish, Henning Becker, Hittanshu, Hoeseong (Hayden) Kim, Hugo Mano, Hyeontaek Lim, Ibrahim Umit Akgun, ILCSFNO, Ilia Sergachev, Ilya Tikhonovskiy, Iman Hosseini, Ionel Gog, Isha Arkatkar, isharif168, Ivo Ristovski List, Jacques Pienaar, Jae H. Yoo, Jaeyoon Jung, Jake Harmon, James Hilliard, jameslovespancakes, James Spooner, Jane Liu, Jaroslav Sevcik, Jeff Parker, Jeffrey A. Dean, Jeremy Meredith, Jialei Chen, Jian Cai, Jian Li, Jie Luo, Jim Lin, Jing Pu, Jinliang Wei, Jiya Zhang, Joel Wee, Johannes Buchner, Johannes Reifferscheid, Johnny, Jorge Gorbe Moya, Joshua Lang, Joshua Wang, Joss Briody, jparkerh, Juanli Shen, Juhyun Lee, Jun Jiang, Junwhan Ahn, Kadir Barut, Kanglan Tang, Kanish Anand, Kanvi Khanna, Karlo Basioli, Ken Franko, Kevin Chen, Kevin Gleason, Kingston Mandisodza, Koki Ibukuro, Kostiantyn Liepieshov, Krishna Haridasan, Krishna Somani, Krzysztof Kosiński, Kuy Mainwaring, lambert, Larry Lansing, Lin Chai, Lord ε Rebel, Luke Baumann, Luke Hutton, madhavmadupu, Majid Dadashi, Mani Ananth, Manjunath Gaonkar, Marcello Maggioni, Marcin Radomski, Maria Lyubimtseva, Marissa Ikonomidis, Mark Daoust, Mason Chang, Matej Aleksandrov, Mateusz Sokół, Matthias Guenther, Matthias Kramm, Matt Hurd, Matt Kreileder, Maxime France-Pillois, Maxim Ermilov, Mehrdad Khani, Melissa Weber Mendonça, MERT-CKR, Michael Goldfarb, Michael Green, Michael Kuperstein, Michael Voznesensky, Michael Whittaker, Mihai Maruseac, Mikhail Goncharov, Ming-Xu Huang, Mircea Trofin, Misha Gutman, misterBart, mmakevic-amd, Mohamed AbdElmoneim, Mohamed Amine Zghal, Mohammadreza Heydary, Mohammed Anany, mraunak, Mudit Gokhale, Nayana Thorat, Nevi, nhatle, Nhat Le, Nihar0071, Nikhil, Nikita Putikhin, Niklas Vangerow, Nitin Srinivasan, Oleg Shyshkov, Olli Lupton, Om Thakkar, Pankaj Kanwar, Parker Schuh, Paul Ganssle, Pauline Sho, Pavithra Eswaramoorthy, Pedro Gonnet, pemeliya, Penporn Koanantakool, Perry Gibson, Peter Buchlovsky, Peter Gavin, Peter Hawkins, Pham Binh, Phani Paladugula, Philipp Hack, Praneeth Mandala, Praveen Batra, psinfinity, Qingwei Zhang, Quentin Khan, Quoc Truong, QZero, Rachel Han, Raffi Khatchadourian, Ram Rachum, RasheedAli-Shaik, Raviteja Gorijala, Reed Wanderman-Milne, Reilly Grant, Renjie Wu, Richard Levasseur, Robert David, Ryan M. Lefever, Sachin M, Sagun Bajra, Sai Ganesh Muthuraman, Saksham Singh Rathore, Sannidhya Chauhan, Sayan Saha, Sean Talts, Seher Ellis, Sergei Lebedev, Sergey Kozub, Sevin Fide Varoglu, Shahriar Rouf, Shanbin Ke, Shaogang Wang, Sharad Vikram, Shawn Lu, Siddhartha Menon, Siqiao Wu, skill, Smit Hinsu, snadampal, Sohaib Iftikhar, Soowon Jeong, spiao, Srijan Upadhyay, stevemcgregory, Subham Soni, Subhankar Shah, Swachhand Lokhande, Tai Ly, TensorFlower Gardener, Terry Heo, Terry Sun, Terry Tao, Theotime Combes, Thomas Joerg, Thomas Köppe, Tiago Quelhas, TJ Xu, Toli Yevtushenko, Tomás Longeri, Tom Hennigan, Tommy Chiang, Tom Natan, Tongfei Guo, Tori Baker, Uwe L. Korn, Vadym Matsishevskyi, Vamsi Manchala, Venkat6871, Victor Stone, Ville Vesilehto, Vitalii Dziuba, Vladimir Belitskiy, Vlad Sytchenko, Volodymyr Kysenko, Wai Hon Law, wan3x, Weiyi Wang, Will Froom, William S. Moses, wondertx, Xuefei Jiang, Yang Chen, Yash Katariya, Yasir Ashfaq, yasiribmcon, Yeou Chiou, Yicheng Luo, Yi Kong, Yimei Sun, Yin Zhang, Yuchen Yao, Yue Sheng, Yulia Baturina, Yunjie Xu, Yunlong Liu, Yun Peng, Yurii Topin, Zac Cranko, Zac Mustin, Zenong Zhang, Zeyu Wang, Zhanyong Wan, Zixuan Jiang, Ziyin Huang, Zviki Nozadze
tf.lite will be deprecated, in favor of the new repo https://github.com/google-ai-edge/LiteRT.
tensorflow-io-gcs-filesystem package is now optional, due its uncertain, and limited support. To install it alongside tensorflow, run pip install "tensorflow[gcs-filesystem]".tf.data
autotune.min_parallelism to tf.data.Options to enable faster input pipeline warm up.tf.lite
This release contains contributions from many people at Google, as well as:
1ndig0, 372046933, abhinav, afzpatel, Akhil Goel, Alain Carlucci, Aleksei, Alen Huang, Alex, Amrinfathima-Mcw, Aravindh Balaji, Armand Picard, Aseem Athale, Ashiq Imran, Assoap, Chao, Chase Riley Roberts, Chenhao Jiang, chunhsue, chuntl, Chunyu Jin, Corentin Kerisit, Crefeda Rodrigues, dependabot[bot], Dragan Mladjenovic, Elen Kalda, Felix Thomasmathibalan, gabeweisz, Gauri Deshpande, Georg Stefan Schmid, Guozhong Zhuang, Harsha H S, Harshith_N, Hugo Mano, Ian Tayler Lessa, Jack Wolfard, James Ward, Jane Liu, Jaroslav Sevcik, JD, Jerry-Ge, Jian Li, Jinzhe Zeng, jiunkaiy, Johannes Reifferscheid, johnnkp, junweifu, Kanvi Khanna, Kasper Nielsen, Linzb-Xyz, Luke Hutton, Mahmoud Abuzaina, Mathew Odden, Michael Platings, misterBart, Mitchell Ludwig, Mmakevic-Amd, mraunak, NamanAgarwal0905, Namrata-Ibm, Neuropilot-Captain, nhatle, Nicholas Wilson, Nikhil Shinde, Olli Lupton, Patrick J. Lopresti, Pavel Emeliyanenko, Pearu Peterson, pemeliya, Peng Sun, Philipp Hack, Pratham-Mcw, RahulSudarMCW, RakshithGB, Rakshithgb-Fujitsu, RuslanSemchenko, Ruturaj Vaidya, Sachin Muradi, sandeepgupta12, SaoirseARM, Sergey Kozub, Sevin Fide Varoglu, Shanbin Ke, Shaogang Wang, Shraiysh Vaishay, Siddhartha Menon, spiao, Swatheesh Muralidharan, Tai Ly, Terry Sun, Thibaut Goetghebuer-Planchon, Thomas Dickerson, Tilak, Tj Xu, Trevor Morris, tyb0807, vfdev, Wei Wang, wokron, wondertx, Xuefei Jiang, Yaowei Zhou, Zentrik, Ziyun Cheng, Zoranjovanovic-Ns
tf.lite will be deprecated, in favor of the new repo https://github.com/google-ai-edge/LiteRT.
tensorflow-io-gcs-filesystem package is now optional, due its uncertain, and limited support. To install it alongside tensorflow, run pip install "tensorflow[gcs-filesystem]".tf.data
autotune.min_parallelism to tf.data.Options to enable faster input pipeline warm up.tf.lite
This release contains contributions from many people at Google, as well as:
1ndig0, 372046933, abhinav, afzpatel, Akhil Goel, Alain Carlucci, Aleksei, Alen Huang, Alex, Amrinfathima-Mcw, Aravindh Balaji, Armand Picard, Aseem Athale, Ashiq Imran, Assoap, Chao, Chase Riley Roberts, Chenhao Jiang, chunhsue, chuntl, Chunyu Jin, Corentin Kerisit, Crefeda Rodrigues, dependabot[bot], Dragan Mladjenovic, Elen Kalda, Felix Thomasmathibalan, gabeweisz, Gauri Deshpande, Georg Stefan Schmid, Guozhong Zhuang, Harsha H S, Harshith_N, Hugo Mano, Ian Tayler Lessa, Jack Wolfard, James Ward, Jane Liu, Jaroslav Sevcik, JD, Jerry-Ge, Jian Li, Jinzhe Zeng, jiunkaiy, Johannes Reifferscheid, johnnkp, junweifu, Kanvi Khanna, Kasper Nielsen, Linzb-Xyz, Luke Hutton, Mahmoud Abuzaina, Mathew Odden, Michael Platings, misterBart, Mitchell Ludwig, Mmakevic-Amd, mraunak, NamanAgarwal0905, Namrata-Ibm, Neuropilot-Captain, nhatle, Nicholas Wilson, Nikhil Shinde, Olli Lupton, Patrick J. Lopresti, Pavel Emeliyanenko, Pearu Peterson, pemeliya, Peng Sun, Philipp Hack, Pratham-Mcw, RahulSudarMCW, RakshithGB, Rakshithgb-Fujitsu, RuslanSemchenko, Ruturaj Vaidya, Sachin Muradi, sandeepgupta12, SaoirseARM, Sergey Kozub, Sevin Fide Varoglu, Shanbin Ke, Shaogang Wang, Shraiysh Vaishay, Siddhartha Menon, spiao, Swatheesh Muralidharan, Tai Ly, Terry Sun, Thibaut Goetghebuer-Planchon, Thomas Dickerson, Tilak, Tj Xu, Trevor Morris, tyb0807, vfdev, Wei Wang, wokron, wondertx, Xuefei Jiang, Yaowei Zhou, Zentrik, Ziyun Cheng, Zoranjovanovic-Ns
Fix save_model.save for Serving embedding and add SparseCore Reshard.
tf.lite.Interpreter gives deprecation warning redirecting to its new location at ai_edge_litert.interpreter, as the API tf.lite.Interpreter will be de…
LiteRT, a.k.a. tf.lite:
tflite::Interpreter:kTensorsReservedCapacity and tflite::Interpreter:kTensorsCapacityHeadroom are now const references, rather than constexpr compile-time constants. (This is to enable better API compatibility for TFLite in Play services while preserving the implementation flexibility to change the values of these constants in the future.)tf.lite.Interpreter gives deprecation warning redirecting to its new location at ai_edge_litert.interpreter, as the API tf.lite.Interpreter will be deleted in TF 2.20. See the migration guide for details.tf.lite
tfl.Cast op is now supporting bfloat16 in runtime kernel.libtensorflow packages but it can still be unpacked from the PyPI package.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alain Flaischer, Alex, Alexander Pivovarov, Alexander Shadchin, Alexis Praga, Amrinfathima-Mcw, Andrey Pikas, Andrey Portnoy, Ankur Singh, Ashiq Imran, Assoap, c8ef, charleshofer, Chase Riley Roberts, Chenhao Jiang, Chongyun Lee, Claudio Desouza, Corentin Godeau, Crefeda Rodrigues, Danny Burrow, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, Emmanuel Ferdman, fiberflow, flyingcat, Gary Yi-Hung Chen, Georg Stefan Schmid, Gerwout Van Der Veen, Harsha H S, Harshit Monish, Hugo Mano, i.Pear, Ilia Sergachev, Jane Liu, Jaroslav Sevcik, Jc (Jonathan Chen), Jerry Ge, Jian Li, johndoknjas, Johnny, Jonathan Albrecht, Kaixi Hou, Kanvi Khanna, keerthanakadiri, Kevin Ji, Kiran Sai Ramineni, kwoncy2020, LakshmiKalaKadali, Lee, Jun Seok, Mahmoud Abuzaina, Matt Bahr, mayuyuace, Melissa Weber Mendonça, misterBart, Mkarpushin-Enhancelab, Mmakevic-Amd, mraunak, nallave, Nayana Thorat, Nayana-Ibm, nick.camarena, Nicolas Castet, Om Thakkar, oyzh, Parsa Homayouni, Patrick Toulme, Pavel Emeliyanenko, Pavithra Eswaramoorthy, Pearu Peterson, pemeliya, Philipp Hack, Ravi Kumar Soni, redwrasse, Ruturaj Vaidya, Sallenkey-Wei, Sandeep Gupta, Sergey Kozub, Sevin Fide Varoglu, Shanbin Ke, Shaogang Wang, Shixin Zhang, Shraiysh, Shu Wang, Silvio Traversaro, snadampal, Sunita Nadampalli, Tai Ly, Tatwai Chong, tchatow, tdanyluk, Terry Sun, Tilak, Tj Xu, Trevor Morris, Twice, vfdev, Vladimir Silyaev, Weisser, Pascal, wokron, Won Jeon, Xuefei Jiang, Zentrik, Zoranjovanovic-Ns
tf.lite.Interpreter gives deprecation warning redirecting to its new location at ai_edge_litert.interpreter, as the API tf.lite.Interpreter will be de…
LiteRT, a.k.a. tf.lite:
tflite::Interpreter:kTensorsReservedCapacity and tflite::Interpreter:kTensorsCapacityHeadroom are now const references, rather than constexpr compile-time constants. (This is to enable better API compatibility for TFLite in Play services while preserving the implementation flexibility to change the values of these constants in the future.)tf.lite.Interpreter gives deprecation warning redirecting to its new location at ai_edge_litert.interpreter, as the API tf.lite.Interpreter will be deleted in TF 2.20. See the migration guide for details.tf.lite
tfl.Cast op is now supporting bfloat16 in runtime kernel.libtensorflow packages but it can still be unpacked from the PyPI package.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alain Flaischer, Alex, Alexander Pivovarov, Alexander Shadchin, Alexis Praga, Amrinfathima-Mcw, Andrey Pikas, Andrey Portnoy, Ankur Singh, Ashiq Imran, Assoap, c8ef, charleshofer, Chase Riley Roberts, Chenhao Jiang, Chongyun Lee, Claudio Desouza, Corentin Godeau, Crefeda Rodrigues, Danny Burrow, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, Emmanuel Ferdman, fiberflow, flyingcat, Gary Yi-Hung Chen, Georg Stefan Schmid, Gerwout Van Der Veen, Harsha H S, Harshit Monish, Hugo Mano, i.Pear, Ilia Sergachev, Jane Liu, Jaroslav Sevcik, Jc (Jonathan Chen), Jerry Ge, Jian Li, johndoknjas, Johnny, Jonathan Albrecht, Kaixi Hou, Kanvi Khanna, keerthanakadiri, Kevin Ji, Kiran Sai Ramineni, kwoncy2020, LakshmiKalaKadali, Lee, Jun Seok, Mahmoud Abuzaina, Matt Bahr, mayuyuace, Melissa Weber Mendonça, misterBart, Mkarpushin-Enhancelab, Mmakevic-Amd, mraunak, nallave, Nayana Thorat, Nayana-Ibm, nick.camarena, Nicolas Castet, Om Thakkar, oyzh, Parsa Homayouni, Patrick Toulme, Pavel Emeliyanenko, Pavithra Eswaramoorthy, Pearu Peterson, pemeliya, Philipp Hack, Ravi Kumar Soni, redwrasse, Ruturaj Vaidya, Sallenkey-Wei, Sandeep Gupta, Sergey Kozub, Sevin Fide Varoglu, Shanbin Ke, Shaogang Wang, Shixin Zhang, Shraiysh, Shu Wang, Silvio Traversaro, snadampal, Sunita Nadampalli, Tai Ly, Tatwai Chong, tchatow, tdanyluk, Terry Sun, Tilak, Tj Xu, Trevor Morris, Twice, vfdev, Vladimir Silyaev, Weisser, Pascal, wokron, Won Jeon, Xuefei Jiang, Zentrik, Zoranjovanovic-Ns
Updates curl to 8.11.0 to handle CVE-2024-2004, CVE-2024-2379, CVE-2024-2398, CVE-2024-2466, CVE-2024-6197, CVE-2024-7264, CVE-2024-8096 and CVE-2024-…
8.11.0 to handle CVE-2024-2004, CVE-2024-2379, CVE-2024-2398, CVE-2024-2466, CVE-2024-6197, CVE-2024-7264, CVE-2024-8096 and CVE-2024-9681.ml_dtypes upperbound to < 1.0.0 to reduce conflicts when installed with other ML ecosystem components.tf.lite
tf.lite.Interpreter gives warning of future deletion and a redirection notice to its new location at ai_edge_litert.interpreter. See the migration guide for details.Tensorflow will continue to support NumPy 1.26 until 2025, aligning with community standard deprecation timeline here.
tf.lite
TfLiteOperatorCreate as a step forward towards a cleaner API for TfLiteOperator. Function TfLiteOperatorCreate was added recently, in TensorFlow Lite version 2.17.0, released on 7/11/2024, and we do not expect there will be much code using this function yet. Any code breakages can be easily resolved by passing nullptr as the new, 4th parameter.TensorRT support is disabled in CUDA builds for code health improvement.
Hermetic CUDA support is added.
Hermetic CUDA uses a specific downloadable version of CUDA instead of the user’s locally installed CUDA. Bazel will download CUDA, CUDNN and NCCL distributions, and then use CUDA libraries and tools as dependencies in various Bazel targets. This enables more reproducible builds for Google ML projects and supported CUDA versions.
tf.lite:
tf.data
synchronous argument to map, to specify that the map should run synchronously, as opposed to be parallelizable when options.experimental_optimization.map_parallelization=True. This saves memory compared to setting num_parallel_calls=1.use_unbounded_threadpool argument to map, to specify that the map should use an unbounded threadpool instead of the default pool that is based on the number of cores on the machine. This can improve throughput for map functions which perform IO or otherwise release the CPU.tf.data.experimental.get_model_proto to allow users to peek into the analytical model inside of a dataset iterator.tf.lite
Dequantize op supports TensorType_INT4.
stablehlo.composite.EmbeddingLookup op supports per-channel quantization and TensorType_INT4 values.FullyConnected op supports TensorType_INT16 activation and TensorType_Int4 weight per-channel quantization.tf.tensor_scatter_update, tf.tensor_scatter_add and of other reduce types.
bad_indices_policy.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Anthony Platanios, bernardoArcari, Brett Taylor, buptzyb, Chao, Christian Clauss, Cocoa, Daniil Kutz, Darya Parygina, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, eukub, Faijul Amin, flyingcat, Frédéric Bastien, ganyu.08, Georg Stefan Schmid, Grigory Reznikov, Harsha H S, Harshit Monish, Heiner, Ilia Sergachev, Jan, Jane Liu, Jaroslav Sevcik, Kaixi Hou, Kanvi Khanna, Kristof Maar, Kristóf Maár, LakshmiKalaKadali, Lbertho-Gpsw, lingzhi98, MarcoFalke, Masahiro Hiramori, Mmakevic-Amd, mraunak, Nobuo Tsukamoto, Notheisz57, Olli Lupton, Pearu Peterson, pemeliya, Peyara Nando, Philipp Hack, Phuong Nguyen, Pol Dellaiera, Rahul Batra, Ruturaj Vaidya, sachinmuradi, Sergey Kozub, Shanbin Ke, Sheng Yang, shengyu, Shraiysh, Shu Wang, Surya, sushreebarsa, Swatheesh-Mcw, syzygial, Tai Ly, terryysun, tilakrayal, Tj Xu, Trevor Morris, Tzung-Han Juang, wenchenvincent, wondertx, Xuefei Jiang, Ye Huang, Yimei Sun, Yunlong Liu, Zahid Iqbal, Zhan Lu, Zoranjovanovic-Ns, Zuri Obozuwa
Tensorflow will continue to support NumPy 1.26 until 2025, aligning with community standard deprecation timeline here.
tf.lite
TfLiteOperatorCreate as a step forward towards a cleaner API for TfLiteOperator. Function TfLiteOperatorCreate was added recently, in TensorFlow Lite version 2.17.0, released on 7/11/2024, and we do not expect there will be much code using this function yet. Any code breakages can be easily resolved by passing nullptr as the new, 4th parameter.TensorRT support is disabled in CUDA builds for code health improvement.
Hermetic CUDA support is added.
Hermetic CUDA uses a specific downloadable version of CUDA instead of the user’s locally installed CUDA. Bazel will download CUDA, CUDNN and NCCL distributions, and then use CUDA libraries and tools as dependencies in various Bazel targets. This enables more reproducible builds for Google ML projects and supported CUDA versions.
tf.lite:
tf.data
synchronous argument to map, to specify that the map should run synchronously, as opposed to be parallelizable when options.experimental_optimization.map_parallelization=True. This saves memory compared to setting num_parallel_calls=1.use_unbounded_threadpool argument to map, to specify that the map should use an unbounded threadpool instead of the default pool that is based on the number of cores on the machine. This can improve throughput for map functions which perform IO or otherwise release the CPU.tf.data.experimental.get_model_proto to allow users to peek into the analytical model inside of a dataset iterator.tf.lite
Dequantize op supports TensorType_INT4.
stablehlo.composite.EmbeddingLookup op supports per-channel quantization and TensorType_INT4 values.FullyConnected op supports TensorType_INT16 activation and TensorType_Int4 weight per-channel quantization.tf.tensor_scatter_update, tf.tensor_scatter_add and of other reduce types.
bad_indices_policy.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Anthony Platanios, bernardoArcari, Brett Taylor, buptzyb, Chao, Christian Clauss, Cocoa, Daniil Kutz, Darya Parygina, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, eukub, Faijul Amin, flyingcat, Frédéric Bastien, ganyu.08, Georg Stefan Schmid, Grigory Reznikov, Harsha H S, Harshit Monish, Heiner, Ilia Sergachev, Jan, Jane Liu, Jaroslav Sevcik, Kaixi Hou, Kanvi Khanna, Kristof Maar, Kristóf Maár, LakshmiKalaKadali, Lbertho-Gpsw, lingzhi98, MarcoFalke, Masahiro Hiramori, Mmakevic-Amd, mraunak, Nobuo Tsukamoto, Notheisz57, Olli Lupton, Pearu Peterson, pemeliya, Peyara Nando, Philipp Hack, Phuong Nguyen, Pol Dellaiera, Rahul Batra, Ruturaj Vaidya, sachinmuradi, Sergey Kozub, Shanbin Ke, Sheng Yang, shengyu, Shraiysh, Shu Wang, Surya, sushreebarsa, Swatheesh-Mcw, syzygial, Tai Ly, terryysun, tilakrayal, Tj Xu, Trevor Morris, Tzung-Han Juang, wenchenvincent, wondertx, Xuefei Jiang, Ye Huang, Yimei Sun, Yunlong Liu, Zahid Iqbal, Zhan Lu, Zoranjovanovic-Ns, Zuri Obozuwa
Tensorflow will continue to support NumPy 1.26 until 2025, aligning with community standard deprecation timeline here.
tf.lite
TfLiteOperatorCreate as a step forward towards a cleaner API for TfLiteOperator. Function TfLiteOperatorCreate was added recently, in TensorFlow Lite version 2.17.0, released on 7/11/2024, and we do not expect there will be much code using this function yet. Any code breakages can be easily resolved by passing nullptr as the new, 4th parameter.TensorRT support is disabled in CUDA builds for code health improvement.
Hermetic CUDA support is added.
Hermetic CUDA uses a specific downloadable version of CUDA instead of the user’s locally installed CUDA. Bazel will download CUDA, CUDNN and NCCL distributions, and then use CUDA libraries and tools as dependencies in various Bazel targets. This enables more reproducible builds for Google ML projects and supported CUDA versions.
tf.lite:
tf.data
synchronous argument to map, to specify that the map should run synchronously, as opposed to be parallelizable when options.experimental_optimization.map_parallelization=True. This saves memory compared to setting num_parallel_calls=1.use_unbounded_threadpool argument to map, to specify that the map should use an unbounded threadpool instead of the default pool that is based on the number of cores on the machine. This can improve throughput for map functions which perform IO or otherwise release the CPU.tf.data.experimental.get_model_proto to allow users to peek into the analytical model inside of a dataset iterator.tf.lite
Dequantize op supports TensorType_INT4.
stablehlo.composite.EmbeddingLookup op supports per-channel quantization and TensorType_INT4 values.FullyConnected op supports TensorType_INT16 activation and TensorType_Int4 weight per-channel quantization.tf.tensor_scatter_update, tf.tensor_scatter_add and of other reduce types.
bad_indices_policy.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Anthony Platanios, bernardoArcari, Brett Taylor, buptzyb, Chao, Christian Clauss, Cocoa, Daniil Kutz, Darya Parygina, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, eukub, Faijul Amin, flyingcat, Frédéric Bastien, ganyu.08, Georg Stefan Schmid, Grigory Reznikov, Harsha H S, Harshit Monish, Heiner, Ilia Sergachev, Jan, Jane Liu, Jaroslav Sevcik, Kaixi Hou, Kanvi Khanna, Kristof Maar, Kristóf Maár, LakshmiKalaKadali, Lbertho-Gpsw, lingzhi98, MarcoFalke, Masahiro Hiramori, Mmakevic-Amd, mraunak, Nobuo Tsukamoto, Notheisz57, Olli Lupton, Pearu Peterson, pemeliya, Peyara Nando, Philipp Hack, Phuong Nguyen, Pol Dellaiera, Rahul Batra, Ruturaj Vaidya, sachinmuradi, Sergey Kozub, Shanbin Ke, Sheng Yang, shengyu, Shraiysh, Shu Wang, Surya, sushreebarsa, Swatheesh-Mcw, syzygial, Tai Ly, terryysun, tilakrayal, Tj Xu, Trevor Morris, Tzung-Han Juang, wenchenvincent, wondertx, Xuefei Jiang, Ye Huang, Yimei Sun, Yunlong Liu, Zahid Iqbal, Zhan Lu, Zoranjovanovic-Ns, Zuri Obozuwa
Tensorflow will continue to support NumPy 1.26 until 2025, aligning with community standard deprecation timeline here.
tf.lite
TfLiteOperatorCreate as a step forward towards a cleaner API for TfLiteOperator. Function TfLiteOperatorCreate was added recently, in TensorFlow Lite version 2.17.0, released on 7/11/2024, and we do not expect there will be much code using this function yet. Any code breakages can be easily resolved by passing nullptr as the new, 4th parameter.TensorRT support is disabled in CUDA builds for code health improvement.
Hermetic CUDA support is added.
Hermetic CUDA uses a specific downloadable version of CUDA instead of the user’s locally installed CUDA. Bazel will download CUDA, CUDNN and NCCL distributions, and then use CUDA libraries and tools as dependencies in various Bazel targets. This enables more reproducible builds for Google ML projects and supported CUDA versions.
tf.lite:
tf.data
synchronous argument to map, to specify that the map should run synchronously, as opposed to be parallelizable when options.experimental_optimization.map_parallelization=True. This saves memory compared to setting num_parallel_calls=1.use_unbounded_threadpool argument to map, to specify that the map should use an unbounded threadpool instead of the default pool that is based on the number of cores on the machine. This can improve throughput for map functions which perform IO or otherwise release the CPU.tf.data.experimental.get_model_proto to allow users to peek into the analytical model inside of a dataset iterator.tf.lite
Dequantize op supports TensorType_INT4.
stablehlo.composite.EmbeddingLookup op supports per-channel quantization and TensorType_INT4 values.FullyConnected op supports TensorType_INT16 activation and TensorType_Int4 weight per-channel quantization.tf.tensor_scatter_update, tf.tensor_scatter_add and of other reduce types.
bad_indices_policy.This release contains contributions from many people at Google, as well as:
Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Anthony Platanios, bernardoArcari, Brett Taylor, buptzyb, Chao, Christian Clauss, Cocoa, Daniil Kutz, Darya Parygina, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, Elfie Guo, eukub, Faijul Amin, flyingcat, Frédéric Bastien, ganyu.08, Georg Stefan Schmid, Grigory Reznikov, Harsha H S, Harshit Monish, Heiner, Ilia Sergachev, Jan, Jane Liu, Jaroslav Sevcik, Kaixi Hou, Kanvi Khanna, Kristof Maar, Kristóf Maár, LakshmiKalaKadali, Lbertho-Gpsw, lingzhi98, MarcoFalke, Masahiro Hiramori, Mmakevic-Amd, mraunak, Nobuo Tsukamoto, Notheisz57, Olli Lupton, Pearu Peterson, pemeliya, Peyara Nando, Philipp Hack, Phuong Nguyen, Pol Dellaiera, Rahul Batra, Ruturaj Vaidya, sachinmuradi, Sergey Kozub, Shanbin Ke, Sheng Yang, shengyu, Shraiysh, Shu Wang, Surya, sushreebarsa, Swatheesh-Mcw, syzygial, Tai Ly, terryysun, tilakrayal, Tj Xu, Trevor Morris, Tzung-Han Juang, wenchenvincent, wondertx, Xuefei Jiang, Ye Huang, Yimei Sun, Yunlong Liu, Zahid Iqbal, Zhan Lu, Zoranjovanovic-Ns, Zuri Obozuwa
Add necessary header files in the aar library. These are needed if developers build apps with header files unpacked from tflite aar files from maven.
cstring.h missing file issue with the Libtensorflow archive.Support for NVIDIA GPUs with compute capability 5.x (Maxwell generation) has been removed from TF binary distributions (Python wheels).
Add is_cpu_target_available, which indicates whether or not TensorFlow was built with support for a given CPU target. This can be useful for skipping target-specific tests if a target is not supported.
tf.data
data.experimental.distribued_save. distribued_save uses tf.data service (https://www.tensorflow.org/api_docs/python/tf/data/experimental/service) to write distributed dataset snapshots. The call is non-blocking and returns without waiting for the snapshot to finish. Setting wait=True to tf.data.Dataset.load allows the snapshots to be read while they are being written.GPU
Replace DebuggerOptions of TensorFlow Quantizer, and migrate to DebuggerConfig of StableHLO Quantizer.
Add TensorFlow to StableHLO converter to TensorFlow pip package.
TensorRT support: this is the last release supporting TensorRT. It will be removed in the next release.
NumPy 2.0 support: TensorFlow is going to support NumPy 2.0 in the next release. It may break some edge cases of TensorFlow API usage.
tf.lite
FullyConnected layer is switched from per-tensor to per-channel scales for dynamic range quantization use case (float32 inputs / outputs and int8 weights). The change enables new quantization schema globally in the converter and inference engine. The new behaviour can be disabled via experimental flag converter._experimental_disable_per_channel_quantization_for_dense_layers = True.TfLiteRegistrationExternal type has been renamed as TfLiteOperator, and likewise for the corresponding API functions.experimental_default_delegate_latest_features to enable all default delegate features.GetTemporaryPointer() bug fixed.tf.data
wait to tf.data.Dataset.load. If True, for snapshots written with distributed_save, it reads the snapshot while it is being written. For snapshots written with regular save, it waits for the snapshot until it's finished. The default is False for backward compatibility. Users of distributed_save are recommended to set it to True.tf.tpu.experimental.embedding.TPUEmbeddingV2
compute_sparse_core_stats for sparse core users to profile the data with this API to get the max_ids and max_unique_ids. These numbers will be needed to configure the sparse core embedding mid level api.preprocess_features method since that's no longer needed.This release contains contributions from many people at Google, as well as:
Abdulaziz Aloqeely, Ahmad-M-Al-Khateeb, Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Ashiq Imran, Ben Olson, Chao, Chase Riley Roberts, Clemens Giuliani, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, ekuznetsov139, Elfie Guo, Faijul Amin, Gauri1 Deshpande, Georg Stefan Schmid, guozhong.zhuang, Hao Wu, Haoyu (Daniel), Harsha H S, Harsha Hs, Harshit Monish, Ilia Sergachev, Jane Liu, Jaroslav Sevcik, Jinzhe Zeng, Justin Dhillon, Kaixi Hou, Kanvi Khanna, LakshmiKalaKadali, Learning-To-Play, lingzhi98, Lu Teng, Matt Bahr, Max Ren, Meekail Zain, Mmakevic-Amd, mraunak, neverlva, nhatle, Nicola Ferralis, Olli Lupton, Om Thakkar, orangekame3, ourfor, pateldeev, Pearu Peterson, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, prrathi, rahulbatra85, Raunak, redwrasse, Robert Kalmar, Robin Zhang, RoboSchmied, Ruturaj Vaidya, sachinmuradi, Shawn Wang, Sheng Yang, Surya, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tj Xu, Trevor Morris, wenchenvincent, Yimei Sun, zahiqbal, Zhu Jianjiang, Zoranjovanovic-Ns
Support for NVIDIA GPUs with compute capability 5.x (Maxwell generation) has been removed from TF binary distributions (Python wheels).
Add is_cpu_target_available, which indicates whether or not TensorFlow was built with support for a given CPU target. This can be useful for skipping target-specific tests if a target is not supported.
tf.data
data.experimental.distribued_save. distribued_save uses tf.data service (https://www.tensorflow.org/api_docs/python/tf/data/experimental/service) to write distributed dataset snapshots. The call is non-blocking and returns without waiting for the snapshot to finish. Setting wait=True to tf.data.Dataset.load allows the snapshots to be read while they are being written.GPU
Replace DebuggerOptions of TensorFlow Quantizer, and migrate to DebuggerConfig of StableHLO Quantizer.
Add TensorFlow to StableHLO converter to TensorFlow pip package.
TensorRT support: this is the last release supporting TensorRT. It will be removed in the next release.
NumPy 2.0 support: TensorFlow is going to support NumPy 2.0 in the next release. It may break some edge cases of TensorFlow API usage.
tf.lite
FullyConnected layer is switched from per-tensor to per-channel scales for dynamic range quantization use case (float32 inputs / outputs and int8 weights). The change enables new quantization schema globally in the converter and inference engine. The new behaviour can be disabled via experimental flag converter._experimental_disable_per_channel_quantization_for_dense_layers = True.TfLiteRegistrationExternal type has been renamed as TfLiteOperator, and likewise for the corresponding API functions.experimental_default_delegate_latest_features to enable all default delegate features.GetTemporaryPointer() bug fixed.tf.data
wait to tf.data.Dataset.load. If True, for snapshots written with distributed_save, it reads the snapshot while it is being written. For snapshots written with regular save, it waits for the snapshot until it's finished. The default is False for backward compatibility. Users of distributed_save are recommended to set it to True.tf.tpu.experimental.embedding.TPUEmbeddingV2
compute_sparse_core_stats for sparse core users to profile the data with this API to get the max_ids and max_unique_ids. These numbers will be needed to configure the sparse core embedding mid level api.preprocess_features method since that's no longer needed.This release contains contributions from many people at Google, as well as:
Abdulaziz Aloqeely, Ahmad-M-Al-Khateeb, Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Ashiq Imran, Ben Olson, Chao, Chase Riley Roberts, Clemens Giuliani, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, ekuznetsov139, Elfie Guo, Faijul Amin, Gauri1 Deshpande, Georg Stefan Schmid, guozhong.zhuang, Hao Wu, Haoyu (Daniel), Harsha H S, Harsha Hs, Harshit Monish, Ilia Sergachev, Jane Liu, Jaroslav Sevcik, Jinzhe Zeng, Justin Dhillon, Kaixi Hou, Kanvi Khanna, LakshmiKalaKadali, Learning-To-Play, lingzhi98, Lu Teng, Matt Bahr, Max Ren, Meekail Zain, Mmakevic-Amd, mraunak, neverlva, nhatle, Nicola Ferralis, Olli Lupton, Om Thakkar, orangekame3, ourfor, pateldeev, Pearu Peterson, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, prrathi, rahulbatra85, Raunak, redwrasse, Robert Kalmar, Robin Zhang, RoboSchmied, Ruturaj Vaidya, sachinmuradi, Shawn Wang, Sheng Yang, Surya, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tj Xu, Trevor Morris, wenchenvincent, Yimei Sun, zahiqbal, Zhu Jianjiang, Zoranjovanovic-Ns
Support for NVIDIA GPUs with compute capability 5.x (Maxwell generation) has been removed from TF binary distributions (Python wheels).
Add is_cpu_target_available, which indicates whether or not TensorFlow was built with support for a given CPU target. This can be useful for skipping target-specific tests if a target is not supported.
tf.data
data.experimental.distribued_save. distribued_save uses tf.data service (https://www.tensorflow.org/api_docs/python/tf/data/experimental/service) to write distributed dataset snapshots. The call is non-blocking and returns without waiting for the snapshot to finish. Setting wait=True to tf.data.Dataset.load allows the snapshots to be read while they are being written.GPU
Replace DebuggerOptions of TensorFlow Quantizer, and migrate to DebuggerConfig of StableHLO Quantizer.
Add TensorFlow to StableHLO converter to TensorFlow pip package.
TensorRT support: this is the last release supporting TensorRT. It will be removed in the next release.
NumPy 2.0 support: TensorFlow is going to support NumPy 2.0 in the next release. It may break some edge cases of TensorFlow API usage.
tf.lite
FullyConnected layer is switched from per-tensor to per-channel scales for dynamic range quantization use case (float32 inputs / outputs and int8 weights). The change enables new quantization schema globally in the converter and inference engine. The new behaviour can be disabled via experimental flag converter._experimental_disable_per_channel_quantization_for_dense_layers = True.TfLiteRegistrationExternal type has been renamed as TfLiteOperator, and likewise for the corresponding API functions.experimental_default_delegate_latest_features to enable all default delegate features.GetTemporaryPointer() bug fixed.tf.data
wait to tf.data.Dataset.load. If True, for snapshots written with distributed_save, it reads the snapshot while it is being written. For snapshots written with regular save, it waits for the snapshot until it's finished. The default is False for backward compatibility. Users of distributed_save are recommended to set it to True.tf.tpu.experimental.embedding.TPUEmbeddingV2
compute_sparse_core_stats for sparse core users to profile the data with this API to get the max_ids and max_unique_ids. These numbers will be needed to configure the sparse core embedding mid level api.preprocess_features method since that's no longer needed.This release contains contributions from many people at Google, as well as:
Abdulaziz Aloqeely, Ahmad-M-Al-Khateeb, Akhil Goel, akhilgoe, Alexander Pivovarov, Amir Samani, Andrew Goodbody, Andrey Portnoy, Ashiq Imran, Ben Olson, Chao, Chase Riley Roberts, Clemens Giuliani, dependabot[bot], Dimitris Vardoulakis, Dragan Mladjenovic, ekuznetsov139, Elfie Guo, Faijul Amin, Gauri1 Deshpande, Georg Stefan Schmid, guozhong.zhuang, Hao Wu, Haoyu (Daniel), Harsha H S, Harsha Hs, Harshit Monish, Ilia Sergachev, Jane Liu, Jaroslav Sevcik, Jinzhe Zeng, Justin Dhillon, Kaixi Hou, Kanvi Khanna, LakshmiKalaKadali, Learning-To-Play, lingzhi98, Lu Teng, Matt Bahr, Max Ren, Meekail Zain, Mmakevic-Amd, mraunak, neverlva, nhatle, Nicola Ferralis, Olli Lupton, Om Thakkar, orangekame3, ourfor, pateldeev, Pearu Peterson, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, prrathi, rahulbatra85, Raunak, redwrasse, Robert Kalmar, Robin Zhang, RoboSchmied, Ruturaj Vaidya, sachinmuradi, Shawn Wang, Sheng Yang, Surya, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tj Xu, Trevor Morris, wenchenvincent, Yimei Sun, zahiqbal, Zhu Jianjiang, Zoranjovanovic-Ns
Fixed: Incorrect dependency metadata in TensorFlow Python packages causing installation failures with certain package managers such as Poetry.
Mac x86 users: Mac x86 builds are being deprecated and will no longer be released as a Pip package from TF 2.17 onwards.
tf.summary.trace_on now takes a profiler_outdir argument. This must be set if profiler arg is set to True.
tf.summary.trace_export's profiler_outdir arg is now a no-op. Enabling the profiler now requires setting profiler_outdir in trace_on.tf.estimator
Keras 3.0 will be the default Keras version. You may need to update your script to use Keras 3.0.
Please refer to the new Keras documentation for Keras 3.0 (https://keras.io/keras_3).
To continue using Keras 2.0, do the following.
Install tf-keras via pip install tf-keras~=2.16
To switch tf.keras to use Keras 2 (tf-keras), set the environment variable TF_USE_LEGACY_KERAS=1 directly or in your python program with import os;os.environ["TF_USE_LEGACY_KERAS"]="1". Please note that this will set it for all packages in your Python runtime program
Change the keras import: replace import tensorflow.keras as keras or import keras with import tf_keras as keras. Update any tf.keras references to keras.
Apple Silicon users: If you previously installed TensorFlow using pip install tensorflow-macos, please update your installation method. Use pip install tensorflow from now on.
Mac x86 users: Mac x86 builds are being deprecated and will no longer be released as a Pip package from TF 2.17 onwards.
tensorflow pypi repository and no longer redirect to a separate package.tf.lite
stablehlo.gather.stablehlo.add.stablehlo.multiply.stablehlo.maximum.stablehlo.minimum.tfl.gather_nd.tensorflow/lite/c/c_api_experimental.h:
TfLiteInterpreterGetVariableTensorCountTfLiteInterpreterGetVariableTensorTfLiteInterpreterGetBufferHandleTfLiteInterpreterSetBufferHandletensorflow/lite/c/c_api_opaque.h:
TfLiteOpaqueTensorSetAllocationTypeToDynamictensorflow/lite/c/c_api.h:
TfLiteInterpreterOptionsEnableCancellationTfLiteInterpreterCanceltflite::SimpleDelegateInterface class in tensorflow/lite/delegates/utils/simple_delegate.h,
and likewise in the tflite::SimpleOpaqueDelegateInterface class in tensorflow/lite/delegates/utils/simple_opaque_delegate.h:
CopyFromBufferHandleCopyToBufferHandleFreeBufferHandletf.train.CheckpointOptions and tf.saved_model.SaveOptions
experimental_sharding_callback. This is a callback function wrapper that will be executed to determine how tensors will be split into shards when the saver writes the checkpoint shards to disk. tf.train.experimental.ShardByTaskPolicy is the default sharding behavior, but tf.train.experimental.MaxShardSizePolicy can be used to shard the checkpoint with a maximum shard file size. Users with advanced use cases can also write their own custom tf.train.experimental.ShardingCallbacks.tf.train.CheckpointOptions
experimental_skip_slot_variables (a boolean option) to skip restoring of optimizer slot variables in a checkpoint.tf.saved_model.SaveOptions
SaveOptions now takes a new argument called experimental_debug_stripper. When enabled, this strips the debug nodes from both the node defs and the function defs of the graph. Note that this currently only strips the Assert nodes from the graph and converts them into NoOps instead.keras.layers.experimental.DynamicEmbedding
DynamicEmbedding Keras layerDynamicEmbedding layer allows for the continuous updating of the vocabulary and embeddings during the training process. This layer maintains a hash table to track the most up-to-date vocabulary based on the inputs received by the layer and the eviction policy. When this layer is used with an UpdateEmbeddingCallback, which is a time-based callback, the vocabulary lookup tensor is updated at the time interval set in the UpdateEmbeddingCallback based on the most up-to-date vocabulary hash table maintained by the layer. If this layer is not used in conjunction with UpdateEmbeddingCallback the behavior of the layer would be same as keras.layers.Embedding.keras.optimizers.Adam
This release contains contributions from many people at Google, as well as:
Aakar Dwivedi, Akhil Goel, Alexander Grund, Alexander Pivovarov, Andrew Goodbody, Andrey Portnoy, Aneta Kaczyńska, AnetaKaczynska, ArkadebMisra, Ashiq Imran, Ayan Moitra, Ben Barsdell, Ben Creech, Benedikt Lorch, Bhavani Subramanian, Bianca Van Schaik, Chao, Chase Riley Roberts, Connor Flanagan, David Hall, David Svantesson, David Svantesson-Yeung, dependabot[bot], Dr. Christoph Mittendorf, Dragan Mladjenovic, ekuznetsov139, Eli Kobrin, Eugene Kuznetsov, Faijul Amin, Frédéric Bastien, fsx950223, gaoyiyeah, Gauri1 Deshpande, Gautam, Giulio C.N, guozhong.zhuang, Harshit Monish, James Hilliard, Jane Liu, Jaroslav Sevcik, jeffhataws, Jerome Massot, Jerry Ge, jglaser, jmaksymc, Kaixi Hou, kamaljeeti, Kamil Magierski, Koan-Sin Tan, lingzhi98, looi, Mahmoud Abuzaina, Malik Shahzad Muzaffar, Meekail Zain, mraunak, Neil Girdhar, Olli Lupton, Om Thakkar, Paul Strawder, Pavel Emeliyanenko, Pearu Peterson, pemeliya, Philipp Hack, Pierluigi Urru, Pratik Joshi, radekzc, Rafik Saliev, Ragu, Rahul Batra, rahulbatra85, Raunak, redwrasse, Rodrigo Gomes, ronaghy, Sachin Muradi, Shanbin Ke, shawnwang18, Sheng Yang, Shivam Mishra, Shu Wang, Strawder, Paul, Surya, sushreebarsa, Tai Ly, talyz, Thibaut Goetghebuer-Planchon, Tj Xu, Tom Allsop, Trevor Morris, Varghese, Jojimon, weihanmines, wenchenvincent, Wenjie Zheng, Who Who Who, Yasir Ashfaq, yasiribmcon, Yoshio Soma, Yuanqiang Liu, Yuriy Chernyshov
Clang is now the default compiler to build TensorFlow CPU wheels on the Windows Platform starting with this release. The currently supported version i
tf.summary.trace_on now takes a profiler_outdir argument. This must be set if profiler arg is set to True.
tf.summary.trace_export's profiler_outdir arg is now a no-op. Enabling the profiler now requires setting profiler_outdir in trace_on.tf.estimator
Keras 3 will be the default Keras version. You may need to update your script to use Keras 3. Please refer to the new Keras documentation for Keras 3 (https://keras.io/keras_3). To continue using Keras 2, do the following:
tf-keras via pip install tf-keras~=2.16TF_USE_LEGACY_KERAS=1 directly or in your Python program by doing import os;os.environ["TF_USE_LEGACY_KERAS"]=1. Please note that this will set it for all packages in your Python runtime program.pip install tensorflow-macos, please update your installation method. Use pip install tensorflow from now on. Starting with TF 2.17, the tensorflow-macos package will no longer receive updates.tensorflow pypi repository and no longer redirect to a separate package.tf.lite
stablehlo.gather.stablehlo.add.stablehlo.multiply.stablehlo.maximum.stablehlo.minimum.tfl.gather_nd.tf.train.CheckpointOptions and tf.saved_model.SaveOptions
experimental_sharding_callback. This is a callback function wrapper that will be executed to determine how tensors will be split into shards when the saver writes the checkpoint shards to disk. tf.train.experimental.ShardByTaskPolicy is the default sharding behavior, but tf.train.experimental.MaxShardSizePolicy can be used to shard the checkpoint with a maximum shard file size. Users with advanced use cases can also write their own custom tf.train.experimental.ShardingCallbacks.tf.train.CheckpointOptions
experimental_skip_slot_variables (a boolean option) to skip restoring of optimizer slot variables in a checkpoint.tf.saved_model.SaveOptions
SaveOptions now takes a new argument called experimental_debug_stripper. When enabled, this strips the debug nodes from both the node defs and the function defs of the graph. Note that this currently only strips the Assert nodes from the graph and converts them into NoOps instead.keras.layers.experimental.DynamicEmbedding
DynamicEmbedding Keras layerDynamicEmbedding layer allows for the continuous updating of the vocabulary and embeddings during the training process. This layer maintains a hash table to track the most up-to-date vocabulary based on the inputs received by the layer and the eviction policy. When this layer is used with an UpdateEmbeddingCallback, which is a time-based callback, the vocabulary lookup tensor is updated at the time interval set in the UpdateEmbeddingCallback based on the most up-to-date vocabulary hash table maintained by the layer. If this layer is not used in conjunction with UpdateEmbeddingCallback the behavior of the layer would be same as keras.layers.Embedding.keras.optimizers.Adam
This release contains contributions from many people at Google, as well as:
Aakar Dwivedi, Akhil Goel, Alexander Grund, Alexander Pivovarov, Andrew Goodbody, Andrey Portnoy, Aneta Kaczyńska, AnetaKaczynska, ArkadebMisra, Ashiq Imran, Ayan Moitra, Ben Barsdell, Ben Creech, Benedikt Lorch, Bhavani Subramanian, Bianca Van Schaik, Chao, Chase Riley Roberts, Connor Flanagan, David Hall, David Svantesson, David Svantesson-Yeung, dependabot[bot], Dr. Christoph Mittendorf, Dragan Mladjenovic, ekuznetsov139, Eli Kobrin, Eugene Kuznetsov, Faijul Amin, Frédéric Bastien, fsx950223, gaoyiyeah, Gauri1 Deshpande, Gautam, Giulio C.N, guozhong.zhuang, Harshit Monish, James Hilliard, Jane Liu, Jaroslav Sevcik, jeffhataws, Jerome Massot, Jerry Ge, jglaser, jmaksymc, Kaixi Hou, kamaljeeti, Kamil Magierski, Koan-Sin Tan, lingzhi98, looi, Mahmoud Abuzaina, Malik Shahzad Muzaffar, Meekail Zain, mraunak, Neil Girdhar, Olli Lupton, Om Thakkar, Paul Strawder, Pavel Emeliyanenko, Pearu Peterson, pemeliya, Philipp Hack, Pierluigi Urru, Pratik Joshi, radekzc, Rafik Saliev, Ragu, Rahul Batra, rahulbatra85, Raunak, redwrasse, Rodrigo Gomes, ronaghy, Sachin Muradi, Shanbin Ke, shawnwang18, Sheng Yang, Shivam Mishra, Shu Wang, Strawder, Paul, Surya, sushreebarsa, Tai Ly, talyz, Thibaut Goetghebuer-Planchon, Tj Xu, Tom Allsop, Trevor Morris, Varghese, Jojimon, weihanmines, wenchenvincent, Wenjie Zheng, Who Who Who, Yasir Ashfaq, yasiribmcon, Yoshio Soma, Yuanqiang Liu, Yuriy Chernyshov
ml_dtypes runtime dependency is updated to 0.3.1 to fix package conflict issues
ml_dtypes runtime dependency is updated to 0.3.1 to fix package conflict issuesNothing published for this version
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.oneDNN CPU performance optimizations Windows x64 & x86.
TF_ENABLE_ONEDNN_OPTS to 1 (enable) or 0 (disable) before running TensorFlow. To fall back to default settings, unset the environment variable.Making the tf.function type system fully available:
tf.types.experimental.TraceType now allows custom tf.function inputs to declare Tensor decomposition and type casting support.tf.types.experimental.FunctionType as the comprehensive representation of the signature of tf.function callables. It can be accessed through the function_type property of tf.functions and ConcreteFunctions. See the tf.types.experimental.FunctionType documentation for more details.Introducing tf.types.experimental.AtomicFunction as the fastest way to perform TF computations in Python.
inference_fn property of ConcreteFunctionstf.types.experimental.AtomicFunction documentation for how to call and use it.tf.data:
warm_start from tf.data.experimental.OptimizationOptions to tf.data.Options.tf.lite:
sub_op and mul_op support broadcasting up to 6 dimensions.
The tflite::SignatureRunner class, which provides support for named parameters and for multiple named computations within a single TF Lite model, is no longer considered experimental. Likewise for the following signature-related methods of tflite::Interpreter:
tflite::Interpreter::GetSignatureRunnertflite::Interpreter::signature_keystflite::Interpreter::signature_inputstflite::Interpreter::signature_outputstflite::Interpreter::input_tensor_by_signaturetflite::Interpreter::output_tensor_by_signatureSimilarly, the following signature runner functions in the TF Lite C API are no longer considered experimental:
TfLiteInterpreterGetSignatureCountTfLiteInterpreterGetSignatureKeyTfLiteInterpreterGetSignatureRunnerTfLiteSignatureRunnerAllocateTensorsTfLiteSignatureRunnerGetInputCountTfLiteSignatureRunnerGetInputNameTfLiteSignatureRunnerGetInputTensorTfLiteSignatureRunnerGetOutputCountTfLiteSignatureRunnerGetOutputNameTfLiteSignatureRunnerGetOutputTensorTfLiteSignatureRunnerInvokeTfLiteSignatureRunnerResizeInputTensorNew C API function TfLiteExtensionApisVersion added to tensorflow/lite/c/c_api.h.
Add int8 and int16x8 support for RSQRT operator
Android NDK r25 is supported.
Add TensorFlow Quantizer to TensorFlow pip package.
tf.sparse.segment_sum tf.sparse.segment_mean tf.sparse.segment_sqrt_n SparseSegmentSum/Mean/SqrtN[WithNumSegments]
sparse_gradient option (default=false) that makes the gradient of these functions/ops sparse (IndexedSlices) instead of dense (Tensor), using new SparseSegmentSum/Mean/SqrtNGradV2 ops.tf.nn.embedding_lookup_sparse
tf.saved_model.SaveOptions
experimental_skip_saver argument which, if specified, will suppress the addition of SavedModel-native save and restore ops to the SavedModel, for cases where users already build custom save/restore ops and checkpoint formats for the model being saved, and the creation of the SavedModel-native save/restore ops simply cause longer model serialization times.Add ops to tensorflow.raw_ops that were missing.
tf.CheckpointOptions
experimental_write_callbacks. These are callbacks that will be executed after a saving event finishes writing the checkpoint file.Add an option disable_eager_executer_streaming_enqueue to tensorflow.ConfigProto.Experimental to control the eager runtime's behavior around parallel remote function invocations; when set to True, the eager runtime will be allowed to execute multiple function invocations in parallel.
tf.constant_initializer
support_partition. If True, constant_initializers can create sharded variables. This is disabled by default, similar to existing behavior.tf.lite
stablehlo.scatter.tf.estimator
This release contains contributions from many people at Google, as well as:
Aiden Grossman, Akash Patel, Akhil Goel, Alexander Pivovarov, Andrew Goodbody, Ayan Moitra, Ben Barsdell, Ben Olson, Bhavani Subramanian, Boian Petkantchin, Bruce Lai, Chao Chen, Christian Steinmeyer, cjflan, David Korczynski, Donghak Park, Dragan Mladjenovic, Eli Kobrin, Fadi Arafeh, Feiyue Chen, Frédéric Bastien, guozhong.zhuang, halseycamilla, Harshavardhan Bellamkonda, James Ward, jameshollyer, Jane Liu, johnnkp, jswag180, justkw, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, Kun-Lu, kushanam, Lu Teng, mdfaijul, Mehdi Drissi, mgokulkrish, mraunak, Mustafa Uzun, Namrata Bhave, Pavel Emeliyanenko, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, Rahul Batra, Raunak, redwrasse, Saoirse Stewart, SaoirseARM, seanshpark, Shanbin Ke, Spenser Bauman, Surya, sushreebarsa, Tai Ly, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, Tj Xu, Vladislav, weihanmines, Wen Chen, wenchenvincent, wenscarl, William Muir, Zhoulong, Jiang
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.oneDNN CPU performance optimizations Windows x64 & x86.
TF_ENABLE_ONEDNN_OPTS to 1 (enable) or 0 (disable) before running TensorFlow. To fall back to default settings, unset the environment variable.Making the tf.function type system fully available:
tf.types.experimental.TraceType now allows custom tf.function inputs to declare Tensor decomposition and type casting support.tf.types.experimental.FunctionType as the comprehensive representation of the signature of tf.function callables. It can be accessed through the function_type property of tf.functions and ConcreteFunctions. See the tf.types.experimental.FunctionType documentation for more details.Introducing tf.types.experimental.AtomicFunction as the fastest way to perform TF computations in Python.
inference_fn property of ConcreteFunctionstf.types.experimental.AtomicFunction documentation for how to call and use it.tf.data:
warm_start from tf.data.experimental.OptimizationOptions to tf.data.Options.tf.lite:
sub_op and mul_op support broadcasting up to 6 dimensions.
The tflite::SignatureRunner class, which provides support for named parameters and for multiple named computations within a single TF Lite model, is no longer considered experimental. Likewise for the following signature-related methods of tflite::Interpreter:
tflite::Interpreter::GetSignatureRunnertflite::Interpreter::signature_keystflite::Interpreter::signature_inputstflite::Interpreter::signature_outputstflite::Interpreter::input_tensor_by_signaturetflite::Interpreter::output_tensor_by_signatureSimilarly, the following signature runner functions in the TF Lite C API are no longer considered experimental:
TfLiteInterpreterGetSignatureCountTfLiteInterpreterGetSignatureKeyTfLiteInterpreterGetSignatureRunnerTfLiteSignatureRunnerAllocateTensorsTfLiteSignatureRunnerGetInputCountTfLiteSignatureRunnerGetInputNameTfLiteSignatureRunnerGetInputTensorTfLiteSignatureRunnerGetOutputCountTfLiteSignatureRunnerGetOutputNameTfLiteSignatureRunnerGetOutputTensorTfLiteSignatureRunnerInvokeTfLiteSignatureRunnerResizeInputTensorNew C API function TfLiteExtensionApisVersion added to tensorflow/lite/c/c_api.h.
Add int8 and int16x8 support for RSQRT operator
Android NDK r25 is supported.
Add TensorFlow Quantizer to TensorFlow pip package.
tf.sparse.segment_sum tf.sparse.segment_mean tf.sparse.segment_sqrt_n SparseSegmentSum/Mean/SqrtN[WithNumSegments]
sparse_gradient option (default=false) that makes the gradient of these functions/ops sparse (IndexedSlices) instead of dense (Tensor), using new SparseSegmentSum/Mean/SqrtNGradV2 ops.tf.nn.embedding_lookup_sparse
tf.saved_model.SaveOptions
experimental_skip_saver argument which, if specified, will suppress the addition of SavedModel-native save and restore ops to the SavedModel, for cases where users already build custom save/restore ops and checkpoint formats for the model being saved, and the creation of the SavedModel-native save/restore ops simply cause longer model serialization times.Add ops to tensorflow.raw_ops that were missing.
tf.CheckpointOptions
experimental_write_callbacks. These are callbacks that will be executed after a saving event finishes writing the checkpoint file.Add an option disable_eager_executer_streaming_enqueue to tensorflow.ConfigProto.Experimental to control the eager runtime's behavior around parallel remote function invocations; when set to True, the eager runtime will be allowed to execute multiple function invocations in parallel.
tf.constant_initializer
support_partition. If True, constant_initializers can create sharded variables. This is disabled by default, similar to existing behavior.tf.lite
stablehlo.scatter.tf.estimator
This release contains contributions from many people at Google, as well as:
Aiden Grossman, Akash Patel, Akhil Goel, Alexander Pivovarov, Andrew Goodbody, Ayan Moitra, Ben Barsdell, Ben Olson, Bhavani Subramanian, Boian Petkantchin, Bruce Lai, Chao Chen, Christian Steinmeyer, cjflan, David Korczynski, Donghak Park, Dragan Mladjenovic, Eli Kobrin, Fadi Arafeh, Feiyue Chen, Frédéric Bastien, guozhong.zhuang, halseycamilla, Harshavardhan Bellamkonda, James Ward, jameshollyer, Jane Liu, johnnkp, jswag180, justkw, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, Kun-Lu, kushanam, Lu Teng, mdfaijul, Mehdi Drissi, mgokulkrish, mraunak, Mustafa Uzun, Namrata Bhave, Pavel Emeliyanenko, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, Rahul Batra, Raunak, redwrasse, Saoirse Stewart, SaoirseARM, seanshpark, Shanbin Ke, Spenser Bauman, Surya, sushreebarsa, Tai Ly, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, Tj Xu, Vladislav, weihanmines, Wen Chen, wenchenvincent, wenscarl, William Muir, Zhoulong, Jiang
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.
tf.types.experimental.GenericFunction has been renamed to tf.types.experimental.PolymorphicFunction.oneDNN CPU performance optimizations Windows x64 & x86.
TF_ENABLE_ONEDNN_OPTS to 1 (enable) or 0 (disable) before running TensorFlow. To fall back to default settings, unset the environment variable.Making the tf.function type system fully available:
tf.types.experimental.TraceType now allows custom tf.function inputs to declare Tensor decomposition and type casting support.tf.types.experimental.FunctionType as the comprehensive representation of the signature of tf.function callables. It can be accessed through the function_type property of tf.functions and ConcreteFunctions. See the tf.types.experimental.FunctionType documentation for more details.Introducing tf.types.experimental.AtomicFunction as the fastest way to perform TF computations in Python.
inference_fn property of ConcreteFunctionstf.types.experimental.AtomicFunction documentation for how to call and use it.tf.data:
warm_start from tf.data.experimental.OptimizationOptions to tf.data.Options.tf.lite:
sub_op and mul_op support broadcasting up to 6 dimensions.
The tflite::SignatureRunner class, which provides support for named parameters and for multiple named computations within a single TF Lite model, is no longer considered experimental. Likewise for the following signature-related methods of tflite::Interpreter:
tflite::Interpreter::GetSignatureRunnertflite::Interpreter::signature_keystflite::Interpreter::signature_inputstflite::Interpreter::signature_outputstflite::Interpreter::input_tensor_by_signaturetflite::Interpreter::output_tensor_by_signatureSimilarly, the following signature runner functions in the TF Lite C API are no longer considered experimental:
TfLiteInterpreterGetSignatureCountTfLiteInterpreterGetSignatureKeyTfLiteInterpreterGetSignatureRunnerTfLiteSignatureRunnerAllocateTensorsTfLiteSignatureRunnerGetInputCountTfLiteSignatureRunnerGetInputNameTfLiteSignatureRunnerGetInputTensorTfLiteSignatureRunnerGetOutputCountTfLiteSignatureRunnerGetOutputNameTfLiteSignatureRunnerGetOutputTensorTfLiteSignatureRunnerInvokeTfLiteSignatureRunnerResizeInputTensorNew C API function TfLiteExtensionApisVersion added to tensorflow/lite/c/c_api.h.
Add int8 and int16x8 support for RSQRT operator
Android NDK r25 is supported.
Add TensorFlow Quantizer to TensorFlow pip package.
tf.sparse.segment_sum tf.sparse.segment_mean tf.sparse.segment_sqrt_n SparseSegmentSum/Mean/SqrtN[WithNumSegments]
sparse_gradient option (default=false) that makes the gradient of these functions/ops sparse (IndexedSlices) instead of dense (Tensor), using new SparseSegmentSum/Mean/SqrtNGradV2 ops.tf.nn.embedding_lookup_sparse
tf.saved_model.SaveOptions
experimental_skip_saver argument which, if specified, will suppress the addition of SavedModel-native save and restore ops to the SavedModel, for cases where users already build custom save/restore ops and checkpoint formats for the model being saved, and the creation of the SavedModel-native save/restore ops simply cause longer model serialization times.Add ops to tensorflow.raw_ops that were missing.
tf.CheckpointOptions
experimental_write_callbacks. These are callbacks that will be executed after a saving event finishes writing the checkpoint file.Add an option disable_eager_executer_streaming_enqueue to tensorflow.ConfigProto.Experimental to control the eager runtime's behavior around parallel remote function invocations; when set to True, the eager runtime will be allowed to execute multiple function invocations in parallel.
tf.constant_initializer
support_partition. If True, constant_initializers can create sharded variables. This is disabled by default, similar to existing behavior.tf.lite
stablehlo.scatter.This release contains contributions from many people at Google, as well as:
Aiden Grossman, Akash Patel, Akhil Goel, Alexander Pivovarov, Andrew Goodbody, Ayan Moitra, Ben Barsdell, Ben Olson, Bhavani Subramanian, Boian Petkantchin, Bruce Lai, Chao Chen, Christian Steinmeyer, cjflan, David Korczynski, Donghak Park, Dragan Mladjenovic, Eli Kobrin, Fadi Arafeh, Feiyue Chen, Frédéric Bastien, guozhong.zhuang, halseycamilla, Harshavardhan Bellamkonda, James Ward, jameshollyer, Jane Liu, johnnkp, jswag180, justkw, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, Kun-Lu, kushanam, Lu Teng, mdfaijul, Mehdi Drissi, mgokulkrish, mraunak, Mustafa Uzun, Namrata Bhave, Pavel Emeliyanenko, pemeliya, Peng Sun, Philipp Hack, Pratik Joshi, Rahul Batra, Raunak, redwrasse, Saoirse Stewart, SaoirseARM, seanshpark, Shanbin Ke, Spenser Bauman, Surya, sushreebarsa, Tai Ly, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, Tj Xu, Vladislav, weihanmines, Wen Chen, wenchenvincent, wenscarl, William Muir, Zhoulong, Jiang
Updates curl to 8.4.0 to handle CVE-2023-38545 and CVE-2023-38546.
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.
Support for Python 3.8 has been removed starting with TF 2.14. The TensorFlow 2.13.1 patch release will still have Python 3.8 support.
tf.Tensor
tf.Tensor has changed, and there are now explicit EagerTensor and SymbolicTensor classes for eager and tf.function respectively. Users who relied on the exact type of Tensor (e.g. type(t) == tf.Tensor) will need to update their code to use isinstance(t, tf.Tensor). The tf.is_symbolic_tensor helper added in 2.13 may be used when it is necessary to determine if a value is specifically a symbolic tensor.tf.compat.v1.Session
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.tf.lite
The tensorflow pip package has a new, optional installation method for Linux that installs necessary Nvidia CUDA libraries through pip. As long as the Nvidia driver is already installed on the system, you may now run pip install tensorflow[and-cuda] to install TensorFlow's Nvidia CUDA library dependencies in the Python environment. Aside from the Nvidia driver, no other pre-existing Nvidia CUDA packages are necessary.
Enable JIT-compiled i64-indexed kernels on GPU for large tensors with more than 2**32 elements.
tf.lite
tf.py_function and tf.numpy_function can now be used as function decorators for clearer code:
@tf.py_function(Tout=tf.float32)
def my_fun(x):
print("This always executes eagerly.")
return x+1
tf.lite
UINT32.tf.config.experimental.enable_tensor_float_32_execution
tf.config.experimental.enable_tensor_float_32_execution(False) will cause TPUs to use float32 precision for such ops instead of bfloat16.tf.experimental.dtensor
dtensor.relayout_like, for relayouting a tensor according to the layout of another tensor.dtensor.get_default_mesh, for retrieving the current default mesh under the dtensor context.tf.experimental.strict_mode
strict_mode, which converts all deprecation warnings into runtime errors with instructions on switching to a recommended substitute.TensorFlow Debugger (tfdbg) CLI: ncurses-based CLI for tfdbg v1 was removed.
TensorFlow now supports C++ RTTI on mobile and Android. To enable this feature, pass the flag --define=tf_force_rtti=true to Bazel when building TensorFlow. This may be needed when linking TensorFlow into RTTI-enabled programs since mixing RTTI and non-RTTI code can cause ABI issues.
tf.ones, tf.zeros, tf.fill, tf.ones_like, tf.zeros_like now take an additional Layout argument that controls the output layout of their results.
tf.nest and tf.data now support user defined classes implementing __tf_flatten__ and __tf_unflatten__ methods. See nest_util code examples
for an example.
TensorFlow IO support is now available for Apple Silicon packages.
Refactor CpuExecutable to propagate LLVM errors.
Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
tf.keras
Model.compile now support steps_per_execution='auto' as a parameter, allowing automatic tuning of steps per execution during Model.fit,
Model.predict, and Model.evaluate for a significant performance boost.This release contains contributions from many people at Google, as well as:
Aakar Dwivedi, Adrian Popescu, ag.ramesh, Akhil Goel, Albert Zeyer, Alex Rosen, Alexey Vishnyakov, Andrew Goodbody, angerson, Ashiq Imran, Ayan Moitra, Ben Barsdell, Bhavani Subramanian, Boian Petkantchin, BrianWieder, Chris Mc, cloudhan, Connor Flanagan, Daniel Lang, Daniel Yudelevich, Darya Parygina, David Korczynski, David Svantesson, dingyuqing05, Dragan Mladjenovic, dskkato, Eli Kobrin, Erick Ochoa, Erik Schultheis, Frédéric Bastien, gaikwadrahul8, Gauri1 Deshpande, guozhong.zhuang, H. Vetinari, Isaac Cilia Attard, Jake Hall, Jason Furmanek, Jerry Ge, Jinzhe Zeng, JJ, johnnkp, Jonathan Albrecht, jongkweh, justkw, Kanvi Khanna, kikoxia, Koan-Sin Tan, Kun-Lu, ltsai1, Lu Teng, luliyucoordinate, Mahmoud Abuzaina, mdfaijul, Milos Puzovic, Nathan Luehr, Om Thakkar, pateldeev, Peng Sun, Philipp Hack, pjpratik, Poliorcetics, rahulbatra85, rangjiaheng, Renato Arantes, Robert Kalmar, roho, Rylan Justice, Sachin Muradi, samypr100, Saoirse Stewart, Shanbin Ke, Shivam Mishra, shuw, Song Ziming, Stephan Hartmann, Sulav, sushreebarsa, T Coxon, Tai Ly, talyz, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tirumalesh, Tj Xu, Tom Allsop, Trevor Morris, Varghese, Jojimon, Wen Chen, Yaohui Liu, Yimei Sun, Zhoulong Jiang, Zhoulong, Jiang
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.
Support for Python 3.8 has been removed starting with TF 2.14. The TensorFlow 2.13.1 patch release will still have Python 3.8 support.
tf.Tensor
tf.Tensor has changed, and there are now explicit EagerTensor and SymbolicTensor classes for eager and tf.function respectively. Users who relied on the exact type of Tensor (e.g. type(t) == tf.Tensor) will need to update their code to use isinstance(t, tf.Tensor). The tf.is_symbolic_tensor helper added in 2.13 may be used when it is necessary to determine if a value is specifically a symbolic tensor.tf.compat.v1.Session
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.tf.estimator
tf.estimator API will be removed in the next release. TF Estimator Python package will no longer be released.tf.lite
The tensorflow pip package has a new, optional installation method for Linux that installs necessary Nvidia CUDA libraries through pip. As long as the Nvidia driver is already installed on the system, you may now run pip install tensorflow[and-cuda] to install TensorFlow's Nvidia CUDA library dependencies in the Python environment. Aside from the Nvidia driver, no other pre-existing Nvidia CUDA packages are necessary.
Enable JIT-compiled i64-indexed kernels on GPU for large tensors with more than 2**32 elements.
tf.lite
tf.py_function and tf.numpy_function can now be used as function decorators for clearer code:
@tf.py_function(Tout=tf.float32)
def my_fun(x):
print("This always executes eagerly.")
return x+1
tf.lite
UINT32.tf.config.experimental.enable_tensor_float_32_execution
tf.config.experimental.enable_tensor_float_32_execution(False) will cause TPUs to use float32 precision for such ops instead of bfloat16.tf.experimental.dtensor
dtensor.relayout_like, for relayouting a tensor according to the layout of another tensor.dtensor.get_default_mesh, for retrieving the current default mesh under the dtensor context.tf.experimental.strict_mode
strict_mode, which converts all deprecation warnings into runtime errors with instructions on switching to recommended substitute.TensorFlow Debugger (tfdbg) CLI: ncurses-based CLI for tfdbg v1 was removed.
TensorFlow now supports C++ RTTI on mobile and Android. To enable this feature, pass the flag --define=tf_force_rtti=true to Bazel when building TensorFlow. This may be needed when linking TensorFlow into RTTI-enabled programs since mixing RTTI and non-RTTI code can cause ABI issues.
tf.ones, tf.zeros, tf.fill, tf.ones_like, tf.zeros_like now take an additional Layout argument that controls the output layout of their results.
tf.nest and tf.data now support user defined classes implementing __tf_flatten__ and __tf_unflatten__ methods. See nest_util code examples for an example.
Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
tf.keras
Model.compile now support steps_per_execution='auto' as a parameter, allowing automatic tuning of steps per execution during Model fit, Model.predict, and Model.evaluate for a significant performance boost.This release contains contributions from many people at Google, as well as:
Aakar Dwivedi, Adrian Popescu, ag.ramesh, Akhil Goel, Albert Zeyer, Alex Rosen, Alexey Vishnyakov, Andrew Goodbody, angerson, Ashiq Imran, Ayan Moitra, Ben Barsdell, Bhavani Subramanian, Boian Petkantchin, BrianWieder, Chris Mc, cloudhan, Connor Flanagan, Daniel Lang, Daniel Yudelevich, Darya Parygina, David Korczynski, David Svantesson, dingyuqing05, Dragan Mladjenovic, dskkato, Eli Kobrin, Erick Ochoa, Erik Schultheis, Frédéric Bastien, gaikwadrahul8, Gauri1 Deshpande, georgiie, guozhong.zhuang, H. Vetinari, Isaac Cilia Attard, Jake Hall, Jason Furmanek, Jerry Ge, Jinzhe Zeng, JJ, johnnkp, Jonathan Albrecht, jongkweh, justkw, Kanvi Khanna, kikoxia, Koan-Sin Tan, Kun-Lu, Learning-To-Play, ltsai1, Lu Teng, luliyucoordinate, Mahmoud Abuzaina, mdfaijul, Milos Puzovic, Nathan Luehr, Om Thakkar, pateldeev, Peng Sun, Philipp Hack, pjpratik, Poliorcetics, rahulbatra85, rangjiaheng, Renato Arantes, Robert Kalmar, roho, Rylan Justice, Sachin Muradi, samypr100, Saoirse Stewart, Shanbin Ke, Shivam Mishra, shuw, Song Ziming, Stephan Hartmann, Sulav, sushreebarsa, T Coxon, Tai Ly, talyz, Tensorflow Jenkins, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tirumalesh, Tj Xu, Tom Allsop, Trevor Morris, Varghese, Jojimon, Wen Chen, Yaohui Liu, Yimei Sun, Zhoulong Jiang, Zhoulong, Jiang
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.
tf.Tensor
tf.Tensor has changed, and there are now explicit EagerTensor and SymbolicTensor classes for eager and tf.function respectively. Users who relied on the exact type of Tensor (e.g. type(t) == tf.Tensor) will need to update their code to use isinstance(t, tf.Tensor). The tf.is_symbolic_tensor helper added in 2.13 may be used when it is necessary to determine if a value is specifically a symbolic tensor.tf.compat.v1.Session
tf.compat.v1.Session.partial_run and tf.compat.v1.Session.partial_run_setup will be deprecated in the next release.tf.lite
Enable JIT-compiled i64-indexed kernels on GPU for large tensors with more than 2**32 elements.
tf.lite
tf.py_function and tf.numpy_function can now be used as function decorators for clearer code:
@tf.py_function(Tout=tf.float32)
def my_fun(x):
print("This always executes eagerly.")
return x+1
tf.lite
UINT32.tf.config.experimental.enable_tensor_float_32_execution
tf.config.experimental.enable_tensor_float_32_execution(False) will cause TPUs to use float32 precision for such ops instead of bfloat16.tf.experimental.dtensor
dtensor.relayout_like, for relayouting a tensor according to the layout of another tensor.dtensor.get_default_mesh, for retrieving the current default mesh under the dtensor context.tf.experimental.strict_mode
strict_mode, which converts all deprecation warnings into runtime errors with instructions on switching to a recommended substitute.TensorFlow Debugger (tfdbg) CLI: ncurses-based CLI for tfdbg v1 was removed.
TensorFlow now supports C++ RTTI on mobile and Android. To enable this feature, pass the flag --define=tf_force_rtti=true to Bazel when building TensorFlow. This may be needed when linking TensorFlow into RTTI-enabled programs since mixing RTTI and non-RTTI code can cause ABI issues.
tf.ones, tf.zeros, tf.fill, tf.ones_like, tf.zeros_like now take an additional Layout argument that controls the output layout of their results.
tf.nest and tf.data now support user defined classes implementing __tf_flatten__ and __tf_unflatten__ methods. See nest_util code examples for an example.
Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
tf.keras
Model.compile now support steps_per_execution='auto' as a parameter, allowing automatic tuning of steps per execution during Model.fit, Model.predict, and Model.evaluate for a significant performance boost.This release contains contributions from many people at Google, as well as:
Aakar Dwivedi, Adrian Popescu, ag.ramesh, Akhil Goel, Albert Zeyer, Alex Rosen, Alexey Vishnyakov, Andrew Goodbody, angerson, Ashiq Imran, Ayan Moitra, Ben Barsdell, Bhavani Subramanian, Boian Petkantchin, BrianWieder, Chris Mc, cloudhan, Connor Flanagan, Daniel Lang, Daniel Yudelevich, Darya Parygina, David Korczynski, David Svantesson, dingyuqing05, Dragan Mladjenovic, dskkato, Eli Kobrin, Erick Ochoa, Erik Schultheis, Frédéric Bastien, gaikwadrahul8, Gauri1 Deshpande, georgiie, guozhong.zhuang, H. Vetinari, Isaac Cilia Attard, Jake Hall, Jason Furmanek, Jerry Ge, Jinzhe Zeng, JJ, johnnkp, Jonathan Albrecht, jongkweh, justkw, Kanvi Khanna, kikoxia, Koan-Sin Tan, Kun-Lu, Learning-To-Play, ltsai1, Lu Teng, luliyucoordinate, Mahmoud Abuzaina, mdfaijul, Milos Puzovic, Nathan Luehr, Om Thakkar, pateldeev, Peng Sun, Philipp Hack, pjpratik, Poliorcetics, rahulbatra85, rangjiaheng, Renato Arantes, Robert Kalmar, roho, Rylan Justice, Sachin Muradi, samypr100, Saoirse Stewart, Shanbin Ke, Shivam Mishra, shuw, Song Ziming, Stephan Hartmann, Sulav, sushreebarsa, T Coxon, Tai Ly, talyz, Tensorflow Jenkins, Thibaut Goetghebuer-Planchon, Thomas Preud'Homme, tilakrayal, Tirumalesh, Tj Xu, Tom Allsop, Trevor Morris, Varghese, Jojimon, Wen Chen, Yaohui Liu, Yimei Sun, Zhoulong Jiang, Zhoulong, Jiang
Refactor CpuExecutable to propagate LLVM errors.
Fixes correct values rank in UpperBound and LowerBound CVE-2023-33976
tf.lite
cast.experimental_disable_delegate_clustering to turn-off delegate clustering.expmirror_padspace_to_batch_nd and batch_to_space_ndless, greater_than, equalfloor_div and floor_mod.bitcast.bitwise_xorgather and gather_nd.right_shiftadd.mul.add_op supports broadcasting up to 6 dimensions.top_k.tf.function
tf.types.experimental.ConcreteFunction) as generated through get_concrete_function now performs holistic input validation similar to calling tf.function directly. This can cause breakages where existing calls pass Tensors with the wrong shape or omit certain non-Tensor arguments (including default values).tf.nn
tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse now support ids and weights described by tf.RaggedTensors.allow_fast_lookup to tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse, which enables a simplified and typically faster lookup procedure.tf.data
tf.data.Dataset.zip now supports Python-style zipping, i.e. Dataset.zip(a, b, c).tf.data.Dataset.shuffle now supports tf.data.UNKNOWN_CARDINALITY When doing a "full shuffle" using dataset = dataset.shuffle(dataset.cardinality()). But remember, a "full shuffle" will load the full dataset into memory so that it can be shuffled, so make sure to only use this with small datasets or datasets of small objects (like filenames).tf.math
tf.nn.top_k now supports specifying the output index type via parameter index_type. Supported types are tf.int16, tf.int32 (default), and tf.int64.tf.SavedModel
tf.saved_model.experimental.Fingerprint.from_proto(proto), which can be used to construct a Fingerprint object directly from a protobuf.tf.saved_model.experimental.Fingerprint.singleprint(), which provides a convenient way to uniquely identify a SavedModel.tf.Variable
tf.compat.v2.Variable instead of tf.compat.v1.Variable. Some checks for isinstance(v, tf compat.v1.Variable) that previously returned True may now return False.tf.distribute
tf.distribute.experimental.coordinator.get_current_worker_index, for retrieving the worker index from within a worker, when using parameter server training with a custom training loop.tf.experimental.dtensor
dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and functions will run on, it only sets a fallback default mesh.dtensor.Layout and dtensor.Mesh have slightly changed as part of efforts to consolidate the C++ and Python source code with pybind11. Most notably, dtensor.Layout.serialized_string is removed.tf.experimental.ExtensionType
tf.experimental.ExtensionType now supports Python tuple as the type annotation of its fields.tf.nest
tf.nest.is_sequence has now been deleted. Please use tf.nest.is_nested instead.Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
KerasClassifier and KerasRegressor), which had been deprecated in August 2021. We recommend using SciKeras instead.model.save("xyz.keras") will no longer create a H5 file, it will create a native Keras model file. This will only be breaking for you if you were manually inspecting or modifying H5 files saved by Keras under a .keras extension. If this breaks you, simply add save_format="h5" to your .save() call to revert back to the prior behavior.keras.utils.TimedThread utility to run a timed thread every x seconds. It can be used to run a threaded function alongside model training or any other snippet of code.keras PyPI package, accessible symbols are now restricted to symbols that are intended to be public. This may affect your code if you were using import keras and you used keras functions that were not public APIs, but were accessible in earlier versions with direct imports. In those cases, please use the following guideline:
- The API may be available in the public Keras API under a different name, so make sure to look for it on keras.io or TensorFlow docs and switch to the public version.
- It could also be a simple python or TF utility that you could easily copy over to your own codebase. In those case, just make it your own!
- If you believe it should definitely be a public Keras API, please open a feature request in keras GitHub repo.
- As a workaround, you could import the same private symbol keras keras.src, but keep in mind the src namespace is not stable and those APIs may change or be removed in the future.tf.keras.metrics.FBetaScore, tf.keras.metrics.F1Score, and tf.keras.metrics.R2Score.tf.keras.activations.mish.keras.metrics.experimental.PyMetric API for metrics that run Python code on the host CPU (compiled outside of the TensorFlow graph). This can be used for integrating metrics from external Python libraries (like sklearn or pycocotools) into Keras as first-class Keras metrics.tf.keras.optimizers.Lion optimizer.tf.keras.layers.SpectralNormalization layer wrapper to perform spectral normalization on the weights of a target layer.SidecarEvaluatorModelExport callback has been added to Keras as keras.callbacks.SidecarEvaluatorModelExport. This callback allows for exporting the model the best-scoring model as evaluated by a SidecarEvaluator evaluator. The evaluator regularly evaluates the model and exports it if the user-defined comparison function determines that it is an improvement.tf.keras.optimizers.schedules.CosineDecay learning rate scheduler. You can now specify an initial and target learning rate, and our scheduler will perform a linear interpolation between the two after which it will begin a decay phase.tf.distribute ParameterServerStrategy, via the exact_evaluation_shards argument in Model.fit and Model.evaluate.tf.keras.__internal__.KerasTensor,tf.keras.__internal__.SparseKerasTensor, and tf.keras.__internal__.RaggedKerasTensor classes. You can use these classes to do instance type checking and type annotations for layer/model inputs and outputs.tf.keras.dtensor.experimental.optimizers classes have been merged with tf.keras.optimizers. You can migrate your code to use tf.keras.optimizers directly. The API namespace for tf.keras.dtensor.experimental.optimizers will be removed in future releases.class_weight for 3+ dimensional targets (e.g. image segmentation masks) in Model.fit.keras.losses.CategoricalFocalCrossentropy.tf.keras.dtensor.experimental.layout_map_scope(). You can user the tf.keras.dtensor.experimental.LayoutMap.scope() instead.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, venkat2469, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Deprecated dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and function…
tf.lite
cast.experimental_disable_delegate_clustering to turn-off delegate clustering.expmirror_padspace_to_batch_nd and batch_to_space_ndless, greater_than, equalfloor_div and floor_mod.bitcast.bitwise_xorgather and gather_nd.right_shiftadd.mul.add_op supports broadcasting up to 6 dimensions.top_k.tf.function
tf.types.experimental.ConcreteFunction) as generated through get_concrete_function now performs holistic input validation similar to calling tf.function directly. This can cause breakages where existing calls pass Tensors with the wrong shape or omit certain non-Tensor arguments (including default values).tf.nn
tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse now support ids and weights described by tf.RaggedTensors.allow_fast_lookup to tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse, which enables a simplified and typically faster lookup procedure.tf.data
tf.data.Dataset.zip now supports Python-style zipping, i.e. Dataset.zip(a, b, c).tf.data.Dataset.shuffle now supports tf.data.UNKNOWN_CARDINALITY When doing a "full shuffle" using dataset = dataset.shuffle(dataset.cardinality()). But remember, a "full shuffle" will load the full dataset into memory so that it can be shuffled, so make sure to only use this with small datasets or datasets of small objects (like filenames).tf.math
tf.nn.top_k now supports specifying the output index type via parameter index_type. Supported types are tf.int16, tf.int32 (default), and tf.int64.tf.SavedModel
tf.saved_model.experimental.Fingerprint.from_proto(proto), which can be used to construct a Fingerprint object directly from a protobuf.tf.saved_model.experimental.Fingerprint.singleprint(), which provides a convenient way to uniquely identify a SavedModel.tf.Variable
tf.compat.v2.Variable instead of tf.compat.v1.Variable. Some checks for isinstance(v, tf compat.v1.Variable) that previously returned True may now return False.tf.distribute
tf.distribute.experimental.coordinator.get_current_worker_index, for retrieving the worker index from within a worker, when using parameter server training with a custom training loop.tf.experimental.dtensor
dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and functions will run on, it only sets a fallback default mesh.dtensor.Layout and dtensor.Mesh have slightly changed as part of efforts to consolidate the C++ and Python source code with pybind11. Most notably, dtensor.Layout.serialized_string is removed.tf.experimental.ExtensionType
tf.experimental.ExtensionType now supports Python tuple as the type annotation of its fields.tf.nest
tf.nest.is_sequence has now been deleted. Please use tf.nest.is_nested instead.Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
KerasClassifier and KerasRegressor), which had been deprecated in August 2021. We recommend using SciKeras instead.model.save("xyz.keras") will no longer create a H5 file, it will create a native Keras model file. This will only be breaking for you if you were manually inspecting or modifying H5 files saved by Keras under a .keras extension. If this breaks you, simply add save_format="h5" to your .save() call to revert back to the prior behavior.keras.utils.TimedThread utility to run a timed thread every x seconds. It can be used to run a threaded function alongside model training or any other snippet of code.keras PyPI package, accessible symbols are now restricted to symbols that are intended to be public. This may affect your code if you were using import keras and you used keras functions that were not public APIs, but were accessible in earlier versions with direct imports. In those cases, please use the following guideline:
- The API may be available in the public Keras API under a different name, so make sure to look for it on keras.io or TensorFlow docs and switch to the public version.
- It could also be a simple python or TF utility that you could easily copy over to your own codebase. In those case, just make it your own!
- If you believe it should definitely be a public Keras API, please open a feature request in keras GitHub repo.
- As a workaround, you could import the same private symbol keras keras.src, but keep in mind the src namespace is not stable and those APIs may change or be removed in the future.tf.keras.metrics.FBetaScore, tf.keras.metrics.F1Score, and tf.keras.metrics.R2Score.tf.keras.activations.mish.keras.metrics.experimental.PyMetric API for metrics that run Python code on the host CPU (compiled outside of the TensorFlow graph). This can be used for integrating metrics from external Python libraries (like sklearn or pycocotools) into Keras as first-class Keras metrics.tf.keras.optimizers.Lion optimizer.tf.keras.layers.SpectralNormalization layer wrapper to perform spectral normalization on the weights of a target layer.SidecarEvaluatorModelExport callback has been added to Keras as keras.callbacks.SidecarEvaluatorModelExport. This callback allows for exporting the model the best-scoring model as evaluated by a SidecarEvaluator evaluator. The evaluator regularly evaluates the model and exports it if the user-defined comparison function determines that it is an improvement.tf.keras.optimizers.schedules.CosineDecay learning rate scheduler. You can now specify an initial and target learning rate, and our scheduler will perform a linear interpolation between the two after which it will begin a decay phase.tf.distribute ParameterServerStrategy, via the exact_evaluation_shards argument in Model.fit and Model.evaluate.tf.keras.__internal__.KerasTensor,tf.keras.__internal__.SparseKerasTensor, and tf.keras.__internal__.RaggedKerasTensor classes. You can use these classes to do instance type checking and type annotations for layer/model inputs and outputs.tf.keras.dtensor.experimental.optimizers classes have been merged with tf.keras.optimizers. You can migrate your code to use tf.keras.optimizers directly. The API namespace for tf.keras.dtensor.experimental.optimizers will be removed in future releases.class_weight for 3+ dimensional targets (e.g. image segmentation masks) in Model.fit.keras.losses.CategoricalFocalCrossentropy.tf.keras.dtensor.experimental.layout_map_scope(). You can user the tf.keras.dtensor.experimental.LayoutMap.scope() instead.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, venkat2469, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Deprecated dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and function…
tf.lite
cast.experimental_disable_delegate_clustering to turn-off delegate clustering.expmirror_padspace_to_batch_nd and batch_to_space_ndless, greater_than, equalfloor_div and floor_mod.bitcast.bitwise_xorgather and gather_nd.right_shiftadd.mul.add_op supports broadcasting up to 6 dimensions.top_k.tf.function
tf.types.experimental.ConcreteFunction) as generated through get_concrete_function now performs holistic input validation similar to calling tf.function directly. This can cause breakages where existing calls pass Tensors with the wrong shape or omit certain non-Tensor arguments (including default values).tf.nn
tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse now support ids and weights described by tf.RaggedTensors.allow_fast_lookup to tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse, which enables a simplified and typically faster lookup procedure.tf.data
tf.data.Dataset.zip now supports Python-style zipping, i.e. Dataset.zip(a, b, c).tf.data.Dataset.shuffle now supports tf.data.UNKNOWN_CARDINALITY When doing a "full shuffle" using dataset = dataset.shuffle(dataset.cardinality()). But remember, a "full shuffle" will load the full dataset into memory so that it can be shuffled, so make sure to only use this with small datasets or datasets of small objects (like filenames).tf.math
tf.nn.top_k now supports specifying the output index type via parameter index_type. Supported types are tf.int16, tf.int32 (default), and tf.int64.tf.SavedModel
tf.saved_model.experimental.Fingerprint.from_proto(proto), which can be used to construct a Fingerprint object directly from a protobuf.tf.saved_model.experimental.Fingerprint.singleprint(), which provides a convenient way to uniquely identify a SavedModel.tf.Variable
tf.compat.v2.Variable instead of tf.compat.v1.Variable. Some checks for isinstance(v, tf compat.v1.Variable) that previously returned True may now return False.tf.distribute
tf.distribute.experimental.coordinator.get_current_worker_index, for retrieving the worker index from within a worker, when using parameter server training with a custom training loop.tf.experimental.dtensor
dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and functions will run on, it only sets a fallback default mesh.dtensor.Layout and dtensor.Mesh have slightly changed as part of efforts to consolidate the C++ and Python source code with pybind11. Most notably, dtensor.Layout.serialized_string is removed.tf.experimental.ExtensionType
tf.experimental.ExtensionType now supports Python tuple as the type annotation of its fields.tf.nest
tf.nest.is_sequence has now been deleted. Please use tf.nest.is_nested instead.Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
KerasClassifier and KerasRegressor), which had been deprecated in August 2021. We recommend using SciKeras instead.model.save("xyz.keras") will no longer create a H5 file, it will create a native Keras model file. This will only be breaking for you if you were manually inspecting or modifying H5 files saved by Keras under a .keras extension. If this breaks you, simply add save_format="h5" to your .save() call to revert back to the prior behavior.keras.utils.TimedThread utility to run a timed thread every x seconds. It can be used to run a threaded function alongside model training or any other snippet of code.keras PyPI package, accessible symbols are now restricted to symbols that are intended to be public. This may affect your code if you were using import keras and you used keras functions that were not public APIs, but were accessible in earlier versions with direct imports. In those cases, please use the following guideline:
- The API may be available in the public Keras API under a different name, so make sure to look for it on keras.io or TensorFlow docs and switch to the public version.
- It could also be a simple python or TF utility that you could easily copy over to your own codebase. In those case, just make it your own!
- If you believe it should definitely be a public Keras API, please open a feature request in keras GitHub repo.
- As a workaround, you could import the same private symbol keras keras.src, but keep in mind the src namespace is not stable and those APIs may change or be removed in the future.tf.keras.metrics.FBetaScore, tf.keras.metrics.F1Score, and tf.keras.metrics.R2Score.tf.keras.activations.mish.keras.metrics.experimental.PyMetric API for metrics that run Python code on the host CPU (compiled outside of the TensorFlow graph). This can be used for integrating metrics from external Python libraries (like sklearn or pycocotools) into Keras as first-class Keras metrics.tf.keras.optimizers.Lion optimizer.tf.keras.layers.SpectralNormalization layer wrapper to perform spectral normalization on the weights of a target layer.SidecarEvaluatorModelExport callback has been added to Keras as keras.callbacks.SidecarEvaluatorModelExport. This callback allows for exporting the model the best-scoring model as evaluated by a SidecarEvaluator evaluator. The evaluator regularly evaluates the model and exports it if the user-defined comparison function determines that it is an improvement.tf.keras.optimizers.schedules.CosineDecay learning rate scheduler. You can now specify an initial and target learning rate, and our scheduler will perform a linear interpolation between the two after which it will begin a decay phase.tf.distribute ParameterServerStrategy, via the exact_evaluation_shards argument in Model.fit and Model.evaluate.tf.keras.__internal__.KerasTensor,tf.keras.__internal__.SparseKerasTensor, and tf.keras.__internal__.RaggedKerasTensor classes. You can use these classes to do instance type checking and type annotations for layer/model inputs and outputs.tf.keras.dtensor.experimental.optimizers classes have been merged with tf.keras.optimizers. You can migrate your code to use tf.keras.optimizers directly. The API namespace for tf.keras.dtensor.experimental.optimizers will be removed in future releases.class_weight for 3+ dimensional targets (e.g. image segmentation masks) in Model.fit.keras.losses.CategoricalFocalCrossentropy.tf.keras.dtensor.experimental.layout_map_scope(). You can user the tf.keras.dtensor.experimental.LayoutMap.scope() instead.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, venkat2469, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Deprecated dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and function…
tf.lite
cast.experimental_disable_delegate_clustering to turn-off delegate clustering.expmirror_padspace_to_batch_nd and batch_to_space_ndless, greater_than, equalfloor_div and floor_mod.bitcast.bitwise_xorgather and gather_nd.right_shiftadd.mul.add_op supports broadcasting up to 6 dimensions.top_k.tf.function
tf.types.experimental.ConcreteFunction) as generated through get_concrete_function now performs holistic input validation similar to calling tf.function directly. This can cause breakages where existing calls pass Tensors with the wrong shape or omit certain non-Tensor arguments (including default values).tf.nn
tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse now support ids and weights described by tf.RaggedTensors.allow_fast_lookup to tf.nn.embedding_lookup_sparse and tf.nn.safe_embedding_lookup_sparse, which enables a simplified and typically faster lookup procedure.tf.data
tf.data.Dataset.zip now supports Python-style zipping, i.e. Dataset.zip(a, b, c).tf.data.Dataset.shuffle now supports full shuffling. To specify that data should be fully shuffled, use dataset = dataset.shuffle(dataset.cardinality()). This will load the full dataset into memory so that it can be shuffled, so make sure to only use this with datasets of filenames or other small datasets.tf.math
tf.nn.top_k now supports specifying the output index type via parameter index_type. Supported types are tf.int16, tf.int32 (default), and tf.int64.tf.SavedModel
tf.saved_model.experimental.Fingerprint.from_proto(proto), which can be used to construct a Fingerprint object directly from a protobuf.tf.saved_model.experimental.Fingerprint.singleprint(), which provides a convenient way to uniquely identify a SavedModel.tf.Variable
tf.compat.v2.Variable instead of tf.compat.v1.Variable. Some checks for isinstance(v, tf compat.v1.Variable) that previously returned True may now return False.tf.distribute
tf.distribute.experimental.coordinator.get_current_worker_index, for retrieving the worker index from within a worker, when using parameter server training with a custom training loop.tf.experimental.dtensor
dtensor.run_on in favor of dtensor.default_mesh to correctly indicate that the context does not override the mesh that the ops and functions will run on, it only sets a fallback default mesh.tf.experimental.ExtensionType
tf.experimental.ExtensionType now supports Python tuple as the type annotation of its fields.tf.nest
tf.nest.is_sequence has now been deleted. Please use tf.nest.is_nested instead.Keras is a framework built on top of the TensorFlow. See more details on the Keras website.
tf.keras
KerasClassifier and KerasRegressor), which had been deprecated in August 2021. We recommend using SciKeras instead.model.save("xyz.keras") will no longer create a H5 file, it will create a native Keras model file. This will only be breaking for you if you were manually inspecting or modifying H5 files saved by Keras under a .keras extension. If this breaks you, simply add save_format="h5" to your .save() call to revert back to the prior behavior.keras.utils.TimedThread utility to run a timed thread every x seconds. It can be used to run a threaded function alongside model training or any other snippet of code.keras PyPI package, accessible symbols are now restricted to symbols that are intended to be public. This may affect your code if you were using import keras and you used keras functions that were not public APIs, but were accessible in earlier versions with direct imports. In those cases, please use the following guideline:
keras.src, but keep in mind the src namespace is not stable and those APIs may change or be removed in the future.tf.keras
tf.keras.metrics.FBetaScore, tf.keras.metrics.F1Score, and tf.keras.metrics.R2Score.tf.keras.activations.mish.keras.metrics.experimental.PyMetric API for metrics that run Python code on the host CPU (compiled outside of the TensorFlow graph). This can be used for integrating metrics from external Python libraries (like sklearn or pycocotools) into Keras as first-class Keras metrics.tf.keras.optimizers.Lion optimizer.tf.keras.layers.SpectralNormalization layer wrapper to perform spectral normalization on the weights of a target layer.SidecarEvaluatorModelExport callback has been added to Keras as keras.callbacks.SidecarEvaluatorModelExport. This callback allows for exporting the model the best-scoring model as evaluated by a SidecarEvaluator evaluator. The evaluator regularly evaluates the model and exports it if the user-defined comparison function determines that it is an improvement.tf.keras.optimizers.schedules.CosineDecay learning rate scheduler. You can now specify an initial and target learning rate, and our scheduler will perform a linear interpolation between the two after which it will begin a decay phase.tf.distribute ParameterServerStrategy, via the exact_evaluation_shards argument in Model.fit and Model.evaluate.tf.keras.__internal__.KerasTensor,tf.keras.__internal__.SparseKerasTensor, and tf.keras.__internal__.RaggedKerasTensor classes. You can use these classes to do instance type checking and type annotations for layer/model inputs and outputs.tf.keras.dtensor.experimental.optimizers classes have been merged with tf.keras.optimizers. You can migrate your code to use tf.keras.optimizers directly. The API namespace for tf.keras.dtensor.experimental.optimizers will be removed in future releases.class_weight for 3+ dimensional targets (e.g. image segmentation masks) in Model.fit.keras.losses.CategoricalFocalCrossentropy.tf.keras.dtensor.experimental.layout_map_scope(). You can user the tf.keras.dtensor.experimental.LayoutMap.scope() instead.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, venkat2469, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
The use of the ambe config to build and test aarch64 is not needed. The ambe config will be removed in the future. Making cpu_arm64_pip.sh and cpu_arm
Fixes an FPE in TFLite in conv kernel CVE-2023-27579
Build, Compilation and Packaging
tensorflow-gpu and tf-nightly-gpu. These packages were removed and replaced with packages that direct users to switch to tensorflow or tf-nightly respectively. Since TensorFlow 2.1, the only difference between these two sets of packages was their names, so there is no loss of functionality or GPU support. See https://pypi.org/project/tensorflow-gpu for more details.tf.function:
tf.function now uses the Python inspect library directly for parsing the signature of the Python function it is decorated on. This change may break code where the function signature is malformed, but was ignored previously, such as:
functools.wraps on a function with different signaturefunctools.partial with an invalid tf.function inputtf.function now enforces input parameter names to be valid Python identifiers. Incompatible names are automatically sanitized similarly to existing SavedModel signature behavior.tf.functions are assumed to have an empty input_signature instead of an undefined one even if the input_signature is unspecified.tf.types.experimental.TraceType now requires an additional placeholder_value method to be defined.tf.function now traces with placeholder values generated by TraceType instead of the value itself.Experimental APIs tf.config.experimental.enable_mlir_graph_optimization and tf.config.experimental.disable_mlir_graph_optimization were removed.
Support for Python 3.11 has been added.
Support for Python 3.7 has been removed. We are not releasing any more patches for Python 3.7.
tf.lite:
fill.tf.experimental.dtensor:
dtensor.initialize_accelerator_system, and enabled by default.tf.experimental.dtensor.is_dtensor to check if a tensor is a DTensor instance.tf.data:
experimental_symbolic_checkpoint option of tf.data.Options().rerandomize_each_iteration argument for the tf.data.Dataset.random() operation, which controls whether the sequence of generated random numbers should be re-randomized every epoch or not (the default behavior). If seed is set and rerandomize_each_iteration=True, the random() operation will produce a different (deterministic) sequence of numbers every epoch.rerandomize_each_iteration argument for the tf.data.Dataset.sample_from_datasets() operation, which controls whether the sequence of generated random numbers used for sampling should be re-randomized every epoch or not. If seed is set and rerandomize_each_iteration=True, the sample_from_datasets() operation will use a different (deterministic) sequence of numbers every epoch.tf.test:
tf.test.experimental.sync_devices, which is useful for accurately measuring performance in benchmarks.tf.experimental.dtensor:
tf.SavedModel:
tf.saved_model.experimental.Fingerprint that contains the fingerprint of the SavedModel. See the SavedModel Fingerprinting RFC for details.tf.saved_model.experimental.read_fingerprint(export_dir) for reading the fingerprint of a SavedModel.tf.random
tf.random.split and tf.random.fold_in, the experimental endpoints are still available so no code changes are necessary.tf.experimental.ExtensionType
experimental.extension_type.as_dict(), which converts an instance of tf.experimental.ExtensionType to a dict representation.stream_executor
stream_executor directory has been deleted, users should use equivalent headers and targets under compiler/xla/stream_executor.tf.nn
tf.nn.experimental.general_dropout, which is similar to tf.random.experimental.stateless_dropout but accepts a custom sampler function.tf.types.experimental.GenericFunction
experimental_get_compiler_ir method supports tf.TensorSpec compilation arguments.tf.config.experimental.mlir_bridge_rollout
MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED and MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED which are no longer used by the tf2xla bridgeKeras is a framework built on top of the TensorFlow. See more details on the Keras website.
tf.keras:
keras.saving, for example: keras.saving.load_model, keras.saving.save_model, keras.saving.custom_object_scope, keras.saving.get_custom_objects, keras.saving.register_keras_serializable,keras.saving.get_registered_name and keras.saving.get_registered_object. The previous API locations (in keras.utils and keras.models) will be available indefinitely, but we recommend you update your code to point to the new API locations.tf.RaggedTensor or using keras masking, the returned loss values should be the identical to each other. In previous versions Keras may have silently ignored the mask.2.12 compared to previous versions.tf.keras:
.keras) is available. You can start using it via model.save(f"{fname}.keras", save_format="keras_v3"). In the future it will become the default for all files with the .keras extension. This file format targets the Python runtime only and makes it possible to reload Python objects identical to the saved originals. The format supports non-numerical state such as vocabulary files and lookup tables, and it is easy to customize in the case of custom layers with exotic elements of state (e.g. a FIFOQueue). The format does not rely on bytecode or pickling, and is safe by default. Note that as a result, Python lambdas are disallowed at loading time. If you want to use lambdas, you can pass safe_mode=False to the loading method (only do this if you trust the source of the model).model.export(filepath) API to create a lightweight SavedModel artifact that can be used for inference (e.g. with TF-Serving).keras.export.ExportArchive class for low-level customization of the process of exporting SavedModel artifacts for inference. Both ways of exporting models are based on tf.function tracing and produce a TF program composed of TF ops. They are meant primarily for environments where the TF runtime is available, but not the Python interpreter, as is typical for production with TF Serving.tf.keras.utils.FeatureSpace, a one-stop shop for structured data preprocessing and encoding.tf.SparseTensor input support to tf.keras.layers.Embedding layer. The layer now accepts a new boolean argument sparse. If sparse is set to True, the layer returns a SparseTensor instead of a dense Tensor. Defaults to False.jit_compile as a settable property to tf.keras.Model.synchronized optional parameter to layers.BatchNormalization.layers.experimental.SyncBatchNormalization and suggested to use layers.BatchNormalization with synchronized=True instead.tf.keras.layers.BatchNormalization to support masking of the inputs (mask argument) when computing the mean and variance.tf.keras.layers.Identity, a placeholder pass-through layer.show_trainable option to tf.keras.utils.model_to_dot to display layer trainable status in model plots.tf.keras.utils.FeatureSpace object, via feature_space.save("myfeaturespace.keras"), and reload it via feature_space = tf.keras.models.load_model("myfeaturespace.keras").tf.keras.utils.to_ordinal to convert class vector to ordinal regression / classification matrix.tf.raw_ops.Print CVE-2023-25660This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, Vinila S, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Added deprecation warning to layers.experimental.SyncBatchNormalization and suggested to use layers.BatchNormalization with synchronized=True instead.
Build, Compilation and Packaging
tensorflow-gpu and tf-nightly-gpu packages have been effectively removed and replaced with packages that direct users to switch to tensorflow or tf-nightly respectively. The naming difference was the only difference between the two sets of packages ever since TensorFlow 2.1, so there is no loss of functionality or GPU support. See https://pypi.org/project/tensorflow-gpu for more details.tf.function:
tf.function now uses the Python inspect library directly for parsing the signature of the Python function it is decorated on.functools.wraps on a function with different signaturefunctools.partial with an invalid tf.function inputtf.function now enforces input parameter names to be valid Python identifiers. Incompatible names are automatically sanitized similarly to existing SavedModel signature behavior.tf.functions are assumed to have an empty input_signature instead of an undefined one even if the input_signature is unspecified.tf.types.experimental.TraceType now requires an additional placeholder_value method to be defined.tf.function now traces with placeholder values generated by TraceType instead of the value itself.Experimental APIs tf.config.experimental.enable_mlir_graph_optimization and tf.config.experimental.disable_mlir_graph_optimization were removed.
tf.keras:
keras.saving, i.e. keras.saving.load_model, keras.saving.save_model, keras.saving.custom_object_scope, keras.saving.get_custom_objects, keras.saving.register_keras_serializable,keras.saving.get_registered_name and keras.saving.get_registered_object. The previous API locations (in keras.utils and keras.models) will stay available indefinitely, but we recommend that you update your code to point to the new API locations.tf.RaggedTensor or using keras masking, the returned loss values should be the identical to each other. In previous versions Keras may have silently ignored the mask.2.12 compared to previous versions.tf.lite:
fill.tf.keras:
.keras) is available. You can start using it via model.save(f"{fname}.keras", save_format="keras_v3"). In the future it will become the default for all files with the .keras extension. This file format targets the Python runtime only and makes it possible to reload Python objects identical to the saved originals. The format supports non-numerical state such as vocabulary files and lookup tables, and it is easy to customize in the case of custom layers with exotic elements of state (e.g. a FIFOQueue). The format does not rely on bytecode or pickling, and is safe by default. Note that as a result, Python lambdas are disallowed at loading time. If you want to use lambdas, you can pass safe_mode=False to the loading method (only do this if you trust the source of the model).model.export(filepath) API to create a lightweight SavedModel artifact that can be used for inference (e.g. with TF-Serving).keras.export.ExportArchive class for low-level customization of the process of exporting SavedModel artifacts for inference. Both ways of exporting models are based on tf.function tracing and produce a TF program composed of TF ops. They are meant primarily for environments where the TF runtime is available, but not the Python interpreter, as is typical for production with TF Serving.tf.keras.utils.FeatureSpace, a one-stop shop for structured data preprocessing and encoding.tf.SparseTensor input support to tf.keras.layers.Embedding layer. The layer now accepts a new boolean argument sparse. If sparse is set to True, the layer returns a SparseTensor instead of a dense Tensor. Defaults to False.jit_compile as a settable property to tf.keras.Model.synchronized optional parameter to layers.BatchNormalization.layers.experimental.SyncBatchNormalization and suggested to use layers.BatchNormalization with synchronized=True instead.tf.keras.layers.BatchNormalization to support masking of the inputs (mask argument) when computing the mean and variance.tf.keras.layers.Identity, a placeholder pass-through layer.show_trainable option to tf.keras.utils.model_to_dot to display layer trainable status in model plots.tf.keras.utils.FeatureSpace object, via feature_space.save("myfeaturespace.keras"), and reload it via feature_space = tf.keras.models.load_model("myfeaturespace.keras").tf.keras.utils.to_ordinal to convert class vector to ordinal regression / classification matrix.tf.experimental.dtensor:
dtensor.initialize_accelerator_system, and enabled by default.tf.experimental.dtensor.is_dtensor to check if a tensor is a DTensor instance.tf.data:
experimental_symbolic_checkpoint option of tf.data.Options().rerandomize_each_iteration argument for the tf.data.Dataset.random() operation, which controls whether the sequence of generated random numbers should be re-randomized every epoch or not (the default behavior). If seed is set and rerandomize_each_iteration=True, the random() operation will produce a different (deterministic) sequence of numbers every epoch.rerandomize_each_iteration argument for the tf.data.Dataset.sample_from_datasets() operation, which controls whether the sequence of generated random numbers used for sampling should be re-randomized every epoch or not. If seed is set and rerandomize_each_iteration=True, the sample_from_datasets() operation will use a different (deterministic) sequence of numbers every epoch.tf.test:
tf.test.experimental.sync_devices, which is useful for accurately measuring performance in benchmarks.tf.experimental.dtensor:
tf.SavedModel:
tf.saved_model.experimental.Fingerprint that contains the fingerprint of the SavedModel. See the SavedModel Fingerprinting RFC for details.tf.saved_model.experimental.read_fingerprint(export_dir) for reading the fingerprint of a SavedModel.tf.random
tf.random.split and tf.random.fold_in, the experimental endpoints are still available so no code changes are necessary.tf.experimental.ExtensionType
experimental.extension_type.as_dict(), which converts an instance of tf.experimental.ExtensionType to a dict representation.stream_executor
stream_executor directory has been deleted, users should use equivalent headers and targets under compiler/xla/stream_executor.tf.nn
tf.nn.experimental.general_dropout, which is similar to tf.random.experimental.stateless_dropout but accepts a custom sampler function.tf.types.experimental.GenericFunction
experimental_get_compiler_ir method supports tf.TensorSpec compilation arguments.tf.config.experimental.mlir_bridge_rollout
MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED and MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED which are no longer used by the tf2xla bridgeThis release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, Vinila S, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Added deprecation warning to layers.experimental.SyncBatchNormalization and suggested to use layers.BatchNormalization with synchronized=True instead.
Build, Compilation and Packaging
tensorflow-gpu and tf-nightly-gpu packages have been effectively removed and replaced with packages that direct users to switch to tensorflow or tf-nightly respectively. The naming difference was the only difference between the two sets of packages ever since TensorFlow 2.1, so there is no loss of functionality or GPU support. See https://pypi.org/project/tensorflow-gpu for more details.tf.function:
tf.function now uses the Python inspect library directly for parsing the signature of the Python function it is decorated on.functools.wraps on a function with different signaturefunctools.partial with an invalid tf.function inputtf.function now enforces input parameter names to be valid Python identifiers. Incompatible names are automatically sanitized similarly to existing SavedModel signature behavior.tf.functions are assumed to have an empty input_signature instead of an undefined one even if the input_signature is unspecified.tf.types.experimental.TraceType now requires an additional placeholder_value method to be defined.tf.function now traces with placeholder values generated by TraceType instead of the value itself.Experimental APIs tf.config.experimental.enable_mlir_graph_optimization and tf.config.experimental.disable_mlir_graph_optimization were removed.
tf.keras:
keras.saving, i.e. keras.saving.load_model, keras.saving.save_model, keras.saving.custom_object_scope, keras.saving.get_custom_objects, keras.saving.register_keras_serializable,keras.saving.get_registered_name and keras.saving.get_registered_object. The previous API locations (in keras.utils and keras.models) will stay available indefinitely, but we recommend that you update your code to point to the new API locations.tf.RaggedTensor or using keras masking, the returned loss values should be the identical to each other. In previous versions Keras may have silently ignored the mask.2.12 compared to previous versions.tf.SavedModel:
tf.saved_model.experimental.Fingerprint that contains the fingerprint of the SavedModel. See the SavedModel Fingerprinting RFC for details.tf.saved_model.experimental.read_fingerprint(export_dir) for reading the fingerprint of a SavedModel.tf.lite:
fill.tf.keras:
.keras) is available. You can start using it via model.save(f"{fname}.keras", save_format="keras_v3"). In the future it will become the default for all files with the .keras extension. This file format targets the Python runtime only and makes it possible to reload Python objects identical to the saved originals. The format supports non-numerical state such as vocabulary files and lookup tables, and it is easy to customize in the case of custom layers with exotic elements of state (e.g. a FIFOQueue). The format does not rely on bytecode or pickling, and is safe by default. Note that as a result, Python lambdas are disallowed at loading time. If you want to use lambdas, you can pass safe_mode=False to the loading method (only do this if you trust the source of the model).model.export(filepath) API to create a lightweight SavedModel artifact that can be used for inference (e.g. with TF-Serving).keras.export.ExportArchive class for low-level customization of the process of exporting SavedModel artifacts for inference. Both ways of exporting models are based on tf.function tracing and produce a TF program composed of TF ops. They are meant primarily for environments where the TF runtime is available, but not the Python interpreter, as is typical for production with TF Serving.tf.keras.utils.FeatureSpace, a one-stop shop for structured data preprocessing and encoding.tf.SparseTensor input support to tf.keras.layers.Embedding layer. The layer now accepts a new boolean argument sparse. If sparse is set to True, the layer returns a SparseTensor instead of a dense Tensor. Defaults to False.jit_compile as a settable property to tf.keras.Model.synchronized optional parameter to layers.BatchNormalization.layers.experimental.SyncBatchNormalization and suggested to use layers.BatchNormalization with synchronized=True instead.tf.keras.layers.BatchNormalization to support masking of the inputs (mask argument) when computing the mean and variance.tf.keras.layers.Identity, a placeholder pass-through layer.show_trainable option to tf.keras.utils.model_to_dot to display layer trainable status in model plots.tf.keras.utils.FeatureSpace object, via feature_space.save("myfeaturespace.keras"), and reload it via feature_space = tf.keras.models.load_model("myfeaturespace.keras").tf.keras.utils.to_ordinal to convert class vector to ordinal regression / classification matrix.tf.experimental.dtensor:
dtensor.initialize_accelerator_system, and enabled by default.tf.experimental.dtensor.is_dtensor to check if a tensor is a DTensor instance.tf.data:
experimental_symbolic_checkpoint option of tf.data.Options().rerandomize_each_iteration argument for the tf.data.Dataset.random() operation, which controls whether the sequence of generated random numbers should be re-randomized every epoch or not (the default behavior). If seed is set and rerandomize_each_iteration=True, the random() operation will produce a different (deterministic) sequence of numbers every epoch.rerandomize_each_iteration argument for the tf.data.Dataset.sample_from_datasets() operation, which controls whether the sequence of generated random numbers used for sampling should be re-randomized every epoch or not. If seed is set and rerandomize_each_iteration=True, the sample_from_datasets() operation will use a different (deterministic) sequence of numbers every epoch.tf.test:
tf.test.experimental.sync_devices, which is useful for accurately measuring performance in benchmarks.tf.experimental.dtensor:
tf.random
tf.random.split and tf.random.fold_in, the experimental endpoints are still available so no code changes are necessary.tf.experimental.ExtensionType
experimental.extension_type.as_dict(), which converts an instance of tf.experimental.ExtensionType to a dict representation.stream_executor
stream_executor directory has been deleted, users should use equivalent headers and targets under compiler/xla/stream_executor.tf.nn
tf.nn.experimental.general_dropout, which is similar to tf.random.experimental.stateless_dropout but accepts a custom sampler function.tf.types.experimental.GenericFunction
experimental_get_compiler_ir method supports tf.TensorSpec compilation arguments.tf.config.experimental.mlir_bridge_rollout
MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED and MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED which are no longer used by the tf2xla bridgeThis release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar, Aakar Dwivedi, Abinash Satapathy, Aditya Kane, ag.ramesh, Alexander Grund, Andrei Pikas, andreii, Andrew Goodbody, angerson, Anthony_256, Ashay Rane, Ashiq Imran, Awsaf, Balint Cristian, Banikumar Maiti (Intel Aipg), Ben Barsdell, bhack, cfRod, Chao Chen, chenchongsong, Chris Mc, Daniil Kutz, David Rubinstein, dianjiaogit, dixr, Dongfeng Yu, dongfengy, drah, Eric Kunze, Feiyue Chen, Frederic Bastien, Gauri1 Deshpande, guozhong.zhuang, hDn248, HYChou, ingkarat, James Hilliard, Jason Furmanek, Jaya, Jens Glaser, Jerry Ge, Jiao Dian'S Power Plant, Jie Fu, Jinzhe Zeng, Jukyy, Kaixi Hou, Kanvi Khanna, Karel Ha, karllessard, Koan-Sin Tan, Konstantin Beluchenko, Kulin Seth, Kun Lu, Kyle Gerard Felker, Leopold Cambier, Lianmin Zheng, linlifan, liuyuanqiang, Lukas Geiger, Luke Hutton, Mahmoud Abuzaina, Manas Mohanty, Mateo Fidabel, Maxiwell S. Garcia, Mayank Raunak, mdfaijul, meatybobby, Meenakshi Venkataraman, Michael Holman, Nathan John Sircombe, Nathan Luehr, nitins17, Om Thakkar, Patrice Vignola, Pavani Majety, per1234, Philipp Hack, pollfly, Prianka Liz Kariat, Rahul Batra, rahulbatra85, ratnam.parikh, Rickard Hallerbäck, Roger Iyengar, Rohit Santhanam, Roman Baranchuk, Sachin Muradi, sanadani, Saoirse Stewart, seanshpark, Shawn Wang, shuw, Srinivasan Narayanamoorthy, Stewart Miles, Sunita Nadampalli, SuryanarayanaY, Takahashi Shuuji, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tirumalesh, TJ, Tony Sung, Trevor Morris, unda, Vertexwahn, Vinila S, William Muir, Xavier Bonaventura, xiang.zhang, Xiao-Yong Jin, yleeeee, Yong Tang, Yuriy Chernyshov, Zhang, Xiangze, zhaozheng09
Security vulnerability fixes will no longer be patched to this Tensorflow version. The latest Tensorflow version includes the security vulnerability f…
Note: TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install TensorFlow in WSL2, or install tensorflow-cpu and, optionally, try the TensorFlow-DirectML-Plugin.
This release also introduces several vulnerability fixes:
tf.raw_ops.Print CVE-2023-25660TF is currently using giflib 5.2.1 which has CVE-2022-28506. TF is not affected by the CVE as it does not use DumpScreen2RGB at all.
The tf.keras.optimizers.Optimizer base class now points to the new Keras optimizer, while the old optimizers have been moved to the tf.keras.optimizers.legacy namespace.
If you find your workflow failing due to this change, you may be facing one of the following issues:
tf.keras.optimizer.legacy.XXX (e.g. tf.keras.optimizer.legacy.Adam).tf.keras.optimizers.Optimizer, does not support TF1 any more, so please use the legacy optimizer tf.keras.optimizer.legacy.XXX. We highly recommend migrating your workflow to TF2 for stable support and new features.tf.keras.optimizers.Optimizer, has a different set of public APIs from the old optimizer. These API changes are mostly related to getting rid of slot variables and TF1 support. Please check the API documentation to find alternatives to the missing API. If you must call the deprecated API, please change your optimizer to the legacy optimizer.tf.keras.optimizers.schedules.LearningRateSchedule, the new optimizer's learning_rate property returns the current learning rate value instead of a LearningRateSchedule object as before. If you need to access the LearningRateSchedule object, please use optimizer._learning_rate.tf.keras.optimizer.legacy.XXX. If you want to migrate to the new optimizer and find it does not support your optimizer, please file an issue in the Keras GitHub repo.Cannot recognize variable.... The new optimizer requires all optimizer variables to be created at the first apply_gradients() or minimize() call. If your workflow calls the optimizer to update different parts of the model in multiple stages, please call optimizer.build(model.trainable_variables) before the training loop.The old Keras optimizer will never be deleted, but will not see any new feature additions. New optimizers (for example, tf.keras.optimizers.Adafactor) will only be implemented based on the new tf.keras.optimizers.Optimizer base class.
tensorflow/python/keras code is a legacy copy of Keras since the TensorFlow v2.7 release, and will be deleted in the v2.12 release. Please remove any import of tensorflow.python.keras and use the public API with from tensorflow import keras or import tensorflow as tf; tf.keras.
tf.lite:
tf.math.unsorted_segment_sum, tf.atan2 and tf.sign.tfl.mul now supports complex32 inputs.tf.experimental.StructuredTensor:
tf.experimental.StructuredTensor, which provides a flexible and TensorFlow-native way to encode structured data such as protocol buffers or pandas dataframes.tf.keras:
get_metrics_result() method to tf.keras.models.Model.
tf.keras.layers.GroupNormalization.weight_decay argument.tf.keras.optimizers.Adafactor.warmstart_embedding_matrix to tf.keras.utils.
tf.Variable:
CompositeTensor as a base class to ResourceVariable.
tf.Variables to be nested in tf.experimental.ExtensionTypes.experimental_enable_variable_lifting to tf.Variable, defaulting to True.
False, the variable won't be lifted out of tf.function; thus it can be used as a tf.function-local variable: during each execution of the tf.function, the variable will be created and then disposed, similar to a local (that is, stack-allocated) variable in C/C++. Currently, experimental_enable_variable_lifting=False only works on non-XLA devices (for example, under @tf.function(jit_compile=False)).TF SavedModel:
fingerprint.pb to the SavedModel directory. The fingerprint.pb file is a protobuf containing the "fingerprint" of the SavedModel. See the RFC for more details regarding its design and properties.TF pip:
tensorflow or tensorflow-cpu would install Intel's tensorflow-intel package. These packages are provided on an as-is basis. TensorFlow will use reasonable efforts to maintain the availability and integrity of this pip package. There may be delays if the third party fails to release the pip package. For using TensorFlow GPU on Windows, you will need to install TensorFlow in WSL2.tf.image:
return_index_map to tf.image.ssim, which causes the returned value to be the local SSIM map instead of the global mean.TF Core:
tf.custom_gradient can now be applied to functions that accept "composite" tensors, such as tf.RaggedTensor, as inputs.experimental_follow_type_hints for tf.function has been deprecated. Please use input_signature or reduce_retracing to minimize retracing.tf.SparseTensor:
set_shape, which sets the static dense shape of the sparse tensor and has the same semantics as tf.Tensor.set_shape.DumpScreen2RGB at all.DynamicStitch due to missing validation (CVE-2022-41883)tf.keras.losses.poisson (CVE-2022-41887)ThreadUnsafeUnigramCandidateSampler caused by missing validation (CVE-2022-41880)ndarray_tensor_bridge (CVE-2022-41884)FusedResizeAndPadConv2D (CVE-2022-41885)ImageProjectiveTransformV2 (CVE-2022-41886)tf.image.generate_bounding_box_proposals on GPU (CVE-2022-41888)pywrap_tfe_src caused by invalid attributes (CVE-2022-41889)CHECK fail in BCast (CVE-2022-41890)TensorListConcat (CVE-2022-41891)CHECK_EQ fail in TensorListResize (CVE-2022-41893)CONV_3D_TRANSPOSE on TFLite (CVE-2022-41894)MirrorPadGrad (CVE-2022-41895)Mfcc (CVE-2022-41896)FractionalMaxPoolGrad (CVE-2022-41897)CHECK fail in SparseFillEmptyRowsGrad (CVE-2022-41898)CHECK fail in SdcaOptimizer (CVE-2022-41899)FractionalAvgPool and FractionalMaxPool(CVE-2022-41900)CHECK_EQ in SparseMatrixNNZ (CVE-2022-41901)ResizeNearestNeighborGrad (CVE-2022-41907)CHECK fail in PyFunc (CVE-2022-41908)CompositeTensorVariantToComponents (CVE-2022-41909)QuantizeAndDequantizeV2 (CVE-2022-41910)CHECK failure in SobolSample via missing validation (CVE-2022-35935)CHECK fail in TensorListScatter and TensorListScatterV2 in eager mode (CVE-2022-35935)This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar Dwivedi, Alexander Grund, alif_elham, Aman Agarwal, amoitra, Andrei Ivanov, andreii, Andrew Goodbody, angerson, Ashay Rane, Azeem Shaikh, Ben Barsdell, bhack, Bhavani Subramanian, Cedric Nugteren, Chandra Kumar Ramasamy, Christopher Bate, CohenAriel, Cotarou, cramasam, Enrico Minack, Francisco Unda, Frederic Bastien, gadagashwini, Gauri1 Deshpande, george, Jake, Jeff, Jerry Ge, Jingxuan He, Jojimon Varghese, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, kcoul, Keith Smiley, Kevin Hu, Kun Lu, kushanam, Lianmin Zheng, liuyuanqiang, Louis Sugy, Mahmoud Abuzaina, Marius Brehler, mdfaijul, Meenakshi Venkataraman, Milos Puzovic, mohantym, Namrata-Ibm, Nathan John Sircombe, Nathan Luehr, Olaf Lipinski, Om Thakkar, Osman F Bayram, Patrice Vignola, Pavani Majety, Philipp Hack, Prianka Liz Kariat, Rahul Batra, RajeshT, Renato Golin, riestere, Roger Iyengar, Rohit Santhanam, Rsanthanam-Amd, Sadeed Pv, Samuel Marks, Shimokawa, Naoaki, Siddhesh Kothadi, Simengliu-Nv, Sindre Seppola, snadampal, Srinivasan Narayanamoorthy, sushreebarsa, syedshahbaaz, Tamas Bela Feher, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tom Anderson, Tomohiro Endo, Trevor Morris, vibhutisawant, Victor Zhang, Vremold, Xavier Bonaventura, Yanming Wang, Yasir Modak, Yimei Sun, Yong Tang, Yulv-Git, zhuoran.liu, zotanika
Please check the API documentation to find alternatives to the missing API. If you must call the deprecated API, please change your optimizer to the l…
tf.keras.optimizers.Optimizer now points to the new Keras optimizer, and old optimizers have moved to the tf.keras.optimizers.legacy namespace.
If you find your workflow failing due to this change, you may be facing one of the following issues:
tf.keras.optimizer.legacy.XXX (e.g. tf.keras.optimizer.legacy.Adam).tf.keras.optimizers.Optimizer, does not support TF1 any more, so please use the legacy optimizer tf.keras.optimizer.legacy.XXX. We highly recommend to migrate your workflow to TF2 for stable support and new features.tf.keras.optimizers.Optimizer, has a different set of public APIs from the old
optimizer. These API changes are mostly related to getting rid of slot variables and TF1 support. Please check the API documentation to find alternatives to the missing API. If you must call the deprecated API, please change your optimizer to the legacy optimizer.LearningRateSchedule, The new optimizer's learning_rate property returns the current learning rate value instead of a LearningRateSchedule object as before. If you need to access the LearningRateSchedule object, please use optimizer._learning_rate.tf.keras.optimizer.legacy.XXX. If you want to migrate to the new optimizer and find it does not support your optimizer, please file an issue in the Keras GitHub repo.Cannot recognize variable.... The new optimizer requires all optimizer variables to be created at the first apply_gradients() or minimize() call. If your workflow calls the optimizer to update different parts of the model in multiple stages, please call optimizer.build(model.trainable_variables) before the training loop.The old Keras optimizer will never be deleted, but will not see any new feature additions. New optimizers (for example, tf.keras.optimizers.Adafactor) will only be implemented based on tf.keras.optimizers.Optimizer, the new base class.
tensorflow/python/keras code is a legacy copy of Keras since 2.7 release, and will be deleted in 2.12 release. Please remove any import of tensorflow.python.keras and use public API with from tensorflow import keras or import tensorflow as tf; tf.keras.
tf.lite:
tf.unsortedsegmentmin, tf.atan2 and tf.sign.tfl.mul now supports complex32 inputs.tf.experimental.StructuredTensor
tf.experimental.StructuredTensor, which provides a flexible and TensorFlow-native way to encode structured data such as protocol buffers or pandas dataframes.tf.keras:
get_metrics_result() method to tf.keras.models.Model.
tf.keras.layers.GroupNormalization.tf.keras.optimizers.Adafactor.warmstart_embedding_matrix to tf.keras.utils.
tf.Variable:
CompositeTensor as a baseclass to ResourceVariable.
tf.Variables to be nested in tf.experimental.ExtensionTypes.experimental_enable_variable_lifting to tf.Variable, defaulting to True.
False, the variable won't be lifted out of tf.function, thus it can be used as a tf.function-local variable: during each execution of the tf.function, the variable will be created and then disposed, similar to a local (that is, stack-allocated) variable in C/C++. Currently, experimental_enable_variable_lifting=False only works on non-XLA devices (for example, under @tf.function(jit_compile=False)).TF SavedModel:
fingerprint.pb to the SavedModel directory. The fingerprint.pb file is a protobuf containing the "fingerprint" of the SavedModel. See the RFC for more details regarding its design and properties.TF pip:
tensorflow or tensorflow-cpu would install Intel's tensorflow-intel package. These packages are provided as-is. Tensorflow will use reasonable efforts to maintain the availability and integrity of this pip package. There may be delays if the third party fails to release the pip package. For using TensorFlow GPU on Windows, you will need to install TensorFlow in WSL2.tf.image
return_index_map to tf.image.ssim which causes the returned value to be the local SSIM map instead of the global mean.TF Core:
tf.custom_gradient can now be applied to functions that accept "composite" tensors, such as tf.RaggedTensor, as inputs.experimental_follow_type_hints for tf.function has been deprecated. Please use input_signature or reduce_retracing to minimize retracing.tf.SparseTensor:
set_shape, which sets the static dense shape of the sparse tensor and has the same semantics as tf.Tensor.set_shape.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar Dwivedi, Alexander Grund, alif_elham, Aman Agarwal, amoitra, Andrei Ivanov, andreii, Andrew Goodbody, angerson, Ashay Rane, Azeem Shaikh, Ben Barsdell, bhack, Bhavani Subramanian, Cedric Nugteren, Chandra Kumar Ramasamy, Christopher Bate, CohenAriel, Cotarou, cramasam, Enrico Minack, Francisco Unda, Frederic Bastien, gadagashwini, Gauri1 Deshpande, george, Jake, Jeff, Jerry Ge, Jingxuan He, Jojimon Varghese, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, kcoul, Keith Smiley, Kevin Hu, Kun Lu, kushanam, Lianmin Zheng, liuyuanqiang, Louis Sugy, Mahmoud Abuzaina, Marius Brehler, mdfaijul, Meenakshi Venkataraman, Milos Puzovic, mohantym, Namrata-Ibm, Nathan John Sircombe, Nathan Luehr, Olaf Lipinski, Om Thakkar, Osman F Bayram, Patrice Vignola, Pavani Majety, Philipp Hack, Prianka Liz Kariat, Rahul Batra, RajeshT, Renato Golin, riestere, Roger Iyengar, Rohit Santhanam, Rsanthanam-Amd, Sadeed Pv, Samuel Marks, Shimokawa, Naoaki, Siddhesh Kothadi, Simengliu-Nv, Sindre Seppola, snadampal, Srinivasan Narayanamoorthy, sushreebarsa, syedshahbaaz, Tamas Bela Feher, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tom Anderson, Tomohiro Endo, Trevor Morris, vibhutisawant, Victor Zhang, Vremold, Xavier Bonaventura, Yanming Wang, Yasir Modak, Yimei Sun, Yong Tang, Yulv-Git, zhuoran.liu, zotanika
Please check the API documentation to find alternatives to the missing API. If you must call the deprecated API, please change your optimizer to the l…
tf.keras.optimizers.Optimizer now points to the new Keras optimizer, and old optimizers have moved to the tf.keras.optimizers.legacy namespace.
If you find your workflow failing due to this change, you may be facing one of the following issues:
tf.keras.optimizer.legacy.XXX (e.g. tf.keras.optimizer.legacy.Adam).tf.keras.optimizers.Optimizer, does not support TF1 any more, so please use the legacy optimizer
tf.keras.optimizer.legacy.XXX.
We highly recommend to migrate your workflow to TF2 for stable support and new features.tf.keras.optimizers.Optimizer, has a different set of public APIs from the old optimizer.
These API changes are mostly related to getting rid of slot variables and TF1 support. Please check the API documentation to find alternatives
to the missing API. If you must call the deprecated API, please change your optimizer to the legacy optimizer.LearningRateSchedule, The new optimizer's learning_rate property returns the
current learning rate value instead of a LearningRateSchedule object as before. If you need to access the LearningRateSchedule object,
please use optimizer._learning_rate.tf.keras.optimizer.legacy.XXX. If you want to migrate to the new optimizer and find it does not support your optimizer, please file
an issue in the Keras GitHub repo.Cannot recognize variable.... The new optimizer requires all optimizer variables to be created at the first
apply_gradients() or minimize() call. If your workflow calls optimizer to update different parts of model in multiple stages,
please call optimizer.build(model.trainable_variables) before the training loop.The old Keras optimizer will never be deleted, but will not see any new feature additions. New optimizers (for example,
tf.keras.optimizers.Adafactor) will only be implemented based on tf.keras.optimizers.Optimizer, the new base class.
tf.lite:
tf.unsortedsegmentmin, tf.atan2 and tf.sign.tfl.mul now supports complex32 inputs.tf.experimental.StructuredTensor
tf.experimental.StructuredTensor, which provides a flexible and TensorFlow-native way to encode structured data such as protocol
buffers or pandas dataframes.tf.keras:
get_metrics_result() method to tf.keras.models.Model.
tf.keras.layers.GroupNormalization.tf.keras.optimizers.Adafactor.warmstart_embedding_matrix to tf.keras.utils.
tf.Variable:
CompositeTensor as a baseclass to ResourceVariable.
tf.Variables to be nested in tf.experimental.ExtensionTypes.experimental_enable_variable_lifting to tf.Variable, defaulting to True.
False, the variable won't be lifted out of tf.function, thus it can be used as a tf.function-local variable: during each
execution of the tf.function, the variable will be created and then disposed, similar to a local (that is, stack-allocated) variable in C/C++.
Currently, experimental_enable_variable_lifting=False only works on non-XLA devices (for example, under @tf.function(jit_compile=False)).TF SavedModel:
fingerprint.pb to the SavedModel directory. The fingerprint.pb file is a protobuf containing the "fingerprint" of the SavedModel. See
the RFC for more details regarding its design and properties.TF pip:
tensorflow or tensorflow-cpu would install Intel's tensorflow-intel package. These packages are provided as-is. Tensorflow
will use reasonable efforts to maintain the availability and integrity of this pip package. There may be delays if the third party fails to
release the pip package. For using TensorFlow GPU on Windows, you will need to install TensorFlow in WSL2.tf.image
return_index_map to tf.image.ssim which causes the returned value to be the local SSIM map instead of the global
mean.TF Core:
tf.custom_gradient can now be applied to functions that accept "composite" tensors, such as tf.RaggedTensor, as inputs.experimental_follow_type_hints for tf.function has been deprecated. Please use input_signature or reduce_retracing to minimize retracing.tf.SparseTensor:
set_shape, which sets the static dense shape of the sparse tensor and has the same semantics as tf.Tensor.set_shape.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar Dwivedi, Alexander Grund, alif_elham, Aman Agarwal, amoitra, Andrei Ivanov, andreii, Andrew Goodbody, angerson, Ashay Rane, Azeem Shaikh, Ben Barsdell, bhack, Bhavani Subramanian, Cedric Nugteren, Chandra Kumar Ramasamy, Christopher Bate, CohenAriel, Cotarou, cramasam, Enrico Minack, Francisco Unda, Frederic Bastien, gadagashwini, Gauri1 Deshpande, george, Jake, Jeff, Jerry Ge, Jingxuan He, Jojimon Varghese, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, kcoul, Keith Smiley, Kevin Hu, Kun Lu, kushanam, Lianmin Zheng, liuyuanqiang, Louis Sugy, Mahmoud Abuzaina, Marius Brehler, mdfaijul, Meenakshi Venkataraman, Milos Puzovic, mohantym, Namrata-Ibm, Nathan John Sircombe, Nathan Luehr, Olaf Lipinski, Om Thakkar, Osman F Bayram, Patrice Vignola, Pavani Majety, Philipp Hack, Prianka Liz Kariat, Rahul Batra, RajeshT, Renato Golin, riestere, Roger Iyengar, Rohit Santhanam, Rsanthanam-Amd, Sadeed Pv, Samuel Marks, Shimokawa, Naoaki, Siddhesh Kothadi, Simengliu-Nv, Sindre Seppola, snadampal, Srinivasan Narayanamoorthy, sushreebarsa, syedshahbaaz, Tamas Bela Feher, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tom Anderson, Tomohiro Endo, Trevor Morris, vibhutisawant, Victor Zhang, Vremold, Xavier Bonaventura, Yanming Wang, Yasir Modak, Yimei Sun, Yong Tang, Yulv-Git, zhuoran.liu, zotanika
Please check the API documentation to find alternatives to the missing API. If you must call the deprecated API, please change your optimizer to the l…
tf.keras.optimizers.Optimizer now points to the new Keras optimizer, and old optimizers have moved to the tf.keras.optimizers.legacy namespace.
If you find your workflow failing due to this change, you may be facing one of the following issues:
tf.keras.optimizer.legacy.XXX (e.g. tf.keras.optimizer.legacy.Adam).tf.keras.optimizers.Optimizer, does not support TF1 any more, so please use the legacy optimizer
tf.keras.optimizer.legacy.XXX.
We highly recommend to migrate your workflow to TF2 for stable support and new features.tf.keras.optimizers.Optimizer, has a different set of public APIs from the old optimizer.
These API changes are mostly related to getting rid of slot variables and TF1 support. Please check the API documentation to find alternatives
to the missing API. If you must call the deprecated API, please change your optimizer to the legacy optimizer.LearningRateSchedule, The new optimizer's learning_rate property returns the
current learning rate value instead of a LearningRateSchedule object as before. If you need to access the LearningRateSchedule object,
please use optimizer._learning_rate.tf.keras.optimizer.legacy.XXX. If you want to migrate to the new optimizer and find it does not support your optimizer, please file
an issue in the Keras GitHub repo.Cannot recognize variable.... The new optimizer requires all optimizer variables to be created at the first
apply_gradients() or minimize() call. If your workflow calls optimizer to update different parts of model in multiple stages,
please call optimizer.build(model.trainable_variables) before the training loop.The old Keras optimizer will never be deleted, but will not see any new feature additions. New optimizers (for example,
tf.keras.optimizers.Adafactor) will only be implemented based on tf.keras.optimizers.Optimizer, the new base class.
tf.lite:
tf.unsortedsegmentmin, tf.atan2 and tf.sign.tfl.mul now supports complex32 inputs.tf.experimental.StructuredTensor
tf.experimental.StructuredTensor, which provides a flexible and TensorFlow-native way to encode structured data such as protocol
buffers or pandas dataframes.tf.keras:
get_metrics_result() method to tf.keras.models.Model.
tf.keras.layers.GroupNormalization.tf.keras.optimizers.Adafactor.warmstart_embedding_matrix to tf.keras.utils.
tf.Variable:
CompositeTensor as a baseclass to ResourceVariable.
tf.Variables to be nested in tf.experimental.ExtensionTypes.experimental_enable_variable_lifting to tf.Variable, defaulting to True.
False, the variable won't be lifted out of tf.function, thus it can be used as a tf.function-local variable: during each
execution of the tf.function, the variable will be created and then disposed, similar to a local (that is, stack-allocated) variable in C/C++.
Currently, experimental_enable_variable_lifting=False only works on non-XLA devices (for example, under @tf.function(jit_compile=False)).TF SavedModel:
fingerprint.pb to the SavedModel directory. The fingerprint.pb file is a protobuf containing the "fingerprint" of the SavedModel. See
the RFC for more details regarding its design and properties.TF pip:
tensorflow or tensorflow-cpu would install Intel's tensorflow-intel package. These packages are provided as-is. Tensorflow
will use reasonable efforts to maintain the availability and integrity of this pip package. There may be delays if the third party fails to
release the pip package. For using TensorFlow GPU on Windows, you will need to install TensorFlow in WSL2.tf.image
return_index_map to tf.image.ssim which causes the returned value to be the local SSIM map instead of the global
mean.TF Core:
tf.custom_gradient can now be applied to functions that accept "composite" tensors, such as tf.RaggedTensor, as inputs.experimental_follow_type_hints for tf.function has been deprecated. Please use input_signature or reduce_retracing to minimize retracing.tf.SparseTensor:
set_shape, which sets the static dense shape of the sparse tensor and has the same semantics as tf.Tensor.set_shape.This release contains contributions from many people at Google, as well as:
103yiran, 8bitmp3, Aakar Dwivedi, Alexander Grund, alif_elham, Aman Agarwal, amoitra, Andrei Ivanov, andreii, Andrew Goodbody, angerson, Ashay Rane, Azeem Shaikh, Ben Barsdell, bhack, Bhavani Subramanian, Cedric Nugteren, Chandra Kumar Ramasamy, Christopher Bate, CohenAriel, Cotarou, cramasam, Enrico Minack, Francisco Unda, Frederic Bastien, gadagashwini, Gauri1 Deshpande, george, Jake, Jeff, Jerry Ge, Jingxuan He, Jojimon Varghese, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, kcoul, Keith Smiley, Kevin Hu, Kun Lu, kushanam, Lianmin Zheng, liuyuanqiang, Louis Sugy, Mahmoud Abuzaina, Marius Brehler, mdfaijul, Meenakshi Venkataraman, Milos Puzovic, mohantym, Namrata-Ibm, Nathan John Sircombe, Nathan Luehr, Olaf Lipinski, Om Thakkar, Osman F Bayram, Patrice Vignola, Pavani Majety, Philipp Hack, Prianka Liz Kariat, Rahul Batra, RajeshT, Renato Golin, riestere, Roger Iyengar, Rohit Santhanam, Rsanthanam-Amd, Sadeed Pv, Samuel Marks, Shimokawa, Naoaki, Siddhesh Kothadi, Simengliu-Nv, Sindre Seppola, snadampal, Srinivasan Narayanamoorthy, sushreebarsa, syedshahbaaz, Tamas Bela Feher, Tatwai Chong, Thibaut Goetghebuer-Planchon, tilakrayal, Tom Anderson, Tomohiro Endo, Trevor Morris, vibhutisawant, Victor Zhang, Vremold, Xavier Bonaventura, Yanming Wang, Yasir Modak, Yimei Sun, Yong Tang, Yulv-Git, zhuoran.liu, zotanika
This release introduces several vulnerability fixes:
This release introduces several vulnerability fixes:
DynamicStitch due to missing validation (CVE-2022-41883)tf.keras.losses.poisson (CVE-2022-41887)ThreadUnsafeUnigramCandidateSampler caused by missing validation (CVE-2022-41880)ndarray_tensor_bridge (CVE-2022-41884)FusedResizeAndPadConv2D (CVE-2022-41885)ImageProjectiveTransformV2 (CVE-2022-41886)tf.image.generate_bounding_box_proposals on GPU (CVE-2022-41888)pywrap_tfe_src caused by invalid attributes (CVE-2022-41889)CHECK fail in BCast (CVE-2022-41890)TensorListConcat (CVE-2022-41891)CHECK_EQ fail in TensorListResize (CVE-2022-41893)CONV_3D_TRANSPOSE on TFLite (CVE-2022-41894)MirrorPadGrad (CVE-2022-41895)Mfcc (CVE-2022-41896)FractionalMaxPoolGrad (CVE-2022-41897)CHECK fail in SparseFillEmptyRowsGrad (CVE-2022-41898)CHECK fail in SdcaOptimizer (CVE-2022-41899)FractionalAvgPool and FractionalMaxPool(CVE-2022-41900)CHECK_EQ in SparseMatrixNNZ (CVE-2022-41901)ResizeNearestNeighborGrad (CVE-2022-41907)CHECK fail in PyFunc (CVE-2022-41908)CompositeTensorVariantToComponents (CVE-2022-41909)QuantizeAndDequantizeV2 (CVE-2022-41910)CHECK failure in SobolSample via missing validation (CVE-2022-35935)CHECK fail in TensorListScatter and TensorListScatterV2 in eager mode (CVE-2022-35935)Fixes a CHECK failure in tf.reshape caused by overflows (CVE-2022-35934)
keras.layers.Attention and keras.layers.AdditiveAttention is now specified in the call() method via the use_causal_mask argument (rather than in the constructor), for consistency with other layers.tensorflow/python/training have been moved to tensorflow/python/tracking and tensorflow/python/checkpoint. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer will graduate in Release 2.11, which means tf.keras.optimizers.Optimizer will be an alias of tf.keras.optimizers.experimental.Optimizer. The current tf.keras.optimizers.Optimizer will continue to be supported as tf.keras.optimizers.legacy.Optimizer, e.g.,tf.keras.optimizers.legacy.Adam. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer.tf.keras.initializers. Keras initializers will now use stateless random ops to generate random numbers.
seed=None), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).tensorflow::Code and tensorflow::Status will become aliases of respectively absl::StatusCode and absl::Status in some future release.
tensorflow::OkStatus() instead of tensorflow::Status::OK().Status objects from tensorflow::error::Code.tensorflow::errors::Code fields. Accessing tensorflow::error::Code fields is fine.
tensorflow::errors:InvalidArgument to create status using an error code without accessing it.tensorflow::errors::IsInvalidArgument if needed.static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT) or static_cast<int>(code) for comparisons.tensorflow::StatusOr will also become in the future alias to absl::StatusOr, so use StatusOr::value instead of StatusOr::ConsumeValueOrDie.tf.lite:
tf.keras:
EinsumDense layer is moved from experimental to core. Its import path is moved from tf.keras.layers.experimental.EinsumDense to tf.keras.layers.EinsumDense.tf.keras.utils.audio_dataset_from_directory utility to easily generate audio classification datasets from directories of .wav files.subset="both" support in tf.keras.utils.image_dataset_from_directory,tf.keras.utils.text_dataset_from_directory, and audio_dataset_from_directory, to be used with the validation_split argument, for returning both dataset splits at once, as a tuple.tf.keras.utils.split_dataset utility to split a Dataset object or a list/tuple of arrays into two Dataset objects (e.g. train/test).BackupAndRestore callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.tf.keras.dtensor.experimental.optimizers.AdamW. This optimizer is similar as the existing keras.optimizers.experimental.AdamW, and works in the DTensor training use case.tf.keras.layers.MultiHeadAttention.
query, key and value inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with any attention_mask passed in directly when calling the layer. This can be used with tf.keras.layers.Embedding with mask_zero=True to automatically infer a correct padding mask.use_causal_mask call time arugment to the layer. Passing use_causal_mask=True will compute a causal attention mask, and optionally combine it with any attention_mask passed in directly when calling the layer.ignore_class argument in the loss SparseCategoricalCrossentropy and metrics IoU and MeanIoU, to specify a class index to be ignored during loss/metric computation (e.g. a background/void class).tf.keras.models.experimental.SharpnessAwareMinimization. This class implements the sharpness-aware minimization technique, which boosts model performance on various tasks, e.g., ResNet on image classification.tf.data:
dataset_id to tf.data.experimental.service.register_dataset. If provided, tf.data service will use the provided ID for the dataset. If the dataset ID already exists, no new dataset will be registered. This is useful if multiple training jobs need to use the same dataset for training. In this case, users should call register_dataset with the same dataset_id.inject_prefetch, to tf.data.experimental.OptimizationOptions. If it is set to True,tf.data will now automatically add a prefetch transformation to datasets that end in synchronous transformations. This enables data generation to be overlapped with data consumption. This may cause a small increase in memory usage due to buffering. To enable this behavior, set inject_prefetch=True in tf.data.experimental.OptimizationOptions.tf.data.Options.autotune.autotune_algorithm: STAGE_BASED. If the autotune algorithm is set to STAGE_BASED, then it runs a new algorithm that can get the same performance with lower CPU/memory usage.tf.data.experimental.from_list, a new API for creating Datasets from lists of elements.tf.distribute:
tf.distribute.experimental.PreemptionCheckpointHandler to handle worker preemption/maintenance and cluster-wise consistent error reporting for tf.distribute.MultiWorkerMirroredStrategy. Specifically, for the type of interruption with advance notice, it automatically saves a checkpoint, exits the program without raising an unrecoverable error, and restores the progress when training restarts.tf.math:
tf.math.approx_max_k and tf.math.approx_min_k which are the optimized alternatives to tf.math.top_k on TPU. The performance difference range from 8 to 100 times depending on the size of k. When running on CPU and GPU, a non-optimized XLA kernel is used.tf.train:
tf.train.TrackableView which allows users to inspect the TensorFlow Trackable object (e.g. tf.Module, Keras Layers and models).tf.vectorized_map:
warn. This parameter controls whether or not warnings will be printed when operations in the provided fn fall back to a while loop.XLA:
CPU performance optimizations:
auto_mixed_precision_mkl to auto_mixed_precision_onednn_bfloat16. See example usage here.pip install tensorflow).
TF_ENABLE_ONEDNN_OPTS=1 to enable the optimizations. Setting the variable to 0 or unsetting it will disable the optimizations.New argument experimental_device_ordinal in LogicalDeviceConfiguration to control the order of logical devices. (GPU only)
tf.keras:
tf.keras.callbacks.TensorBoard callback, so that summaries logged automatically for model weights now include either a /histogram or /image suffix in their tag names, in order to prevent tag name collisions across summary types.When running on GPU (with cuDNN version 7.6.3 or later),tf.nn.depthwise_conv2d backprop to filter (and therefore also tf.keras.layers.DepthwiseConv2D) now operate deterministically (and tf.errors.UnimplementedError is no longer thrown) when op-determinism has been enabled via tf.config.experimental.enable_op_determinism. This closes issue 47174.
tf.random
tf.random.experimental.stateless_shuffle, a stateless version of tf.random.shuffle.CHECK failure in tf.reshape caused by overflows (CVE-2022-35934)CHECK failure in SobolSample caused by missing validation (CVE-2022-35935)Gather_nd op in TF Lite (CVE-2022-35937)CHECK failure in TensorListReserve caused by missing validation (CVE-2022-35960)Scatter_nd op in TF Lite (CVE-2022-35939)RaggedRangeOp (CVE-2022-35940)CHECK failure in AvgPoolOp (CVE-2022-35941)CHECK failures in UnbatchGradOp (CVE-2022-35952)CHECK failures in AvgPool3DGrad (CVE-2022-35959)CHECK failures in FractionalAvgPoolGrad (CVE-2022-35963)BlockLSTMGradV2 (CVE-2022-35964)LowerBound and UpperBound (CVE-2022-35965)QuantizedAvgPool (CVE-2022-35966)QuantizedAdd (CVE-2022-35967)CHECK fail in AvgPoolGrad (CVE-2022-35968)CHECK fail in Conv2DBackpropInput (CVE-2022-35969)QuantizedInstanceNorm (CVE-2022-35970)CHECK fail in FakeQuantWithMinMaxVars (CVE-2022-35971)Requantize (CVE-2022-36017)QuantizedBiasAdd (CVE-2022-35972)CHECK fail in FakeQuantWithMinMaxVarsPerChannel (CVE-2022-36019)QuantizedMatMul (CVE-2022-35973)QuantizeDownAndShrinkRange (CVE-2022-35974)QuantizedRelu and QuantizedRelu6 (CVE-2022-35979)CHECK fail in FractionalMaxPoolGrad (CVE-2022-35981)CHECK fail in RaggedTensorToVariant (CVE-2022-36018)CHECK fail in QuantizeAndDequantizeV3 (CVE-2022-36026)SparseBincount (CVE-2022-35982)CHECK fail in Save and SaveSlices (CVE-2022-35983)CHECK fail in ParameterizedTruncatedNormal (CVE-2022-35984)CHECK fail in LRNGrad (CVE-2022-35985)RaggedBincount (CVE-2022-35986)CHECK fail in DenseBincount (CVE-2022-35987)CHECK fail in tf.linalg.matrix_rank (CVE-2022-35988)CHECK fail in MaxPool (CVE-2022-35989)CHECK fail in Conv2DBackpropInput (CVE-2022-35999)CHECK fail in EmptyTensorList (CVE-2022-35998)CHECK fail in tf.sparse.cross (CVE-2022-35997)Conv2D (CVE-2022-35996)CHECK fail in AudioSummaryV2 (CVE-2022-35995)CHECK fail in CollectiveGather (CVE-2022-35994)CHECK fail in SetSize (CVE-2022-35993)CHECK fail in TensorListFromTensor (CVE-2022-35992)CHECK fail in TensorListScatter and TensorListScatterV2 (CVE-2022-35991)CHECK fail in FakeQuantWithMinMaxVarsPerChannelGradient (CVE-2022-35990)CHECK fail in FakeQuantWithMinMaxVarsGradient (CVE-2022-36005)CHECK fail in tf.random.gamma (CVE-2022-36004)CHECK fail in RandomPoissonV2 (CVE-2022-36003)CHECK fail in Unbatch (CVE-2022-36002)CHECK fail in DrawBoundingBoxes (CVE-2022-36001)CHECK fail in Eig (CVE-2022-36000)mlir::tfg::GraphDefImporter::ConvertNodeDef (CVE-2022-36013)mlir::tfg::TFOp::nameAttr (CVE-2022-36014)CHECK-fail in tensorflow::full_type::SubstituteFromAttrs (CVE-2022-36016)Gather_nd op in TF Lite Micro (CVE-2022-35938)This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurélien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaël Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang
Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaption…
keras.layers.Attention and keras.layers.AdditiveAttention is now specified in the call() method via the use_causal_mask argument (rather than in the constructor), for consistency with other layers.tensorflow/python/training have been moved to tensorflow/python/tracking and tensorflow/python/checkpoint. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer will graduate in Release 2.11, which means tf.keras.optimizers.Optimizer will be an alias of tf.keras.optimizers.experimental.Optimizer. The current tf.keras.optimizers.Optimizer will continue to be supported as tf.keras.optimizers.legacy.Optimizer, e.g.,tf.keras.optimizers.legacy.Adam. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer.tf.keras.initializers. Keras initializers will now use stateless random ops to generate random numbers.
seed=None), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).tensorflow::Code and tensorflow::Status will become aliases of respectively absl::StatusCode and absl::Status in some future release.
tensorflow::OkStatus() instead of tensorflow::Status::OK().Status objects from tensorflow::error::Code.tensorflow::errors::Code fields. Accessing tensorflow::error::Code fields is fine.
tensorflow::errors:InvalidArgument to create status using an error code without accessing it.tensorflow::errors::IsInvalidArgument if needed.static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT) or static_cast<int>(code) for comparisons.tensorflow::StatusOr will also become in the future alias to absl::StatusOr, so use StatusOr::value instead of StatusOr::ConsumeValueOrDie.tf.lite:
tf.keras:
EinsumDense layer is moved from experimental to core. Its import path is moved from tf.keras.layers.experimental.EinsumDense to tf.keras.layers.EinsumDense.tf.keras.utils.audio_dataset_from_directory utility to easily generate audio classification datasets from directories of .wav files.subset="both" support in tf.keras.utils.image_dataset_from_directory,tf.keras.utils.text_dataset_from_directory, and audio_dataset_from_directory, to be used with the validation_split argument, for returning both dataset splits at once, as a tuple.tf.keras.utils.split_dataset utility to split a Dataset object or a list/tuple of arrays into two Dataset objects (e.g. train/test).BackupAndRestore callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.tf.keras.dtensor.experimental.optimizers.AdamW. This optimizer is similar as the existing keras.optimizers.experimental.AdamW, and works in the DTensor training use case.tf.keras.layers.MultiHeadAttention.
query, key and value inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with any attention_mask passed in directly when calling the layer. This can be used with tf.keras.layers.Embedding with mask_zero=True to automatically infer a correct padding mask.use_causal_mask call time arugment to the layer. Passing use_causal_mask=True will compute a causal attention mask, and optionally combine it with any attention_mask passed in directly when calling the layer.ignore_class argument in the loss SparseCategoricalCrossentropy and metrics IoU and MeanIoU, to specify a class index to be ignored during loss/metric computation (e.g. a background/void class).tf.keras.models.experimental.SharpnessAwareMinimization. This class implements the sharpness-aware minimization technique, which boosts model performance on various tasks, e.g., ResNet on image classification.tf.data:
dataset_id to tf.data.experimental.service.register_dataset. If provided, tf.data service will use the provided ID for the dataset. If the dataset ID already exists, no new dataset will be registered. This is useful if multiple training jobs need to use the same dataset for training. In this case, users should call register_dataset with the same dataset_id.inject_prefetch, to tf.data.experimental.OptimizationOptions. If it is set to True,tf.data will now automatically add a prefetch transformation to datasets that end in synchronous transformations. This enables data generation to be overlapped with data consumption. This may cause a small increase in memory usage due to buffering. To enable this behavior, set inject_prefetch=True in tf.data.experimental.OptimizationOptions.tf.data.Options.autotune.autotune_algorithm: STAGE_BASED. If the autotune algorithm is set to STAGE_BASED, then it runs a new algorithm that can get the same performance with lower CPU/memory usage.tf.data.experimental.from_list, a new API for creating Datasets from lists of elements.tf.distribute:
tf.distribute.experimental.PreemptionCheckpointHandler to handle worker preemption/maintenance and cluster-wise consistent error reporting for tf.distribute.MultiWorkerMirroredStrategy. Specifically, for the type of interruption with advance notice, it automatically saves a checkpoint, exits the program without raising an unrecoverable error, and restores the progress when training restarts.tf.math:
tf.math.approx_max_k and tf.math.approx_min_k which are the optimized alternatives to tf.math.top_k on TPU. The performance difference range from 8 to 100 times depending on the size of k. When running on CPU and GPU, a non-optimized XLA kernel is used.tf.train:
tf.train.TrackableView which allows users to inspect the TensorFlow Trackable object (e.g. tf.Module, Keras Layers and models).tf.vectorized_map:
warn. This parameter controls whether or not warnings will be printed when operations in the provided fn fall back to a while loop.XLA:
CPU performance optimizations:
auto_mixed_precision_mkl to auto_mixed_precision_onednn_bfloat16. See example usage here.pip install tensorflow).
TF_ENABLE_ONEDNN_OPTS=1 to enable the optimizations. Setting the variable to 0 or unsetting it will disable the optimizations.New argument experimental_device_ordinal in LogicalDeviceConfiguration to control the order of logical devices. (GPU only)
tf.keras:
tf.keras.callbacks.TensorBoard callback, so that summaries logged automatically for model weights now include either a /histogram or /image suffix in their tag names, in order to prevent tag name collisions across summary types.When running on GPU (with cuDNN version 7.6.3 or later),tf.nn.depthwise_conv2d backprop to filter (and therefore also tf.keras.layers.DepthwiseConv2D) now operate deterministically (and tf.errors.UnimplementedError is no longer thrown) when op-determinism has been enabled via tf.config.experimental.enable_op_determinism. This closes issue 47174.
tf.random
tf.random.experimental.stateless_shuffle, a stateless version of tf.random.shuffle.This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurélien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaël Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang
Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaption…
keras.layers.Attention and keras.layers.AdditiveAttention is now specified in the call() method via the use_causal_mask argument (rather than in the constructor), for consistency with other layers.tensorflow/python/training have been moved to tensorflow/python/tracking and tensorflow/python/checkpoint. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer will graduate in Release 2.11, which means tf.keras.optimizers.Optimizer will be an alias of tf.keras.optimizers.experimental.Optimizer. The current tf.keras.optimizers.Optimizer will continue to be supported as tf.keras.optimizers.legacy.Optimizer, e.g.,tf.keras.optimizers.legacy.Adam. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer.tf.keras.initializers. Keras initializers will now use stateless random ops to generate random numbers.
seed=None), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).tf.lite:
tf.keras:
EinsumDense layer is moved from experimental to core. Its import path is moved from tf.keras.layers.experimental.EinsumDense to tf.keras.layers.EinsumDense.tf.keras.utils.audio_dataset_from_directory utility to easily generate audio classification datasets from directories of .wav files.subset="both" support in tf.keras.utils.image_dataset_from_directory,tf.keras.utils.text_dataset_from_directory, and audio_dataset_from_directory, to be used with the validation_split argument, for returning both dataset splits at once, as a tuple.tf.keras.utils.split_dataset utility to split a Dataset object or a list/tuple of arrays into two Dataset objects (e.g. train/test).BackupAndRestore callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.tf.keras.dtensor.experimental.optimizers.AdamW. This optimizer is similar as the existing keras.optimizers.experimental.AdamW, and works in the DTensor training use case.tf.keras.layers.MultiHeadAttention.
query, key and value inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with any attention_mask passed in directly when calling the layer. This can be used with tf.keras.layers.Embedding with mask_zero=True to automatically infer a correct padding mask.use_causal_mask call time arugment to the layer. Passing use_causal_mask=True will compute a causal attention mask, and optionally combine it with any attention_mask passed in directly when calling the layer.ignore_class argument in the loss SparseCategoricalCrossentropy and metrics IoU and MeanIoU, to specify a class index to be ignored during loss/metric computation (e.g. a background/void class).tf.keras.models.experimental.SharpnessAwareMinimization. This class implements the sharpness-aware minimization technique, which boosts model performance on various tasks, e.g., ResNet on image classification.tf.data:
dataset_id to tf.data.experimental.service.register_dataset. If provided, tf.data service will use the provided ID for the dataset. If the dataset ID already exists, no new dataset will be registered. This is useful if multiple training jobs need to use the same dataset for training. In this case, users should call register_dataset with the same dataset_id.inject_prefetch, to tf.data.experimental.OptimizationOptions. If it is set to True,tf.data will now automatically add a prefetch transformation to datasets that end in synchronous transformations. This enables data generation to be overlapped with data consumption. This may cause a small increase in memory usage due to buffering. To enable this behavior, set inject_prefetch=True in tf.data.experimental.OptimizationOptions.tf.data.Options.autotune.autotune_algorithm: STAGE_BASED. If the autotune algorithm is set to STAGE_BASED, then it runs a new algorithm that can get the same performance with lower CPU/memory usage.tf.data.experimental.from_list, a new API for creating Datasets from lists of elements.tf.distribute:
tf.distribute.experimental.PreemptionCheckpointHandler to handle worker preemption/maintenance and cluster-wise consistent error reporting for tf.distribute.MultiWorkerMirroredStrategy. Specifically, for the type of interruption with advance notice, it automatically saves a checkpoint, exits the program without raising an unrecoverable error, and restores the progress when training restarts.tf.math:
tf.math.approx_max_k and tf.math.approx_min_k which are the optimized alternatives to tf.math.top_k on TPU. The performance difference range from 8 to 100 times depending on the size of k. When running on CPU and GPU, a non-optimized XLA kernel is used.tf.train:
tf.train.TrackableView which allows users to inspect the TensorFlow Trackable object (e.g. tf.Module, Keras Layers and models).tf.vectorized_map:
warn. This parameter controls whether or not warnings will be printed when operations in the provided fn fall back to a while loop.XLA:
oneDNN CPU performance optimizations:
auto_mixed_precision_mkl to auto_mixed_precision_onednn_bfloat16. See example usage here.pip install tensorflow).
TF_ENABLE_ONEDNN_OPTS=1 to enable the optimizations. Setting the variable to 0 or unsetting it will disable the optimizations.New argument experimental_device_ordinal in LogicalDeviceConfiguration to control the order of logical devices. (GPU only)
tf.keras:
tf.keras.callbacks.TensorBoard callback, so that summaries logged automatically for model weights now include either a /histogram or /image suffix in their tag names, in order to prevent tag name collisions across summary types.When running on GPU (with cuDNN version 7.6.3 or later),tf.nn.depthwise_conv2d backprop to filter (and therefore also tf.keras.layers.DepthwiseConv2D) now operate deterministically (and tf.errors.UnimplementedError is no longer thrown) when op-determinism has been enabled via tf.config.experimental.enable_op_determinism. This closes issue 47174.
tf.random
tf.random.experimental.stateless_shuffle, a stateless version of tf.random.shuffle.tensorflow::Code and tensorflow::Status will become aliases of respectively absl::StatusCode and absl::Status in some future release.
tensorflow::OkStatus() instead of tensorflow::Status::OK().Status objects from tensorflow::error::Code.tensorflow::errors::Code fields. Accessing tensorflow::error::Code fields is fine.
tensorflow::errors:InvalidArgument to create status using an error code without accessing it.tensorflow::errors::IsInvalidArgument if needed.static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT) or static_cast<int>(code) for comparisons.tensorflow::StatusOr will also become in the future alias to absl::StatusOr, so use StatusOr::value instead of StatusOr::ConsumeValueOrDie.This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurélien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaël Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang
Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaption…
keras.layers.Attention and keras.layers.AdditiveAttention is now specified in the call() method via the use_causal_mask argument (rather than in the constructor), for consistency with other layers.tensorflow/python/training have been moved to tensorflow/python/tracking and tensorflow/python/checkpoint. Please update your imports accordingly, the old files will be removed in Release 2.11.tf.keras.optimizers.experimental.Optimizer will graduate in Release 2.11, which means tf.keras.optimizers.Optimizer will be an alias of tf.keras.optimizers.experimental.Optimizer. The current tf.keras.optimizers.Optimizer will continue to be supported as tf.keras.optimizers.legacy.Optimizer, e.g.,tf.keras.optimizers.legacy.Adam. Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaptions. If you decide to keep using the old optimizer, please explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer.tf.keras.initializers. Keras initializers will now use stateless random ops to generate random numbers.
seed=None), a random seed will be created and assigned at initializer creation (different initializer instances get different seeds).tf.lite:
tf.keras:
EinsumDense layer is moved from experimental to core. Its import path is moved from tf.keras.layers.experimental.EinsumDense to tf.keras.layers.EinsumDense.tf.keras.utils.audio_dataset_from_directory utility to easily generate audio classification datasets from directories of .wav files.subset="both" support in tf.keras.utils.image_dataset_from_directory,tf.keras.utils.text_dataset_from_directory, and audio_dataset_from_directory, to be used with the validation_split argument, for returning both dataset splits at once, as a tuple.tf.keras.utils.split_dataset utility to split a Dataset object or a list/tuple of arrays into two Dataset objects (e.g. train/test).BackupAndRestore callback for handling distributed training failures & restarts. The training state can now be restored at the exact epoch and step at which it was previously saved before failing.tf.keras.dtensor.experimental.optimizers.AdamW. This optimizer is similar as the existing keras.optimizers.experimental.AdamW, and works in the DTensor training use case.tf.keras.layers.MultiHeadAttention.
query, key and value inputs will automatically be used to compute a correct attention mask for the layer. These padding masks will be combined with any attention_mask passed in directly when calling the layer. This can be used with tf.keras.layers.Embedding with mask_zero=True to automatically infer a correct padding mask.use_causal_mask call time arugment to the layer. Passing use_causal_mask=True will compute a causal attention mask, and optionally combine it with any attention_mask passed in directly when calling the layer.ignore_class argument in the loss SparseCategoricalCrossentropy and metrics IoU and MeanIoU, to specify a class index to be ignored during loss/metric computation (e.g. a background/void class).tf.keras.models.experimental.SharpnessAwareMinimization. This class implements the sharpness-aware minimization technique, which boosts model performance on various tasks, e.g., ResNet on image classification.tf.data:
dataset_id to tf.data.experimental.service.register_dataset. If provided, tf.data service will use the provided ID for the dataset. If the dataset ID already exists, no new dataset will be registered. This is useful if multiple training jobs need to use the same dataset for training. In this case, users should call register_dataset with the same dataset_id.inject_prefetch, to tf.data.experimental.OptimizationOptions. If it is set to True,tf.data will now automatically add a prefetch transformation to datasets that end in synchronous transformations. This enables data generation to be overlapped with data consumption. This may cause a small increase in memory usage due to buffering. To enable this behavior, set inject_prefetch=True in tf.data.experimental.OptimizationOptions.tf.data.Options.autotune.autotune_algorithm: STAGE_BASED. If the autotune algorithm is set to STAGE_BASED, then it runs a new algorithm that can get the same performance with lower CPU/memory usage.tf.data.experimental.from_list, a new API for creating Datasets from lists of elements.tf.distribute:
tf.distribute.experimental.PreemptionCheckpointHandler to handle worker preemption/maintenance and cluster-wise consistent error reporting for tf.distribute.MultiWorkerMirroredStrategy. Specifically, for the type of interruption with advance notice, it automatically saves a checkpoint, exits the program without raising an unrecoverable error, and restores the progress when training restarts.tf.math:
tf.math.approx_max_k and tf.math.approx_min_k which are the optimized alternatives to tf.math.top_k on TPU. The performance difference range from 8 to 100 times depending on the size of k. When running on CPU and GPU, a non-optimized XLA kernel is used.tf.train:
tf.train.TrackableView which allows users to inspect the TensorFlow Trackable object (e.g. tf.Module, Keras Layers and models).tf.vectorized_map:
warn. This parameter controls whether or not warnings will be printed when operations in the provided fn fall back to a while loop.XLA:
oneDNN CPU performance optimizations:
auto_mixed_precision_mkl to auto_mixed_precision_onednn_bfloat16. See example usage here.pip install tensorflow).
TF_ENABLE_ONEDNN_OPTS=1 to enable the optimizations. Setting the variable to 0 or unsetting it will disable the optimizations.New argument experimental_device_ordinal in LogicalDeviceConfiguration to control the order of logical devices. (GPU only)
tf.keras:
tf.keras.callbacks.TensorBoard callback, so that summaries logged automatically for model weights now include either a /histogram or /image suffix in their tag names, in order to prevent tag name collisions across summary types.When running on GPU (with cuDNN version 7.6.3 or later),tf.nn.depthwise_conv2d backprop to filter (and therefore also tf.keras.layers.DepthwiseConv2D) now operate deterministically (and tf.errors.UnimplementedError is no longer thrown) when op-determinism has been enabled via tf.config.experimental.enable_op_determinism. This closes issue 47174.
tf.random
tf.random.experimental.stateless_shuffle, a stateless version of tf.random.shuffle.tensorflow::Code and tensorflow::Status will become aliases of respectively absl::StatusCode and absl::Status in some future release.
tensorflow::OkStatus() instead of tensorflow::Status::OK().Status objects from tensorflow::error::Code.tensorflow::errors::Code fields. Accessing tensorflow::error::Code fields is fine.
tensorflow::errors:InvalidArgument to create status using an error code without accessing it.tensorflow::errors::IsInvalidArgument if needed.static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT) or static_cast<int>(code) for comparisons.tensorflow::StatusOr will also become in the future alias to absl::StatusOr, so use StatusOr::value instead of StatusOr::ConsumeValueOrDie.This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurélien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaël Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang
Most users won't be affected by this change, but please check the API doc if any API used in your workflow is changed or deprecated, and make adaption…
keras.layers.Attention and
keras.layers.AdditiveAttention is now specified in the call() method
via the use_causal_mask argument (rather than in the constructor),
for consistency with other layers.tensorflow/python/training have been moved to
tensorflow/python/tracking and tensorflow/python/checkpoint. Please
update your imports accordingly, the old files will be removed in Release
2.11.tf.keras.optimizers.experimental.Optimizer will graduate in Release 2.11,
which means tf.keras.optimizers.Optimizer will be an alias of
tf.keras.optimizers.experimental.Optimizer. The current
tf.keras.optimizers.Optimizer will continue to be supported as
tf.keras.optimizers.legacy.Optimizer, e.g.,
tf.keras.optimizers.legacy.Adam. Most users won't be affected by this
change, but please check the API doc
if any API used in your workflow is changed or deprecated, and
make adaptions. If you decide to keep using the old optimizer, please
explicitly change your optimizer to tf.keras.optimizers.legacy.Optimizer.tf.keras.initializers. Keras initializers will now
use stateless random ops to generate random numbers.
seed=None), a
random seed will be created and assigned at initializer creation
(different initializer instances get different seeds).tf.lite:
tf.keras:
EinsumDense layer moved from experimental to core. Its import path
moved from tf.keras.layers.experimental.EinsumDense to
tf.keras.layers.EinsumDense.tf.keras.utils.audio_dataset_from_directory utility to easily
generate audio classification datasets from directories of .wav files.subset="both" support in
tf.keras.utils.image_dataset_from_directory,
tf.keras.utils.text_dataset_from_directory, and
audio_dataset_from_directory, to be used with the validation_split
argument, for returning both dataset splits at once, as a tuple.tf.keras.utils.split_dataset utility to split a Dataset object
or a list/tuple of arrays into two Dataset objects (e.g. train/test).BackupAndRestore callback for handling
distributed training failures & restarts. The training state can now be
restored at the exact epoch and step at which it was previously saved
before failing.tf.keras.dtensor.experimental.optimizers.AdamW.
This optimizer is similar as the existing
keras.optimizers.experimental.AdamW, and
works in the DTensor training use case.query, key and value inputs will
automatically be used to compute a correct attention mask for the
layer. These padding masks will be combined with any
attention_mask passed in directly when calling the layer. This
can be used with
tf.keras.layers.Embedding
with mask_zero=True to automatically infer a correct padding mask.use_causal_mask call time arugment to the layer. Passing
use_causal_mask=True will compute a causal attention mask, and
optionally combine it with any attention_mask passed in directly
when calling the layer.ignore_class argument in the loss
SparseCategoricalCrossentropy and metrics IoU and MeanIoU,
to specify a class index to be ignored
during loss/metric computation (e.g. a background/void class).tf.keras.models.experimental.SharpnessAwareMinimization.
This class implements the sharpness-aware minimization technique, which
boosts model performance on various tasks, e.g., ResNet on image
classification.tf.data:
dataset_id to tf.data.experimental.service.register_dataset.
If provided, tf.data service will use the provided ID for the dataset.
If the dataset ID already exists, no new dataset will be registered.
This is useful if multiple training jobs need to use the same dataset
for training. In this case, users should call register_dataset with
the same dataset_id.inject_prefetch, to
tf.data.experimental.OptimizationOptions. If it is set to True,
tf.data will now automatically add a prefetch transformation to
datasets that end in synchronous transformations. This enables data
generation to be overlapped with data consumption. This may cause a
small increase in memory usage due to buffering. To enable this
behavior, set inject_prefetch=True in
tf.data.experimental.OptimizationOptions.tf.data.Options.autotune.autotune_algorithm:
STAGE_BASED. If the autotune algorithm is set to STAGE_BASED, then it
runs a new algorithm that can get the same performance with lower
CPU/memory usage.tf.data.experimental.from_list, a new API for creating
Datasets from lists of elements.tf.distribute:
tf.distribute.experimental.PreemptionCheckpointHandler
to handle worker preemption/maintenance and cluster-wise consistent
error reporting for tf.distribute.MultiWorkerMirroredStrategy.
Specifically, for the type of interruption with advance notice, it
automatically saves a checkpoint, exits the program without raising an
unrecoverable error, and restores the progress when training restarts.tf.math:
tf.math.approx_max_k and tf.math.approx_min_k which are the
optimized alternatives to tf.math.top_k on TPU. The performance
difference range from 8 to 100 times depending on the size of k. When
running on CPU and GPU, a non-optimized XLA kernel is used.tf.train:
tf.train.TrackableView which allows users to inspect the
TensorFlow Trackable object (e.g. tf.Module, Keras Layers and models).tf.vectorized_map:
warn. This parameter controls whether or
not warnings will be printed when operations in the provided fn fall
back to a while loop.XLA:
New argument experimental_device_ordinal in LogicalDeviceConfiguration
to control the order of logical devices. (GPU only)
tf.keras:
tf.keras.callbacks.TensorBoard callback, so that summaries logged
automatically for model weights now include either a /histogram or
/image suffix in their tag names, in order to prevent tag name
collisions across summary types.When running on GPU (with cuDNN version 7.6.3 or later),
tf.nn.depthwise_conv2d backprop to filter (and therefore also
tf.keras.layers.DepthwiseConv2D) now operate deterministically (and
tf.errors.UnimplementedError is no longer thrown) when op-determinism has
been enabled via tf.config.experimental.enable_op_determinism. This closes
issue 47174.
tf.random
tf.random.experimental.stateless_shuffle, a stateless version of
tf.random.shuffle.tensorflow::Code and tensorflow::Status will become aliases of
respectively absl::StatusCode and absl::Status in some future release.
tensorflow::OkStatus() instead of tensorflow::Status::OK().Status objects from tensorflow::error::Code.tensorflow::errors::Code fields. Accessing
tensorflow::error::Code fields is fine.
tensorflow::errors:InvalidArgument to create status using an error
code without accessing it.tensorflow::errors::IsInvalidArgument if needed.static_cast<tensorflow::errors::Code>(error::Code::INVALID_ARGUMENT)
or static_cast<int>(code) for comparisons.tensorflow::StatusOr will also become in the future alias to
absl::StatusOr, so use StatusOr::value instead of
StatusOr::ConsumeValueOrDie.This release contains contributions from many people at Google, as well as:
Abolfazl Shahbazi, Adam Lanicek, Amin Benarieb, andreii, Andrew Fitzgibbon, Andrew Goodbody, angerson, Ashiq Imran, Aurélien Geron, Banikumar Maiti (Intel Aipg), Ben Barsdell, Ben Mares, bhack, Bhavani Subramanian, Bill Schnurr, Byungsoo Oh, Chandra Sr Potula, Chengji Yao, Chris Carpita, Christopher Bate, chunduriv, Cliff Woolley, Cliffs Dover, Cloud Han, Code-Review-Doctor, DEKHTIARJonathan, Deven Desai, Djacon, Duncan Riach, fedotoff, fo40225, Frederic Bastien, gadagashwini, Gauri1 Deshpande, guozhong.zhuang, Hui Peng, James Gerity, Jason Furmanek, Jonathan Dekhtiar, Jueon Park, Kaixi Hou, Kanvi Khanna, Keith Smiley, Koan-Sin Tan, Kulin Seth, kushanam, Learning-To-Play, Li-Wen Chang, lipracer, liuyuanqiang, Louis Sugy, Lucas David, Lukas Geiger, Mahmoud Abuzaina, Marius Brehler, Maxiwell S. Garcia, mdfaijul, Meenakshi Venkataraman, Michal Szutenberg, Michele Di Giorgio, Mickaël Salamin, Nathan John Sircombe, Nathan Luehr, Neil Girdhar, Nils Reichardt, Nishidha Panpaliya, Nobuo Tsukamoto, Om Thakkar, Patrice Vignola, Philipp Hack, Pooya Jannaty, Prianka Liz Kariat, pshiko, Rajeshwar Reddy T, rdl4199, Rohit Santhanam, Rsanthanam-Amd, Sachin Muradi, Saoirse Stewart, Serge Panev, Shu Wang, Srinivasan Narayanamoorthy, Stella Stamenova, Stephan Hartmann, Sunita Nadampalli, synandi, Tamas Bela Feher, Tao Xu, Thibaut Goetghebuer-Planchon, Trevor Morris, Xiaoming (Jason) Cui, Yimei Sun, Yong Tang, Yuanqiang Liu, Yulv-Git, Zhoulong Jiang, ZihengJiang
This release introduces several vulnerability fixes:
This release introduces several vulnerability fixes:
tf.keras.losses.poisson (CVE-2022-41887)ThreadUnsafeUnigramCandidateSampler caused by missing validation (CVE-2022-41880)ndarray_tensor_bridge (CVE-2022-41884)FusedResizeAndPadConv2D (CVE-2022-41885)ImageProjectiveTransformV2 (CVE-2022-41886)tf.image.generate_bounding_box_proposals on GPU (CVE-2022-41888)pywrap_tfe_src caused by invalid attributes (CVE-2022-41889)CHECK fail in BCast (CVE-2022-41890)TensorListConcat (CVE-2022-41891)CHECK_EQ fail in TensorListResize (CVE-2022-41893)CONV_3D_TRANSPOSE on TFLite (CVE-2022-41894)MirrorPadGrad (CVE-2022-41895)Mfcc (CVE-2022-41896)FractionalMaxPoolGrad (CVE-2022-41897)CHECK fail in SparseFillEmptyRowsGrad (CVE-2022-41898)CHECK fail in SdcaOptimizer (CVE-2022-41899)FractionalAvgPool and FractionalMaxPool(CVE-2022-41900)CHECK_EQ in SparseMatrixNNZ (CVE-2022-41901)ResizeNearestNeighborGrad (CVE-2022-41907)CHECK fail in PyFunc (CVE-2022-41908)CompositeTensorVariantToComponents (CVE-2022-41909)QuantizeAndDequantizeV2 (CVE-2022-41910)CHECK failure in SobolSample via missing validation (CVE-2022-35935)CHECK fail in TensorListScatter and TensorListScatterV2 in eager mode (CVE-2022-35935)This releases introduces several vulnerability fixes:
This releases introduces several vulnerability fixes:
CHECK failure in tf.reshape caused by overflows (CVE-2022-35934)CHECK failure in SobolSample caused by missing validation (CVE-2022-35935)Gather_nd op in TF Lite (CVE-2022-35937)CHECK failure in TensorListReserve caused by missing validation (CVE-2022-35960)Scatter_nd op in TF Lite (CVE-2022-35939)RaggedRangeOp (CVE-2022-35940)CHECK failure in AvgPoolOp (CVE-2022-35941)CHECK failures in UnbatchGradOp (CVE-2022-35952)CHECK failures in AvgPool3DGrad (CVE-2022-35959)CHECK failures in FractionalAvgPoolGrad (CVE-2022-35963)BlockLSTMGradV2 (CVE-2022-35964)LowerBound and UpperBound (CVE-2022-35965)QuantizedAvgPool (CVE-2022-35966)QuantizedAdd (CVE-2022-35967)CHECK fail in AvgPoolGrad (CVE-2022-35968)CHECK fail in Conv2DBackpropInput (CVE-2022-35969)QuantizedInstanceNorm (CVE-2022-35970)CHECK fail in FakeQuantWithMinMaxVars (CVE-2022-35971)Requantize (CVE-2022-36017)QuantizedBiasAdd (CVE-2022-35972)CHECK fail in FakeQuantWithMinMaxVarsPerChannel (CVE-2022-36019)QuantizedMatMul (CVE-2022-35973)QuantizeDownAndShrinkRange (CVE-2022-35974)QuantizedRelu and QuantizedRelu6 (CVE-2022-35979)CHECK fail in FractionalMaxPoolGrad (CVE-2022-35981)CHECK fail in RaggedTensorToVariant (CVE-2022-36018)CHECK fail in QuantizeAndDequantizeV3 (CVE-2022-36026)SparseBincount (CVE-2022-35982)CHECK fail in Save and SaveSlices (CVE-2022-35983)CHECK fail in ParameterizedTruncatedNormal (CVE-2022-35984)CHECK fail in LRNGrad (CVE-2022-35985)RaggedBincount (CVE-2022-35986)CHECK fail in DenseBincount (CVE-2022-35987)CHECK fail in tf.linalg.matrix_rank (CVE-2022-35988)CHECK fail in MaxPool (CVE-2022-35989)CHECK fail in Conv2DBackpropInput (CVE-2022-35999)CHECK fail in EmptyTensorList (CVE-2022-35998)CHECK fail in tf.sparse.cross (CVE-2022-35997)Conv2D (CVE-2022-35996)CHECK fail in AudioSummaryV2 (CVE-2022-35995)CHECK fail in CollectiveGather (CVE-2022-35994)CHECK fail in SetSize (CVE-2022-35993)CHECK fail in TensorListFromTensor (CVE-2022-35992)CHECK fail in TensorListScatter and TensorListScatterV2 (CVE-2022-35991)CHECK fail in FakeQuantWithMinMaxVarsPerChannelGradient (CVE-2022-35990)CHECK fail in FakeQuantWithMinMaxVarsGradient (CVE-2022-36005)CHECK fail in tf.random.gamma (CVE-2022-36004)CHECK fail in RandomPoissonV2 (CVE-2022-36003)CHECK fail in Unbatch (CVE-2022-36002)CHECK fail in DrawBoundingBoxes (CVE-2022-36001)CHECK fail in Eig (CVE-2022-36000)mlir::tfg::GraphDefImporter::ConvertNodeDef (CVE-2022-36013)mlir::tfg::TFOp::nameAttr (CVE-2022-36014)CHECK-fail in tensorflow::full_type::SubstituteFromAttrs (CVE-2022-36016)Gather_nd op in TF Lite Micro (CVE-2022-35938)Add an upper bound for protobuf in setup.py since protobuf after version 3.20 is currently incompatible with TensorFlow. See https://github.com/tensor
Add an upper bound for protobuf in setup.py since protobuf after version 3.20 is currently incompatible with TensorFlow. See https://github.com/tensorflow/tensorflow/issues/53234, https://github.com/protocolbuffers/protobuf/issues/9954 and https://github.com/tensorflow/tensorflow/issues/56077.
Fixes a code injection in saved_model_cli (CVE-2022-29216)
_GLIBCXX_USE_CXX11_ABI=1. Downstream projects that encounter std::__cxx11 or [abi:cxx11] linker errors will need to adopt this compiler option. See the GNU C++ Library docs on Dual ABI.tf.keras.mixed_precision.experimental API has been removed. The non-experimental symbols under tf.keras.mixed_precision have been available since TensorFlow 2.4 and should be used instead.
tf.keras.mixed_precision symbols. E.g., replace tf.keras.mixed_precision.experimental.global_policy with tf.keras.mixed_precision.global_policy.tf.keras.mixed_precision.experimental.set_policy with tf.keras.mixed_precision.set_global_policy. The experimental symbol set_policy was renamed to set_global_policy in the non-experimental API.LossScaleOptimizer(opt, "dynamic") with LossScaleOptimizer(opt). If you pass anything other than "dynamic" to the second argument, see (1) of the next section."dynamic" to the loss_scale argument (the second argument) of LossScaleOptimizer:
loss_scale argument (the second argument) of Policy:
Policy optionally took in a tf.compat.v1.mixed_precision.LossScale in the constructor, which defaulted to a dynamic loss scale for the "mixed_float16" policy and no loss scale for other policies. In Model.compile, if the model's policy had a loss scale, the optimizer would be wrapped with a LossScaleOptimizer. With the non-experimental Policy, there is no loss scale associated with the Policy, and Model.compile wraps the optimizer with a LossScaleOptimizer if and only if the policy is a "mixed_float16" policy. If you previously passed a LossScale to the experimental Policy, consider just removing it, as the default loss scaling behavior is usually what you want. If you really want to customize the loss scaling behavior, you can wrap your optimizer with a LossScaleOptimizer before passing it to Model.compile.tf.keras.mixed_precision.experimental.get_layer_policy:
tf.keras.mixed_precision.experimental.get_layer_policy(layer) with layer.dtype_policy.tf.mixed_precision.experimental.LossScale and its subclasses have been removed from the TF2 namespace. This symbols were very rarely used and were only useful in TF2 for use in the now-removed tf.keras.mixed_precision.experimental API. The symbols are still available under tf.compat.v1.mixed_precision.experimental_relax_shapes heuristic for tf.function has been deprecated and replaced with reduce_retracing which encompasses broader heuristics to reduce the number of retraces (see below)tf.keras:
tf.keras.applications.resnet_rs models. This includes the ResNetRS50, ResNetRS101, ResNetRS152, ResNetRS200, ResNetRS270, ResNetRS350 and ResNetRS420 model architectures. The ResNetRS models are based on the architecture described in Revisiting ResNets: Improved Training and Scaling Strategiestf.keras.optimizers.experimental.Optimizer. The reworked optimizer gives more control over different phases of optimizer calls, and is easier to customize. We provide Adam, SGD, Adadelta, AdaGrad and RMSprop optimizers based on tf.keras.optimizers.experimental.Optimizer. Generally the new optimizers work in the same way as the old ones, but support new constructor arguments. In the future, the symbols tf.keras.optimizers.Optimizer/Adam/etc will point to the new optimizers, and the previous generation of optimizers will be moved to tf.keras.optimizers.legacy.Optimizer/Adam/etc.tf.keras.layers.UnitNormalization.tf.keras.regularizers.OrthogonalRegularizer, a new regularizer that encourages orthogonality between the rows (or columns) or a weight matrix.tf.keras.layers.RandomBrightness layer for image preprocessing.tf.keras.utils.disable_interactive_logging() to write the logs to ABSL logging. You can also use tf.keras.utils.enable_interactive_logging() to change it back to stdout, or tf.keras.utils.is_interactive_logging_enabled() to check if interactive logging is enabled.verbose argument of Model.evaluate() and Model.predict() to "auto", which defaults to verbose=1 for most cases and defaults to verbose=2 when used with ParameterServerStrategy or with interactive logging disabled.jit_compile in Model.compile() now applies to Model.evaluate() and Model.predict(). Setting jit_compile=True in compile() compiles the model's training, evaluation, and inference steps to XLA. Note that jit_compile=True may not necessarily work for all models.tf.keras.dtensor namespace. The APIs are still classified as experimental. You are welcome to try it out. Please check the tutoral and guide on https://www.tensorflow.org/ for more details about DTensor.tf.lite:
tf.math.argmin/tf.math.argmax for input data type tf.bool on CPU.tf.nn.gelu op for output data type tf.float32 and quantization on CPU.list_ops.tensor_list_set_item with DynamicUpdateSlice.experimental_new_dynamic_range_quantizer in tf.lite.TFLiteConverter to False to disable this changeexperimental_enable_resource_variables on tf.lite.TFLiteConverter is now True by default and will be removed in the future.tf.function:
tf.function can now specify rules regarding when retracing needs to occur by implementing the Tracing Protocol available through tf.types.experimental.SupportsTracingProtocol.TypeSpec classes (as associated with ExtensionTypes) also implement the Tracing Protocol which can be overriden if necessary.reduce_retracing option also uses the Tracing Protocol to proactively generate generalized traces similar to experimental_relax_shapes (which has now been deprecated).Unified eager and tf.function execution:
tf.function, allowing for more consistent feature support in future releases.TF_RUN_EAGER_OP_AS_FUNCTION environment variable in eager context.tf.function itself is unaffected.tf.experimental.dtensor: Added DTensor, an extension to TensorFlow for large-scale modeling with minimal changes to user code. You are welcome to try it out, though be aware that the DTensor API is experimental and up-to backward-incompatible changes. DTensor and Keras integration is published under tf.keras.dtensor in this release (refer to the tf.keras entry). The tutoral and guide for DTensor will be published on https://www.tensorflow.org/. Please stay tuned.
oneDNN CPU performance optimizations are available in Linux x86, Windows x86, and Linux aarch64 packages.
--config=mkl_aarch64) package:
TF_ENABLE_ONEDNN_OPTS to 1 (enable) or 0 (disable) before running TensorFlow. (The variable is checked during import tensorflow.) To fall back to default settings, unset the environment variable.tf.data:
tf.data.experimental.parse_example_dataset when tf.io.RaggedFeatures would specify value_key but no partitions. Before the fix, setting value_key but no partitions would result in the feature key being replaced by the value key, e.g. {'value_key': <RaggedTensor>} instead of {'key': <RaggedTensor>}. Now the correct feature key will be used. This aligns the behavior of tf.data.experimental.parse_example_dataset to match the behavior of tf.io.parse_example.filter_parallelization, to tf.data.experimental.OptimizationOptions. If it is set to True, tf.data will run Filter transformation with multiple threads. Its default value is False if not specified.tf.keras:
ShardedVariables (used for training with tf.distribute.experimental.ParameterServerStrategy).tf.random:
tf.random.experimental.index_shuffle, for shuffling a sequence without materializing the sequence in memory.tf.RaggedTensor:
tf.experimental.RowPartition, which encodes how one dimension in a RaggedTensor relates to another, into the public API.tf.experimental.DynamicRaggedShape, which represents the shape of a RaggedTensor.saved_model_cli (CVE-2022-29216)TensorSummaryV2 to crash (CVE-2022-29193)QuantizeAndDequantizeV4Grad (CVE-2022-29192)DeleteSessionTensor (CVE-2022-29194)GetSessionTensor (CVE-2022-29191)StagePeek (CVE-2022-29195)UnsortedSegmentJoin (CVE-2022-29197)LoadAndRemapMatrix (CVE-2022-29199)SparseTensorToCSRSparseMatrix (CVE-2022-29198)LSTMBlockCell (CVE-2022-29200)Conv3DBackpropFilterV2 (CVE-2022-29196)CHECK failure in depthwise ops via overflows (CVE-2021-41197)SparseTensorDenseAdd (CVE-2022-29206)QuantizedConv2D (CVE-2022-29201)SpaceToBatchND (CVE-2022-29203)EditDistance (CVE-2022-29208)Conv3DBackpropFilterV2 (CVE-2022-29204)tf.ragged.constant due to lack of validation (CVE-2022-29202)tf.histogram_fixed_width is called with NaN values (CVE-2022-29211)CHECK-failure based denial of service (CVE-2022-29209)curl to 7.83.1 to handle (CVE-2022-22576, (CVE-2022-27774, (CVE-2022-27775, (CVE-2022-27776, (CVE-2022-27778, (CVE-2022-27779, (CVE-2022-27780, (CVE-2022-27781, (CVE-2022-27782 and (CVE-2022-30115zlib to 1.2.12 after 1.2.11 was pulled due to security issueThis release contains contributions from many people at Google, as well as:
Aaron Debattista, Abel Soares Siqueira, Abhishek Varma, Andrei Ivanov, andreii, Andrew Goodbody, apeltop, Arnab Dutta, Ashiq Imran, Banikumar Maiti (Intel Aipg), Ben Greiner, Benjamin Peterson, bhack, Christopher Bate, chunduriv, Copybara-Service, DEKHTIARJonathan, Deven Desai, Duncan Riach, Eric Kunze, Everton Constantino, Faruk D, Fredrik Knutsson, gadagashwini, Gauri1 Deshpande, gtiHibGele, Guozhong Zhuang, Islem-Esi, Ivanov Viktor, Jason Furmanek, Jason Zaman, Jim, Jinzhe Zeng, John Laxson, Jonas Eschle, Jonas Eschle 'Mayou36, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, KaurkerDevourer, Koan-Sin Tan, kushanam, Laramie Leavitt, Li-Wen Chang, lipracer, Louis Sugy, Lu Teng, Mahmoud Abuzaina, Malcolm Slaney, Malik Shahzad Muzaffar, Marek Šuppa, Matt Conley, Michael Melesse, Milos Puzovic, mohantym, Nathan John Sircombe, Nathan Luehr, Nilesh Agarwalla, Patrice Vignola, peterjc123, Philip Turner, Rajeshwar Reddy T, Robert Kalmar, Rodrigo Formigone, Rohit Santhanam, rui, Sachin Muradi, Saduf2019, sandip, Scott Leishman, Serge Panev, Shi,Guangyong, Srinivasan Narayanamoorthy, stanley, Steven I Reeves, stevenireeves, sushreebarsa, Tamas Bela Feher, Tao He, Thomas Schmeyer, Tiago Almeida, Trevor Morris, Uday Bondhugula, Uwe L. Korn, Varghese, Jojimon, Vishnuvardhan Janapati, William Muir, William Raveane, xutianming, Yasuhiro Matsumoto, Yimei Sun, Yong Tang, Yu Feng, Yuriy Chernyshov, zhaozheng09
Due to security issues in TF 2.8, all boosted trees code has now been removed (after being deprecated in TF 2.8). Users should switch to TensorFlow De…
_GLIBCXX_USE_CXX11_ABI=1. Downstream projects that encounter std::__cxx11 or [abi:cxx11] linker errors will need to adopt this compiler option. See the GNU C++ Library docs on Dual ABI.tf.keras.mixed_precision.experimental API has been removed. The non-experimental symbols under tf.keras.mixed_precision have been available since TensorFlow 2.4 and should be used instead.
tf.keras.mixed_precision symbols. E.g., replace tf.keras.mixed_precision.experimental.global_policy with tf.keras.mixed_precision.global_policy.tf.keras.mixed_precision.experimental.set_policy with tf.keras.mixed_precision.set_global_policy. The experimental symbol set_policy was renamed to set_global_policy in the non-experimental API.LossScaleOptimizer(opt, "dynamic") with LossScaleOptimizer(opt). If you pass anything other than "dynamic" to the second argument, see (1) of the next section."dynamic" to the loss_scale argument (the second argument) of LossScaleOptimizer:
loss_scale argument (the second argument) of Policy:
Policy optionally took in a tf.compat.v1.mixed_precision.LossScale in the constructor, which defaulted to a dynamic loss scale for the "mixed_float16" policy and no loss scale for other policies. In Model.compile, if the model's policy had a loss scale, the optimizer would be wrapped with a LossScaleOptimizer. With the non-experimental Policy, there is no loss scale associated with the Policy, and Model.compile wraps the optimizer with a LossScaleOptimizer if and only if the policy is a "mixed_float16" policy. If you previously passed a LossScale to the experimental Policy, consider just removing it, as the default loss scaling behavior is usually what you want. If you really want to customize the loss scaling behavior, you can wrap your optimizer with a LossScaleOptimizer before passing it to Model.compile.tf.keras.mixed_precision.experimental.get_layer_policy:
tf.keras.mixed_precision.experimental.get_layer_policy(layer) with layer.dtype_policy.tf.mixed_precision.experimental.LossScale and its subclasses have been removed from the TF2 namespace. This symbols were very rarely used and were only useful in TF2 for use in the now-removed tf.keras.mixed_precision.experimental API. The symbols are still available under tf.compat.v1.mixed_precision.experimental_relax_shapes heuristic for tf.function has been deprecated and replaced with reduce_retracing which encompasses broader heuristics to reduce the number of retraces (see below)tf.keras:
tf.keras.applications.resnet_rs models. This includes the ResNetRS50, ResNetRS101, ResNetRS152, ResNetRS200, ResNetRS270, ResNetRS350 and ResNetRS420 model architectures. The ResNetRS models are based on the architecture described in Revisiting ResNets: Improved Training and Scaling Strategiestf.keras.optimizers.experimental.Optimizer. The reworked optimizer gives more control over different phases of optimizer calls, and is easier to customize. We provide Adam, SGD, Adadelta, AdaGrad and RMSprop optimizers based on tf.keras.optimizers.experimental.Optimizer. Generally the new optimizers work in the same way as the old ones, but support new constructor arguments. In the future, the symbols tf.keras.optimizers.Optimizer/Adam/etc will point to the new optimizers, and the previous generation of optimizers will be moved to tf.keras.optimizers.legacy.Optimizer/Adam/etc.tf.keras.layers.UnitNormalization.tf.keras.regularizers.OrthogonalRegularizer, a new regularizer that encourages orthogonality between the rows (or columns) or a weight matrix.tf.keras.layers.RandomBrightness layer for image preprocessing.tf.keras.utils.disable_interactive_logging() to write the logs to ABSL logging. You can also use tf.keras.utils.enable_interactive_logging() to change it back to stdout, or tf.keras.utils.is_interactive_logging_enabled() to check if interactive logging is enabled.verbose argument of Model.evaluate() and Model.predict() to "auto", which defaults to verbose=1 for most cases and defaults to verbose=2 when used with ParameterServerStrategy or with interactive logging disabled.jit_compile in Model.compile() now applies to Model.evaluate() and Model.predict(). Setting jit_compile=True in compile() compiles the model's training, evaluation, and inference steps to XLA. Note that jit_compile=True may not necessarily work for all models.tf.keras.dtensor namespace. The APIs are still classified as experimental. You are welcome to try it out. Please check the tutoral and guide on https://www.tensorflow.org/ for more details about DTensor.tf.lite:
tf.math.argmin/tf.math.argmax for input data type tf.bool on CPU.tf.nn.gelu op for output data type tf.float32 and quantization on CPU.list_ops.tensor_list_set_item with DynamicUpdateSlice.experimental_new_dynamic_range_quantizer in tf.lite.TFLiteConverter to False to disable this changeexperimental_enable_resource_variables on tf.lite.TFLiteConverter is now True by default and will be removed in the future.tf.function:
tf.function can now specify rules regarding when retracing needs to occur by implementing the Tracing Protocol available through tf.types.experimental.SupportsTracingProtocol.TypeSpec classes (as associated with ExtensionTypes) also implement the Tracing Protocol which can be overriden if necessary.reduce_retracing option also uses the Tracing Protocol to proactively generate generalized traces similar to experimental_relax_shapes (which has now been deprecated).Unified eager and tf.function execution:
tf.function, allowing for more consistent feature support in future releases.TF_RUN_EAGER_OP_AS_FUNCTION environment variable in eager context.tf.function itself is unaffected.tf.experimental.dtensor: Added DTensor, an extension to TensorFlow for large-scale modeling with minimal changes to user code. You are welcome to try it out, though be aware that the DTensor API is experimental and up-to backward-incompatible changes. DTensor and Keras integration is published under tf.keras.dtensor in this release (refer to the tf.keras entry). The tutoral and guide for DTensor will be published on https://www.tensorflow.org/. Please stay tuned.
tf.data:
tf.data.experimental.parse_example_dataset when tf.io.RaggedFeatures would specify value_key but no partitions. Before the fix, setting value_key but no partitions would result in the feature key being replaced by the value key, e.g. {'value_key': <RaggedTensor>} instead of {'key': <RaggedTensor>}. Now the correct feature key will be used. This aligns the behavior of tf.data.experimental.parse_example_dataset to match the behavior of tf.io.parse_example.filter_parallelization, to tf.data.experimental.OptimizationOptions. If it is set to True, tf.data will run Filter transformation with multiple threads. Its default value is False if not specified.tf.keras:
ShardedVariables (used for training with tf.distribute.experimental.ParameterServerStrategy).tf.random:
tf.random.experimental.index_shuffle, for shuffling a sequence without materializing the sequence in memory.tf.RaggedTensor:
tf.experimental.RowPartition, which encodes how one dimension in a RaggedTensor relates to another, into the public API.tf.experimental.DynamicRaggedShape, which represents the shape of a RaggedTensor.This release contains contributions from many people at Google, as well as:
Aaron Debattista, Abel Soares Siqueira, Abhishek Varma, Andrei Ivanov, andreii, Andrew Goodbody, apeltop, Arnab Dutta, Ashiq Imran, Banikumar Maiti (Intel Aipg), Ben Greiner, Benjamin Peterson, bhack, Christopher Bate, chunduriv, Copybara-Service, DEKHTIARJonathan, Deven Desai, Duncan Riach, Eric Kunze, Everton Constantino, Faruk D, Fredrik Knutsson, gadagashwini, Gauri1 Deshpande, gtiHibGele, Guozhong Zhuang, Islem-Esi, Ivanov Viktor, Jason Furmanek, Jason Zaman, Jim, Jinzhe Zeng, John Laxson, Jonas Eschle, Jonas Eschle 'Mayou36, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, KaurkerDevourer, Koan-Sin Tan, kushanam, Laramie Leavitt, Li-Wen Chang, lipracer, Louis Sugy, Lu Teng, Mahmoud Abuzaina, Malcolm Slaney, Malik Shahzad Muzaffar, Marek Šuppa, Matt Conley, Michael Melesse, Milos Puzovic, mohantym, Nathan John Sircombe, Nathan Luehr, Nilesh Agarwalla, Patrice Vignola, peterjc123, Philip Turner, Rajeshwar Reddy T, Robert Kalmar, Rodrigo Formigone, Rohit Santhanam, rui, Sachin Muradi, Saduf2019, sandip, Scott Leishman, Serge Panev, Shi,Guangyong, Srinivasan Narayanamoorthy, stanley, Steven I Reeves, stevenireeves, sushreebarsa, Tamas Bela Feher, Tao He, Thomas Schmeyer, Tiago Almeida, Trevor Morris, Uday Bondhugula, Uwe L. Korn, Varghese, Jojimon, Vishnuvardhan Janapati, William Muir, William Raveane, xutianming, Yasuhiro Matsumoto, Yimei Sun, Yong Tang, Yu Feng, Yuriy Chernyshov, zhaozheng09
Due to security issues in TF 2.8, all boosted trees code has now been removed (after being deprecated in TF 2.8). Users should switch to TensorFlow De…
_GLIBCXX_USE_CXX11_ABI=1. Downstream projects that encounter std::__cxx11 or [abi:cxx11] linker errors will need to adopt this compiler option. See the GNU C++ Library docs on Dual ABI.tf.keras.mixed_precision.experimental API has been removed. The non-experimental symbols under tf.keras.mixed_precision have been available since TensorFlow 2.4 and should be used instead.
tf.keras.mixed_precision symbols. E.g., replace tf.keras.mixed_precision.experimental.global_policy with tf.keras.mixed_precision.global_policy.tf.keras.mixed_precision.experimental.set_policy with tf.keras.mixed_precision.set_global_policy. The experimental symbol set_policy was renamed to set_global_policy in the non-experimental API.LossScaleOptimizer(opt, "dynamic") with LossScaleOptimizer(opt). If you pass anything other than "dynamic" to the second argument, see (1) of the next section."dynamic" to the loss_scale argument (the second argument) of LossScaleOptimizer:
loss_scale argument (the second argument) of Policy:
Policy optionally took in a tf.compat.v1.mixed_precision.LossScale in the constructor, which defaulted to a dynamic loss scale for the "mixed_float16" policy and no loss scale for other policies. In Model.compile, if the model's policy had a loss scale, the optimizer would be wrapped with a LossScaleOptimizer. With the non-experimental Policy, there is no loss scale associated with the Policy, and Model.compile wraps the optimizer with a LossScaleOptimizer if and only if the policy is a "mixed_float16" policy. If you previously passed a LossScale to the experimental Policy, consider just removing it, as the default loss scaling behavior is usually what you want. If you really want to customize the loss scaling behavior, you can wrap your optimizer with a LossScaleOptimizer before passing it to Model.compile.tf.keras.mixed_precision.experimental.get_layer_policy:
tf.keras.mixed_precision.experimental.get_layer_policy(layer) with layer.dtype_policy.tf.mixed_precision.experimental.LossScale and its subclasses have been removed from the TF2 namespace. This symbols were very rarely used and were only useful in TF2 for use in the now-removed tf.keras.mixed_precision.experimental API. The symbols are still available under tf.compat.v1.mixed_precision.experimental_relax_shapes heuristic for tf.function has been deprecated and replaced with reduce_retracing which encompasses broader heuristics to reduce the number of retraces (see below)tf.keras:
tf.keras.applications.resnet_rs models. This includes the ResNetRS50, ResNetRS101, ResNetRS152, ResNetRS200, ResNetRS270, ResNetRS350 and ResNetRS420 model architectures. The ResNetRS models are based on the architecture described in Revisiting ResNets: Improved Training and Scaling Strategiestf.keras.optimizers.experimental.Optimizer. The reworked optimizer gives more control over different phases of optimizer calls, and is easier to customize. We provide Adam, SGD, Adadelta, AdaGrad and RMSprop optimizers based on tf.keras.optimizers.experimental.Optimizer. Generally the new optimizers work in the same way as the old ones, but support new constructor arguments. In the future, the symbols tf.keras.optimizers.Optimizer/Adam/etc will point to the new optimizers, and the previous generation of optimizers will be moved to tf.keras.optimizers.legacy.Optimizer/Adam/etc.tf.keras.layers.UnitNormalization.tf.keras.regularizers.OrthogonalRegularizer, a new regularizer that encourages orthogonality between the rows (or columns) or a weight matrix.tf.keras.layers.RandomBrightness layer for image preprocessing.tf.keras.utils.disable_interactive_logging() to write the logs to ABSL logging. You can also use tf.keras.utils.enable_interactive_logging() to change it back to stdout, or tf.keras.utils.is_interactive_logging_enabled() to check if interactive logging is enabled.verbose argument of Model.evaluate() and Model.predict() to "auto", which defaults to verbose=1 for most cases and defaults to verbose=2 when used with ParameterServerStrategy or with interactive logging disabled.jit_compile in Model.compile() now applies to Model.evaluate() and Model.predict(). Setting jit_compile=True in compile() compiles the model's training, evaluation, and inference steps to XLA. Note that jit_compile=True may not necessarily work for all models.tf.keras.dtensor namespace. The APIs are still classified as experimental. You are welcome to try it out. Please check the tutoral and guide on https://www.tensorflow.org/ for more details about DTensor.tf.lite:
tf.math.argmin/tf.math.argmax for input data type tf.bool on CPU.tf.nn.gelu op for output data type tf.float32 and quantization on CPU.list_ops.tensor_list_set_item with DynamicUpdateSlice.experimental_new_dynamic_range_quantizer in tf.lite.TFLiteConverter to False to disable this changeexperimental_enable_resource_variables on tf.lite.TFLiteConverter is now True by default and will be removed in the future.tf.function:
tf.function can now specify rules regarding when retracing needs to occur by implementing the Tracing Protocol available through tf.types.experimental.SupportsTracingProtocol.TypeSpec classes (as associated with ExtensionTypes) also implement the Tracing Protocol which can be overriden if necessary.reduce_retracing option also uses the Tracing Protocol to proactively generate generalized traces similar to experimental_relax_shapes (which has now been deprecated).Unified eager and tf.function execution:
tf.function, allowing for more consistent feature support in future releases.TF_RUN_EAGER_OP_AS_FUNCTION environment variable in eager context.tf.function itself is unaffected.tf.experimental.dtensor: Added DTensor, an extension to TensorFlow for large-scale modeling with minimal changes to user code. You are welcome to try it out, though be aware that the DTensor API is experimental and up-to backward-incompatible changes. DTensor and Keras integration is published under tf.keras.dtensor in this release (refer to the tf.keras entry). The tutoral and guide for DTensor will be published on https://www.tensorflow.org/. Please stay tuned.
tf.data:
tf.data.experimental.parse_example_dataset when tf.io.RaggedFeatures would specify value_key but no partitions. Before the fix, setting value_key but no partitions would result in the feature key being replaced by the value key, e.g. {'value_key': <RaggedTensor>} instead of {'key': <RaggedTensor>}. Now the correct feature key will be used. This aligns the behavior of tf.data.experimental.parse_example_dataset to match the behavior of tf.io.parse_example.filter_parallelization, to tf.data.experimental.OptimizationOptions. If it is set to True, tf.data will run Filter transformation with multiple threads. Its default value is False if not specified.tf.keras:
ShardedVariables (used for training with tf.distribute.experimental.ParameterServerStrategy).tf.random:
tf.random.experimental.index_shuffle, for shuffling a sequence without materializing the sequence in memory.tf.RaggedTensor:
tf.experimental.RowPartition, which encodes how one dimension in a RaggedTensor relates to another, into the public API.tf.experimental.DynamicRaggedShape, which represents the shape of a RaggedTensor.This release contains contributions from many people at Google, as well as:
Aaron Debattista, Abel Soares Siqueira, Abhishek Varma, Andrei Ivanov, andreii, Andrew Goodbody, apeltop, Arnab Dutta, Ashiq Imran, Banikumar Maiti (Intel Aipg), Ben Greiner, Benjamin Peterson, bhack, Christopher Bate, chunduriv, Copybara-Service, DEKHTIARJonathan, Deven Desai, Duncan Riach, Eric Kunze, Everton Constantino, Faruk D, Fredrik Knutsson, gadagashwini, Gauri1 Deshpande, gtiHibGele, Guozhong Zhuang, Islem-Esi, Ivanov Viktor, Jason Furmanek, Jason Zaman, Jim, Jinzhe Zeng, John Laxson, Jonas Eschle, Jonas Eschle 'Mayou36, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, KaurkerDevourer, Koan-Sin Tan, kushanam, Laramie Leavitt, Li-Wen Chang, lipracer, Louis Sugy, Lu Teng, Mahmoud Abuzaina, Malcolm Slaney, Malik Shahzad Muzaffar, Marek Šuppa, Matt Conley, Michael Melesse, Milos Puzovic, mohantym, Nathan John Sircombe, Nathan Luehr, Nilesh Agarwalla, Patrice Vignola, peterjc123, Philip Turner, Rajeshwar Reddy T, Robert Kalmar, Rodrigo Formigone, Rohit Santhanam, rui, Sachin Muradi, Saduf2019, sandip, Scott Leishman, Serge Panev, Shi,Guangyong, Srinivasan Narayanamoorthy, stanley, Steven I Reeves, stevenireeves, sushreebarsa, Tamas Bela Feher, Tao He, Thomas Schmeyer, Tiago Almeida, Trevor Morris, Uday Bondhugula, Uwe L. Korn, Varghese, Jojimon, Vishnuvardhan Janapati, William Muir, William Raveane, xutianming, Yasuhiro Matsumoto, Yimei Sun, Yong Tang, Yu Feng, Yuriy Chernyshov, zhaozheng09
Due to security issues in TF 2.8, all boosted trees code has now been removed (after being deprecated in TF 2.8). Users should switch to TensorFlow De…
_GLIBCXX_USE_CXX11_ABI=1. Downstream projects that encounter std::__cxx11 or [abi:cxx11] linker errors will need to adopt this compiler option. See the GNU C++ Library docs on Dual ABI.tf.keras.mixed_precision.experimental API has been removed. The non-experimental symbols under tf.keras.mixed_precision have been available since TensorFlow 2.4 and should be used instead.
tf.keras.mixed_precision symbols. E.g., replace tf.keras.mixed_precision.experimental.global_policy with tf.keras.mixed_precision.global_policy.tf.keras.mixed_precision.experimental.set_policy with tf.keras.mixed_precision.set_global_policy. The experimental symbol set_policy was renamed to set_global_policy in the non-experimental API.LossScaleOptimizer(opt, "dynamic") with LossScaleOptimizer(opt). If you pass anything other than "dynamic" to the second argument, see (1) of the next section."dynamic" to the loss_scale argument (the second argument) of LossScaleOptimizer:
loss_scale argument (the second argument) of Policy:
Policy optionally took in a tf.compat.v1.mixed_precision.LossScale in the constructor, which defaulted to a dynamic loss scale for the "mixed_float16" policy and no loss scale for other policies. In Model.compile, if the model's policy had a loss scale, the optimizer would be wrapped with a LossScaleOptimizer. With the non-experimental Policy, there is no loss scale associated with the Policy, and Model.compile wraps the optimizer with a LossScaleOptimizer if and only if the policy is a "mixed_float16" policy. If you previously passed a LossScale to the experimental Policy, consider just removing it, as the default loss scaling behavior is usually what you want. If you really want to customize the loss scaling behavior, you can wrap your optimizer with a LossScaleOptimizer before passing it to Model.compile.tf.keras.mixed_precision.experimental.get_layer_policy:
tf.keras.mixed_precision.experimental.get_layer_policy(layer) with layer.dtype_policy.tf.mixed_precision.experimental.LossScale and its subclasses have been removed from the TF2 namespace. This symbols were very rarely used and were only useful in TF2 for use in the now-removed tf.keras.mixed_precision.experimental API. The symbols are still available under tf.compat.v1.mixed_precision.experimental_relax_shapes heuristic for tf.function has been deprecated and replaced with reduce_retracing which encompasses broader heuristics to reduce the number of retraces (see below)tf.keras:
tf.keras.applications.resnet_rs models. This includes the ResNetRS50, ResNetRS101, ResNetRS152, ResNetRS200, ResNetRS270, ResNetRS350 and ResNetRS420 model architectures. The ResNetRS models are based on the architecture described in Revisiting ResNets: Improved Training and Scaling Strategiestf.keras.optimizers.experimental.Optimizer. The reworked optimizer gives more control over different phases of optimizer calls, and is easier to customize. We provide Adam, SGD, Adadelta, AdaGrad and RMSprop optimizers based on tf.keras.optimizers.experimental.Optimizer. Generally the new optimizers work in the same way as the old ones, but support new constructor arguments. In the future, the symbols tf.keras.optimizers.Optimizer/Adam/etc will point to the new optimizers, and the previous generation of optimizers will be moved to tf.keras.optimizers.legacy.Optimizer/Adam/etc.tf.keras.layers.UnitNormalization.tf.keras.regularizers.OrthogonalRegularizer, a new regularizer that encourages orthogonality between the rows (or columns) or a weight matrix.tf.keras.layers.RandomBrightness layer for image preprocessing.tf.keras.utils.disable_interactive_logging() to write the logs to ABSL logging. You can also use tf.keras.utils.enable_interactive_logging() to change it back to stdout, or tf.keras.utils.is_interactive_logging_enabled() to check if interactive logging is enabled.verbose argument of Model.evaluate() and Model.predict() to "auto", which defaults to verbose=1 for most cases and defaults to verbose=2 when used with ParameterServerStrategy or with interactive logging disabled.jit_compile in Model.compile() now applies to Model.evaluate() and Model.predict(). Setting jit_compile=True in compile() compiles the model's training, evaluation, and inference steps to XLA. Note that jit_compile=True may not necessarily work for all models.tf.keras.dtensor namespace. The APIs are still classified as experimental. You are welcome to try it out. Please check the tutoral and guide on https://www.tensorflow.org/ for more details about DTensor.tf.lite:
tf.math.argmin/tf.math.argmax for input data type tf.bool on CPU.tf.nn.gelu op for output data type tf.float32 and quantization on CPU.list_ops.tensor_list_set_item with DynamicUpdateSlice.experimental_new_dynamic_range_quantizer in tf.lite.TFLiteConverter to False to disable this changeexperimental_enable_resource_variables on tf.lite.TFLiteConverter is now True by default and will be removed in the future.tf.function:
tf.function can now specify rules regarding when retracing needs to occur by implementing the Tracing Protocol available through tf.types.experimental.SupportsTracingProtocol.TypeSpec classes (as associated with ExtensionTypes) also implement the Tracing Protocol which can be overriden if necessary.reduce_retracing option also uses the Tracing Protocol to proactively generate generalized traces similar to experimental_relax_shapes (which has now been deprecated).Unified eager and tf.function execution:
tf.function, allowing for more consistent feature support in future releases.TF_RUN_EAGER_OP_AS_FUNCTION environment variable in eager context.tf.function itself is unaffected.tf.data:
tf.data.experimental.parse_example_dataset when tf.io.RaggedFeatures would specify value_key but no partitions. Before the fix, setting value_key but no partitions would result in the feature key being replaced by the value key, e.g. {'value_key': <RaggedTensor>} instead of {'key': <RaggedTensor>}. Now the correct feature key will be used. This aligns the behavior of tf.data.experimental.parse_example_dataset to match the behavior of tf.io.parse_example.filter_parallelization, to tf.data.experimental.OptimizationOptions. If it is set to True, tf.data will run Filter transformation with multiple threads. Its default value is False if not specified.tf.keras:
ShardedVariables (used for training with tf.distribute.experimental.ParameterServerStrategy).tf.random:
tf.random.experimental.index_shuffle, for shuffling a sequence without materializing the sequence in memory.tf.RaggedTensor:
tf.experimental.RowPartition, which encodes how one dimension in a RaggedTensor relates to another, into the public API.tf.experimental.DynamicRaggedShape, which represents the shape of a RaggedTensor.This release contains contributions from many people at Google, as well as:
Aaron Debattista, Abel Soares Siqueira, Abhishek Varma, Andrei Ivanov, andreii, Andrew Goodbody, apeltop, Arnab Dutta, Ashiq Imran, Banikumar Maiti (Intel Aipg), Ben Greiner, Benjamin Peterson, bhack, Christopher Bate, chunduriv, Copybara-Service, DEKHTIARJonathan, Deven Desai, Duncan Riach, Eric Kunze, Everton Constantino, Faruk D, Fredrik Knutsson, gadagashwini, Gauri1 Deshpande, gtiHibGele, Guozhong Zhuang, Islem-Esi, Ivanov Viktor, Jason Furmanek, Jason Zaman, Jim, Jinzhe Zeng, John Laxson, Jonas Eschle, Jonas Eschle 'Mayou36, Jonathan Dekhtiar, Kaixi Hou, Kanvi Khanna, KaurkerDevourer, Koan-Sin Tan, kushanam, Laramie Leavitt, Li-Wen Chang, lipracer, Louis Sugy, Lu Teng, Mahmoud Abuzaina, Malcolm Slaney, Malik Shahzad Muzaffar, Marek Šuppa, Matt Conley, Michael Melesse, Milos Puzovic, mohantym, Nathan John Sircombe, Nathan Luehr, Nilesh Agarwalla, Patrice Vignola, peterjc123, Philip Turner, Rajeshwar Reddy T, Robert Kalmar, Rodrigo Formigone, Rohit Santhanam, rui, Sachin Muradi, Saduf2019, sandip, Scott Leishman, Serge Panev, Shi,Guangyong, Srinivasan Narayanamoorthy, stanley, Steven I Reeves, stevenireeves, sushreebarsa, Tamas Bela Feher, Tao He, Thomas Schmeyer, Tiago Almeida, Trevor Morris, Uday Bondhugula, Uwe L. Korn, Varghese, Jojimon, Vishnuvardhan Janapati, William Muir, William Raveane, xutianming, Yasuhiro Matsumoto, Yimei Sun, Yong Tang, Yu Feng, Yuriy Chernyshov, zhaozheng09
This release introduces several vulnerability fixes:
This release introduces several vulnerability fixes:
ThreadUnsafeUnigramCandidateSampler caused by missing validation (CVE-2022-41880)ndarray_tensor_bridge (CVE-2022-41884)FusedResizeAndPadConv2D (CVE-2022-41885)ImageProjectiveTransformV2 (CVE-2022-41886)tf.image.generate_bounding_box_proposals on GPU (CVE-2022-41888)pywrap_tfe_src caused by invalid attributes (CVE-2022-41889)CHECK fail in BCast (CVE-2022-41890)TensorListConcat (CVE-2022-41891)CHECK_EQ fail in TensorListResize (CVE-2022-41893)CONV_3D_TRANSPOSE on TFLite (CVE-2022-41894)MirrorPadGrad (CVE-2022-41895)Mfcc (CVE-2022-41896)FractionalMaxPoolGrad (CVE-2022-41897)CHECK fail in SparseFillEmptyRowsGrad (CVE-2022-41898)CHECK fail in SdcaOptimizer (CVE-2022-41899)FractionalAvgPool and FractionalMaxPool(CVE-2022-41900)CHECK_EQ in SparseMatrixNNZ (CVE-2022-41901)ResizeNearestNeighborGrad (CVE-2022-41907)CHECK fail in PyFunc (CVE-2022-41908)CompositeTensorVariantToComponents (CVE-2022-41909)QuantizeAndDequantizeV2 (CVE-2022-41910)CHECK failure in SobolSample via missing validation (CVE-2022-35935)CHECK fail in TensorListScatter and TensorListScatterV2 in eager mode (CVE-2022-35935)This releases introduces several vulnerability fixes:
This releases introduces several vulnerability fixes:
CHECK failure in tf.reshape caused by overflows (CVE-2022-35934)CHECK failure in SobolSample caused by missing validation (CVE-2022-35935)Gather_nd op in TF Lite (CVE-2022-35937)CHECK failure in TensorListReserve caused by missing validation (CVE-2022-35960)Scatter_nd op in TF Lite (CVE-2022-35939)RaggedRangeOp (CVE-2022-35940)CHECK failure in AvgPoolOp (CVE-2022-35941)CHECK failures in UnbatchGradOp (CVE-2022-35952)CHECK failures in AvgPool3DGrad (CVE-2022-35959)CHECK failures in FractionalAvgPoolGrad (CVE-2022-35963)BlockLSTMGradV2 (CVE-2022-35964)LowerBound and UpperBound (CVE-2022-35965)QuantizedAvgPool (CVE-2022-35966)QuantizedAdd (CVE-2022-35967)CHECK fail in AvgPoolGrad (CVE-2022-35968)CHECK fail in Conv2DBackpropInput (CVE-2022-35969)QuantizedInstanceNorm (CVE-2022-35970)CHECK fail in FakeQuantWithMinMaxVars (CVE-2022-35971)Requantize (CVE-2022-36017)QuantizedBiasAdd (CVE-2022-35972)CHECK fail in FakeQuantWithMinMaxVarsPerChannel (CVE-2022-36019)QuantizedMatMul (CVE-2022-35973)QuantizeDownAndShrinkRange (CVE-2022-35974)QuantizedRelu and QuantizedRelu6 (CVE-2022-35979)CHECK fail in FractionalMaxPoolGrad (CVE-2022-35981)CHECK fail in RaggedTensorToVariant (CVE-2022-36018)CHECK fail in QuantizeAndDequantizeV3 (CVE-2022-36026)SparseBincount (CVE-2022-35982)CHECK fail in Save and SaveSlices (CVE-2022-35983)CHECK fail in ParameterizedTruncatedNormal (CVE-2022-35984)CHECK fail in LRNGrad (CVE-2022-35985)RaggedBincount (CVE-2022-35986)CHECK fail in DenseBincount (CVE-2022-35987)CHECK fail in tf.linalg.matrix_rank (CVE-2022-35988)CHECK fail in MaxPool (CVE-2022-35989)CHECK fail in Conv2DBackpropInput (CVE-2022-35999)CHECK fail in EmptyTensorList (CVE-2022-35998)CHECK fail in tf.sparse.cross (CVE-2022-35997)Conv2D (CVE-2022-35996)CHECK fail in AudioSummaryV2 (CVE-2022-35995)CHECK fail in CollectiveGather (CVE-2022-35994)CHECK fail in SetSize (CVE-2022-35993)CHECK fail in TensorListFromTensor (CVE-2022-35992)CHECK fail in TensorListScatter and TensorListScatterV2 (CVE-2022-35991)CHECK fail in FakeQuantWithMinMaxVarsPerChannelGradient (CVE-2022-35990)CHECK fail in FakeQuantWithMinMaxVarsGradient (CVE-2022-36005)CHECK fail in tf.random.gamma (CVE-2022-36004)CHECK fail in RandomPoissonV2 (CVE-2022-36003)CHECK fail in Unbatch (CVE-2022-36002)CHECK fail in DrawBoundingBoxes (CVE-2022-36001)CHECK fail in Eig (CVE-2022-36000)mlir::tfg::GraphDefImporter::ConvertNodeDef (CVE-2022-36013)mlir::tfg::TFOp::nameAttr (CVE-2022-36014)CHECK-fail in tensorflow::full_type::SubstituteFromAttrs (CVE-2022-36016)Gather_nd op in TF Lite Micro (CVE-2022-35938)Add an upper bound for protobuf in setup.py since protobuf after version 3.20 is currently incompatible with TensorFlow. See https://github.com/tensor
Add an upper bound for protobuf in setup.py since protobuf after version 3.20 is currently incompatible with TensorFlow. See https://github.com/tensorflow/tensorflow/issues/53234, https://github.com/protocolbuffers/protobuf/issues/9954 and https://github.com/tensorflow/tensorflow/issues/56077.
Your coding agent can read these notes before it upgrades. Set up the MCP server →