title: How to make SHAP's DeepExplainer work with deepctr library
body: <p>I am using DeepCTR (version <code>0.7.5</code>) keras library to predict ctr (using DeepFM)<br />
  <a href="https://deepctr-doc.readthedocs.io/en/latest/deepctr.models.deepfm.html" rel="nofollow noreferrer">https://deepctr-doc.readthedocs.io/en/latest/deepctr.models.deepfm.html</a>.<br />
  Here is a small example of the code to fit the model:</p>
  <pre><code>#Imports, then feature preperation...
  
  model = DeepFM(linear_feature_columns, dnn_feature_columns, task='binary')
  model.compile(optimizer, loss)
  train_model_input = [train_df[name] for name in feature_names]
  model.fit(x=train_model_input, y=train_df[TARGET].values, validation_split=0.3)
  </code></pre>
  <p>But when I try the following:</p>
  <pre><code>e = shap.DeepExplainer(model, test_df.head(50))
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>ValueError: Cannot feed value of shape (50, 17) for Tensor 'x:0', which has shape '(?, 1)'
  </code></pre>
  <p>I looked all over google and tried playing alot with the inputs shape and the SHAP API but nothing worked for me.<br />
  <strong>Additional info</strong>:<br />
  The model inputs format (17 values) is:</p>
  <pre><code>[&lt;tf.Tensor 'x:0' shape=(?, 1) dtype=int32&gt;, &lt;tf.Tensor 'x1:0' shape=(?, 1) dtype=int32&gt;...
  </code></pre>
  <p>And outputs is:</p>
  <pre><code>&lt;tf.Tensor 'prediction_layer/Reshape:0' shape=(?, 1) dtype=float32&gt;
  </code></pre>