Colab不断连

回眸只為那壹抹淺笑 提交于 2020-02-28 10:43:36

更新后的colab:

setInterval(()=>{
    let a =document.querySelector('colab-connect-button');
    if(a.shadowRoot.querySelector('#connect').innerText==="重新连接"){
        a.click();
}
},1000)

更新前的colab:

setInterval(()=>{
    if(Array.from(document.getElementById("connect").children[0].children[2].innerHTML).splice(3,4).toString() === '重,新,连,接'){
        document.getElementById("connect").children[0].children[2].click()
  }
},1000)

使用TensorFlow 2.0:

%tensorflow_version 2.x
import tensorflow as tf
from tensorflow.keras import layers
print(tf.__version__)
print(tf.keras.__version__)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!