Open BITQinYong opened 5 years ago
are you using
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
or
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.3
set_session(tf.Session(config=config))
to limit the memory?
I used them and encountered the same problem with you, and removing there limits solved the problem
When I use two gpus to train Mask_Rcnn,it will appear error.
InvalidArgumentError (see above for traceback): Cannot colocate nodes 'tower_0/mask_rcnn/Variable/anchors/Variable/read_tower_0/mask_rcnn/Variable_0' and 'anchors/Variable: Cannot merge devices with incompatible ids: '/device:GPU:1' and '/device:GPU:0' [[Node: tower_0/mask_rcnn/Variable/anchors/Variable/read_tower_0/mask_rcnn/Variable_0 = IdentityT=DT_FLOAT, _class=["loc:@anchors/Variable"], _device="/device:GPU:0"]]