code: def get_deep_tensors(row, column_info):
      """
      convert a row to tensors given column feature information of a WideAndDeep model
  
      :param row: Row of userId, itemId, features and label
      :param column_info: ColumnFeatureInfo specify information of different features
      :return: an array of tensors as input for deep part of a WideAndDeep model
      """
  
      ind_col = column_info.indicator_cols
      emb_col = column_info.embed_cols
      cont_col = column_info.continuous_cols
  
      ind_tensor = np.zeros(
          sum(column_info.indicator_dims),
      )
      # setup indicators
      acc = 0
      for i in range(0, len(ind_col)):
          index = row[ind_col[i]]
          if i == 0:
              res = index
          else:
              acc += column_info.indicator_dims[i - 1]
              res = acc + index
          ind_tensor[res] = 1
  
      emb_tensor = np.zeros(
          len(emb_col),
      )
      for i in range(0, len(emb_col)):
          emb_tensor[i] = float(row[emb_col[i]])
  
      cont_tensor = np.zeros(
          len(cont_col),
      )
      for i in range(0, len(cont_col)):
          cont_tensor[i] = float(row[cont_col[i]])
  
      has_ind = len(ind_col) > 0
      has_emd = len(emb_col) > 0
      has_cont = len(cont_col) > 0
      if has_ind and has_emd and has_cont:
          deep_tensor = [ind_tensor, emb_tensor, cont_tensor]
      elif (not has_ind) and has_emd and has_cont:
          deep_tensor = [emb_tensor, cont_tensor]
      elif has_ind and (not has_emd) and has_cont:
          deep_tensor = [ind_tensor, cont_tensor]
      elif has_ind and has_emd and (not has_cont):
          deep_tensor = [ind_tensor, emb_tensor]
      elif (not has_ind) and (not has_emd) and has_cont:
          deep_tensor = [cont_tensor]
      elif (not has_ind) and has_emd and (not has_cont):
          deep_tensor = [emb_tensor]
      elif has_ind and (not has_emd) and (not has_cont):
          deep_tensor = [ind_tensor]
      else:
          raise TypeError("Empty deep tensors")
      return deep_tensor
  
file_path: analytics-zoo/pyzoo/zoo/models/recommendation/utils.py
imports: import numpy
  from bigdl.util.common import JTensor, Sample
  from zoo.common.utils import callZooFunc
  from zoo.models.recommendation import UserItemFeature
label_desc: Use image node_id 6 for calling a global function with example usage: get_deep_tensors(row, column_info) and returns: deep_tensor