title: Build a neural network using output of another neural network, problem with tensors
body: <p>I'm trying do some NLP on stack overflow posts to predict tags according to what's in the title.</p>
  <p>I have a constraint which is I have to embed my sentences using the framework of <a href="https://github.com/UKPLab/sentence-transformers" rel="nofollow noreferrer">Sentence transformers</a></p>
  <p>The idea was to embed the sentences and use them as an input to a neural network I built.</p>
  <p>I'm not an expert in neural network so there are probably a lot of things that I'm missing</p>
  <p>The problem I encounter is it failed to convert to a tensor.
  I have tried solving this with <a href="https://stackoverflow.com/questions/58636087/tensorflow-valueerror-failed-to-convert-a-numpy-array-to-a-tensor-unsupporte">this post on SO</a> , but still have the same issue...</p>
  <p>Below is my code :</p>
  <p><a href="https://i.stack.imgur.com/5iISjm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5iISjm.png" alt="enter image description here" /></a></p>
  <pre><code>title_list = df.Title.tolist()
  
  model = SentenceTransformer('paraphrase-distilroberta-base-v1')
  embeddings = model.encode(title_list)
  embeddings_list = [elem for elem in embeddings_ex]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/sW4a6l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sW4a6l.png" alt="enter image description here" /></a></p>
  <pre><code>df_embed = df 
  df_embed['Embeddings'] = embeddings_list
  df_embed.Embeddings = [np.asarray(x).astype('float32') for x in df_embed.Embeddings]
  
  X = df_embed['Embeddings'].values
  y = df_embed.Tags
  
  mlb = MultiLabelBinarizer(classes=top_tags)
  y_mlb = pd.DataFrame(mlb.fit_transform(y),columns=mlb.classes_, index=y.index)
  
  from sklearn.model_selection import train_test_split
  
  X_train, X_val, y_train, y_val = train_test_split(X, y_mlb, test_size = 0.3, random_state = 0)
  X_val, X_test, y_val, y_test = train_test_split(X_val, y_val, test_size = 0.4, random_state = 0)
  
  model = Sequential()
  # Input - Layer
  model.add(Dense(100, activation = &quot;relu&quot;))
  # Hidden - Layers
  model.add(Dropout(0.3, noise_shape=None, seed=None))
  # Output- Layer
  model.add(Dense(50, activation = &quot;sigmoid&quot;))
  
  
  model.compile(loss='binary_crossentropy',
                optimizer=Adam(0.01),
                metrics=['accuracy'])
  
  hist = model.fit(X_train, y_train, batch_size=8, epochs=10, validation_split=0.1)
  </code></pre>
  <p>I got this error:</p>
  <pre><code>ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).
  </code></pre>