Kaggle TPU切换到tf 2.3.1。 但我需要TF2.2.0
我试过:
!pip install tensorflow~=2.2.0
Tensorflow切换到2.2.1。但我得到了一个错误:
InvalidArgumentError: NodeDef expected inputs 'string' do not match 0 inputs specified; Op ; attr=T:type; attr=tensor_name:string; attr=send_device:string; attr=send_device_incarnation:int; attr=recv_device:string; attr=client_terminated:bool,default=false; is_stateful=true>; NodeDef: {{node _Send}}
打电话时:
tpu = tf.distribute.cluster_resolver.TPUClusterResolver() # TPU detection
print('Running on TPU ', tpu.cluster_spec().as_dict()['worker'])
tf.config.experimental_connect_to_cluster(tpu)
tf.tpu.experimental.initialize_tpu_system(tpu)
Google Colab上没有这样的问题
看来这是不可能的。参考:
https://www.kaggle.com/questions-and-answers/195058
相关问题 更多 >
编程相关推荐