How can I run it on GPU mode?
BlueAnthony opened this issue · comments
BlueAnthony commented
I use tensorflow 1.9 and I add in eval.py:
import os os.environ["CUDA_VISIBLE_DEVICES"] = "0"
But it still run on CPU
Also, I try to add tf.configProto in oct_conv2d.py:
import tensorflow.keras.backend as K gpu_options = tf.GPUOptions(allow_growth=True) sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options)) K.set_session(sess)
Any suggestion?
Thank you~
こしあん commented
@BlueAnthony
Just comment out following codes. (train.py)
# convert to tpu model
# tpu_grpc_url = "grpc://"+os.environ["COLAB_TPU_ADDR"]
# tpu_cluster_resolver = tf.contrib.cluster_resolver.TPUClusterResolver(tpu_grpc_url)
# strategy = keras_support.TPUDistributionStrategy(tpu_cluster_resolver)
# model = tf.contrib.tpu.keras_to_tpu_model(model, strategy=strategy)