tensor is not in the gragh

config = tf.ConfigProto(
device_count={'GPU': 1},
intra_op_parallelism_threads=1,
allow_soft_placement=True
)

config.gpu_options.allow_growth = True
config.gpu_options.per_process_gpu_memory_fraction = 0.6

session = tf.Session(config=config)

keras.backend.set_session(session)

with session.as_default():
  with session.graph.as_default():

    predict_result = modell.predict([X1,X2])

猜你喜欢

转载自www.cnblogs.com/yingxinff/p/13203435.html