运行笔记本时出现以下错误:
InvalidArgumentErrorTraceback (most recent call last)
<ipython-input-77-e16e0fd6d275> in <module>()
----> 1 tpu_ops = tf.contrib.tpu.batch_parallel(run_find_closest_latent_vector, [], num_shards=8)
2
3 def run_once():
4 session_tpu.run(tpu_ops)
5
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/tpu/python/tpu/tpu.pyc in batch_parallel(computation, inputs, num_shards, infeed_queue, device_assignment, name)
981 infeed_queue=infeed_queue,
982 device_assignment=device_assignment,
--> 983 name=name)
984
985
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/tpu/python/tpu/tpu.pyc in shard(computation, inputs, num_shards, input_shard_axes, outputs_from_all_shards, output_shard_axes, infeed_queue, device_assignment, name)
879 infeed_queue=infeed_queue,
880 device_assignment=device_assignment,
--> 881 name=name)
882
883 # There must be at least one shard since num_shards > 0.
/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/tpu/python/tpu/tpu.pyc in replicate(computation, inputs, infeed_queue, device_assignment, name)
505 …Run Code Online (Sandbox Code Playgroud)