Closed Ananthan4451 closed 4 years ago
solved it by adding
config = tensorflow.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 = tensorflow.Session(config=config) keras.backend.set_session(session)
model = load_model('traffic_classifier.h5') model._make_predict_function()
I encountered the same error and when I adding your solution I encounter another error FailedPreconditionError: Error while reading resource variable conv2d_1/bias from Container: localhost. This could mean that the variable was uninitialized. Not found: Resource localhost/conv2d_1/bias/class tensorflow::Var does not exist. [[{{node conv2d_1/BiasAdd/ReadVariableOp}}]]
I'm working on conda environment without utilizing GPU, working on Flask and tensorflow = 1.14
Hi, i'm using keras and tensorflow for this code
it shows the error tensorflow.python.framework.errors_impl.InvalidArgumentError: Tensor conv2d_1_input:0, specified in either feed_devices or fetch_devices was not found in the Graph
please help me on this