Keras CNN with Raspberry Pi

I am trying to use a Convolutional Neural Network that I trained on my laptop to make predictions on my Raspberry Pi but I am getting an error message whenever I use the model.predict function. I am able to make predictions on my laptop.
This is the error:

2019-03-26 17:41:09.178819: E tensorflow/core/common_runtime/executor.cc:624] Executor failed to create kernel. Not found: No registered '_FusedConv2D' OpKernel for CPU devices compatible with node {{node conv2d_1/Relu}}
    .  Registered:  <no registered kernels>

     [[{{node conv2d_1/Relu}}]]
Traceback (most recent call last):
  File "test.py", line 34, in <module>
print(predict(data, model))
  File "test.py", line 25, in predict
predictions = model.predict(sample_reshaped)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 1169, in predict
steps=steps)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training_arrays.py", line 294, in predict_loop
batch_outs = f(ins_batch)
  File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 2715, in __call__
return self._call(inputs)
  File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 2671, in _call
session)
  File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 2623, in _make_callable
callable_fn = session._make_callable_from_options(callable_opts)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1471, in _make_callable_from_options
return BaseSession._Callable(self, callable_options)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1425, in __init__
session._session, options_ptr, status)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: No registered '_FusedConv2D' OpKernel for CPU devices compatible with node {{node conv2d_1/Relu}}
    .  Registered:  <no registered kernels>

     [[{{node conv2d_1/Relu}}]]

When I used a network architecture with just a dense layer, there was no error and it was able to make a prediction successfully.

To me, it sounds like it was compiled for a CPU or architecture different than the one it is running on.

Is it possible to compile it from source on the Raspberry PI itself? Or look for an ARM version?

You said it worked just fine on your laptop, which presumably uses an Intel 64-bit CPU, while the Raspberry PI uses an ARM CPU.

Take a look here: https://www.tensorflow.org/install/source_rpi and see if that’s a possibility?