shenweichen/DeepCTR

I'm using this model with cpu, so I'm getting an error.

Opened this issue · 0 comments

I'm using the DCNMix model.
I �trained and saved the model using gpu. I'm using this model with cpu, so I'm getting an error.
Why is there an error? Please solve the problem.

code: df_test_seg_dup_pred = loaded_model.predict(df_test_seg_dup_model_input, 32)
error:
InvalidArgumentError Traceback (most recent call last)
Cell In[42], line 2
1 with tf.device("CPU:0"):
----> 2 df_test_seg_dup_pred = loaded_model.predict(df_test_seg_dup_model_input, 32)

File /opt/conda/lib/python3.8/site-packages/keras/utils/traceback_utils.py:67, in filter_traceback..error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.traceback)
---> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb

File /opt/conda/lib/python3.8/site-packages/tensorflow/python/eager/execute.py:54, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
52 try:
53 ctx.ensure_initialized()
---> 54 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
55 inputs, attrs, num_outputs)
56 except core._NotOkStatusException as e:
57 if name is not None:

InvalidArgumentError: Graph execution error:

Detected at node 'model/linear0sparse_emb_cat_t1a030300010/embedding_lookup' defined at (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main