Python &引用;不可用:插座关闭“;在TPU上进行培训时出错

Python &引用;不可用:插座关闭“;在TPU上进行培训时出错,python,tensorflow,google-colaboratory,tpu,Python,Tensorflow,Google Colaboratory,Tpu,在TPU上培训我的变压器型号时,我遇到以下错误: UnavailableError: 2 root error(s) found. (0) Unavailable: Socket closed (1) Invalid argument: Unable to find a context_id matching the specified one (13089686768223941123). Perhaps the worker was restarted, or the context

在TPU上培训我的变压器型号时,我遇到以下错误:

UnavailableError: 2 root error(s) found.
  (0) Unavailable: Socket closed
  (1) Invalid argument: Unable to find a context_id matching the specified one (13089686768223941123). Perhaps the worker was restarted, or the context was GC'd?
我的数据根据序列长度划分为多个存储桶,以获得最佳性能:

  • 长度小于或等于8

  • 从9点到16点

  • 从17岁到24岁

  • 我从随机桶中装载每批货物

    当我第一次访问每个bucket时,tensorflow内核会创建一个新的图和回溯模型


    第三次回溯时发生的错误。因此,如果我从任何两个桶训练,我都不会出错。

    据我所知,这是TF2.3中的一个错误

    我切换到2.2.0,错误消失了