9

I use efficient-net with tensorflow2.3 API (keras==2.4.3) https://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet

I could train and prediction on jupyterlab. On the other hand, while Flask implementation, model checkpoint could be loaded but model.predict(numpy_img_array) doesn't work, and the following error occured. What does this error mean ?

And I used docker image tensorflow/tensorflow:2.3.0-gpu-jupyter is used, and I checked model.summary() works correctly.

Sincerely

 2020-09-04 11:22:40.559654: E tensorflow/stream_executor/cuda/cuda_driver.cc:951] could not synchronize on CUDA context: CUDA_ERROR_NOT_INITIALIZED: initialization error :: *** Begin stack trace ***
   tensorflow::CurrentStackTrace()
   stream_executor::gpu::GpuDriver::SynchronizeContext(stream_executor::gpu::GpuContext*)
   stream_executor::StreamExecutor::SynchronizeAllActivity()
   tensorflow::GPUUtil::SyncAll(tensorflow::Device*)
   tensorflow::BaseGPUDevice::Sync()
   tensorflow::TensorHandle::CopyToDevice(tensorflow::EagerContext const&, tensorflow::Device*, tensorflow::Tensor*)
   tensorflow::TensorHandle::Resolve(tensorflow::Status*)
   TFE_TensorHandleResolve
   _PyEval_EvalFrameDefault
   _PyFunction_FastCallDict
   _PyObject_FastCallKeywords
   _PyEval_EvalFrameDefault
   PyObject_Call
   _PyFunction_FastCallDict
   _PyObject_FastCallKeywords
   _PyEval_EvalFrameDefault
   PyEval_EvalCode
   PyRun_FileExFlags
   PyRun_SimpleFileExFlags
   Py_Main
   main
   __libc_start_main
   _start
 *** End stack trace ***

0 Answers0