Классифицируй структурированные данные

View on TensorFlow.org Run in Google Colab View source on GitHub Download notebook

Этот учебник показывает, как классифицировать структурированные данные (например, табличные данные в CSV). Мы будем использовать Keras чтобы определить модель и feature columns в для отображения столбцов в CSV в признаки, используемыми для обучения модели. Этот учебник содержит полный код с помощью которого Вы сможете:

  • Загрузить CSV файл с использованием Pandas.
  • Создать входной пайплайн для пакетной обработки и перемешивания строк, используя tf.data.
  • Отобразить колонки CSV в признаки используемые для обучения модели используя feature columns.
  • Построить, обучить и оценить модель используя Keras.

Набор данных

Мы будем использовать небольшой датасет предоставленный Кливлендской клиникой (Cleveland Clinic Foundation for Heart Disease). Датасет содержит несколько сотен строк в формате CSV. Каждая строка описывает пациента, а каждая колонка характеризует свойство. Мы будем использовать эту информацию чтобы предсказать, есть ли у пациента сердечное заболевание, что в этом наборе данных является задачей бинарной классификации.

По ссылке описание этого датасета. Обратите внимание что в нем есть и числовые и категорийные столбцы.

Column Description Feature Type Data Type
Age Age in years Numerical integer
Sex (1 = male; 0 = female) Categorical integer
CP Chest pain type (0, 1, 2, 3, 4) Categorical integer
Trestbpd Resting blood pressure (in mm Hg on admission to the hospital) Numerical integer
Chol Serum cholestoral in mg/dl Numerical integer
FBS (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false) Categorical integer
RestECG Resting electrocardiographic results (0, 1, 2) Categorical integer
Thalach Maximum heart rate achieved Numerical integer
Exang Exercise induced angina (1 = yes; 0 = no) Categorical integer
Oldpeak ST depression induced by exercise relative to rest Numerical integer
Slope The slope of the peak exercise ST segment Numerical float
CA Number of major vessels (0-3) colored by flourosopy Numerical integer
Thal 3 = normal; 6 = fixed defect; 7 = reversable defect Categorical string
Target Diagnosis of heart disease (1 = true; 0 = false) Classification integer

Импортируйте TensorFlow и прочие библиотеки

pip install -q sklearn
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/tmpfs/src/tf_docs_env/bin/python -m pip install --upgrade pip' command.

import numpy as np
import pandas as pd

import tensorflow as tf

from tensorflow import feature_column
from tensorflow.keras import layers
from sklearn.model_selection import train_test_split

Используйте Pandas чтобы создать датафрейм

Pandas это библиотека Python множеством полезных утилит для загрузки и работы со структурированными данными. Мы будем использовать Pandas для скачивания данных по ссылке и выгрузки их в датафрейм.

URL = 'https://storage.googleapis.com/applied-dl/heart.csv'
dataframe = pd.read_csv(URL)
dataframe.head()

Разбейте датафрейм на обучающую, проверочную и тестовую выборки

Датасет который мы скачали был одним CSV файлом. Мы разделим его на тренировочную, проверочную и тестовую выборки.

train, test = train_test_split(dataframe, test_size=0.2)
train, val = train_test_split(train, test_size=0.2)
print(len(train), 'train examples')
print(len(val), 'validation examples')
print(len(test), 'test examples')
193 train examples
49 validation examples
61 test examples

Создайте входной пайплайн с помощью tf.data

Далее мы обернем датафреймы в tf.data. Это позволит нам использовать feature columns в качестве моста для отображения столбцов датафрейма Pandas в признаки используемые для обучения модели. Если бы мы работали с очень большим CSV файлом (таким большим, что он не помещается в память), нам нужно было использовать tf.data чтобы прочитать его напрямую с диска. Подобный случай не рассматривается в этом уроке.

# Вспомогательный метод для создания tf.data dataset из датафрейма Pandas
def df_to_dataset(dataframe, shuffle=True, batch_size=32):
  dataframe = dataframe.copy()
  labels = dataframe.pop('target')
  ds = tf.data.Dataset.from_tensor_slices((dict(dataframe), labels))
  if shuffle:
    ds = ds.shuffle(buffer_size=len(dataframe))
  ds = ds.batch(batch_size)
  return ds
batch_size = 5 # Небольшой размер пакета используется для демонстрационных целей
train_ds = df_to_dataset(train, batch_size=batch_size)
val_ds = df_to_dataset(val, shuffle=False, batch_size=batch_size)
test_ds = df_to_dataset(test, shuffle=False, batch_size=batch_size)

Поймите входной пайплайн

Сейчас когда мы создали входной пайплайн, давайте вызовем его чтобы увидеть формат данных который он возвращает. Мы использовали небольшой размер пакета чтобы результат был читабельный.

for feature_batch, label_batch in train_ds.take(1):
  print('Every feature:', list(feature_batch.keys()))
  print('A batch of ages:', feature_batch['age'])
  print('A batch of targets:', label_batch )
Every feature: ['age', 'sex', 'cp', 'trestbps', 'chol', 'fbs', 'restecg', 'thalach', 'exang', 'oldpeak', 'slope', 'ca', 'thal']
A batch of ages: tf.Tensor([62 40 58 42 74], shape=(5,), dtype=int64)
A batch of targets: tf.Tensor([0 1 1 1 0], shape=(5,), dtype=int64)

Мы видим что датасет возвращает словарь имен столбцов (из датафрейма) который сопоставляет их значениям столбцов взятых из строк датафрейма.

Продемонстрируем несколько видов столбцов признаков (feature columns)

TensorFlow предоставляет множество типов столбцов признаков. В этом разделе мы создадим несколько видов столбцов признаков и покажем как они преобразуют столбцы из датафрейма.

# Мы используем этот пакте для демонстрации нескольких видов столбцов признаков
example_batch = next(iter(train_ds))[0]
# Служебный метод для создания столбца признаков
# и преобразования пакета данных
def demo(feature_column):
  feature_layer = layers.DenseFeatures(feature_column)
  print(feature_layer(example_batch).numpy())

Численные столбцы (numeric columns)

Выходные данные столбцов признаков становятся входными данными модели (используя демо функцию определенную выше мы сможем посмотреть как конкретно преобразуется каждый столбец датафрейма). Числовой столбец (numeric column) простейший вид столбца. Он используется для представления числовых признаков. При использовании этого столбца модель получает столбец значений из датафрейма без изменений.

age = feature_column.numeric_column("age")
demo(age)
WARNING:tensorflow:Layer dense_features is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[74.]
 [55.]
 [59.]
 [34.]
 [62.]]

В наборе данных о сердечных заболеваниях большинство столбцов из датафрейма - числовые.

Сгруппированные столбцы (bucketized columns)

Часто вы не хотите передавать числа непосредственно в модель, а вместо этого делите их на несколько категорий на основе числовых диапазонов. Рассмотрим данные представляющие возраст человека. Вместо представления возраста как числового столбца мы можем разбить возраст на несколько категорий использовав сгруппированный столбец. Обратите внимание, что one-hot значения приведенные ниже описывают к которому возрастному диапазону относится каждая из строк.

age_buckets = feature_column.bucketized_column(age, boundaries=[18, 25, 30, 35, 40, 45, 50, 55, 60, 65])
demo(age_buckets)
WARNING:tensorflow:Layer dense_features_1 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]
 [0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0.]]

Категориальные столбцы (categorical columns)

В этом датасете thal представлен в виде строк (например 'fixed', 'normal', или 'reversible'). Мы не можем передать строки напрямую в модель. Вместо этого мы должны сперва поставить им в соответствие численные значения. Словарь категориальных столбцов (categorical vocabulary columns) обеспечивает способ представления строк в виде one-hot векторов (как вы видели выше для возраста разбитого на категории). Справочник может быть передан как список с использованием categorical_column_with_vocabulary_list, или загружен из файла с использованием categorical_column_with_vocabulary_file.

thal = feature_column.categorical_column_with_vocabulary_list(
      'thal', ['fixed', 'normal', 'reversible'])

thal_one_hot = feature_column.indicator_column(thal)
demo(thal_one_hot)
WARNING:tensorflow:Layer dense_features_2 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[0. 1. 0.]
 [0. 0. 1.]
 [1. 0. 0.]
 [0. 1. 0.]
 [0. 1. 0.]]

В более сложных датасетах многие столбцы бывают категориальными (т.е. строками). Столбцы признаков наиболее полезны при работе с категориальными данными. Хотя в этом наборе данных есть только один категориальный столбец, мы будем использовать его для демонстрации нескольких важных видов столбцов признаков, которые вы можете использовать при работе с другими наборами данных.

Столбцы векторных представлений (embedding column)

Предположим, что вместо нескольких возможных строковых значений мы имеем тысячи и более значений для категорий. По ряду причин когда число категорий сильно вырастает, становится невозможным обучение нейронной сети с использованием one-hot кодирования. Мы можем использовать столбец векторных представлений для преодоления этого ограничения. Вместо представления данных в виде многомерных one-hot векторов столбец векторных представлений представляет эти данные в виде плотных векторов меньшей размерности, в которых в каждой ячейке может содержаться любое число, а не только О или 1. Размерность векторного представления (8, в нижеприведенном при мере) это параметр который необходимо настраивать.

Ключевой момент: использование столбца векторных представлений лучше всего, когда у категориального столбца много возможных значений. Здесь мы используем его только для демонстрационных целей, чтобы у вас был полный пример, который вы можете использовать в будущем для другого набора данных.

# Обратите внимание, что входными данными для столбца векторных представлений является категориальный столбец
# который мы создали до этого
thal_embedding = feature_column.embedding_column(thal, dimension=8)
demo(thal_embedding)
WARNING:tensorflow:Layer dense_features_3 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[-0.5181896  -0.05276614  0.21590522  0.16270223 -0.41395107  0.6908883
  -0.4716284   0.6055105 ]
 [-0.48278216 -0.12640668  0.42483836  0.3282245  -0.2480234  -0.27014956
   0.21802905 -0.27290106]
 [-0.5249487   0.17545728  0.6876115   0.08197106  0.05304604 -0.1594978
   0.0855927  -0.03140042]
 [-0.5181896  -0.05276614  0.21590522  0.16270223 -0.41395107  0.6908883
  -0.4716284   0.6055105 ]
 [-0.5181896  -0.05276614  0.21590522  0.16270223 -0.41395107  0.6908883
  -0.4716284   0.6055105 ]]

Хэшированные столбцы признаков

Другим способом представления категориального столбца с большим количеством значений является использование categorical_column_with_hash_bucket. This feature column calculates a hash value of the input, then selects one of the hash_bucket_size buckets to encode a string. When using this column, you do not need to provide the vocabulary, and you can choose to make the number of hash_buckets significantly smaller than the number of actual categories to save space.

Ключевой момент: Важным недостатком этого метода является то, что возможны коллизии, при которых разные строки отображаются в одну и ту же категорию. На практике метод хорошо работает для некоторых наборов данных.

thal_hashed = feature_column.categorical_column_with_hash_bucket(
      'thal', hash_bucket_size=1000)
demo(feature_column.indicator_column(thal_hashed))
WARNING:tensorflow:Layer dense_features_4 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]]

Пересеченные столбцы признаков (crossed feature columns)

Комбинирование признаков в один больше известное как пересечение признаков, позволяет модели изучать отдельные веча для каждой комбинации свойств. Здесь мы создадим новый признак являющийся пересечением возраста и thal. Обратите внимание на то, что crossed_column не строит полную таблицу комбинаций значений признаков (которая может быть очень большой). Вместо этого он поддерживает hashed_column так что Вы можете сами выбирать размер таблицф.

crossed_feature = feature_column.crossed_column([age_buckets, thal], hash_bucket_size=1000)
demo(feature_column.indicator_column(crossed_feature))
WARNING:tensorflow:Layer dense_features_5 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

[[0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]
 [0. 0. 0. ... 0. 0. 0.]]

Выберите которые столбцы использовать

Мы увидели как использовать несколько видов столбцов признаков. Сейчас мы их используем для обучения модели. Данное руководство покажет Вам полный код (т.е. механизм) необходимый для работы со столбцами признаков. Мы ниже случайно выбрали несколько столбцов для обучения нашей модели.

Ключевой момент: если вы собиратесь построить точную модель, попробуйте сами больший набор данных и тщательно подумайте о том, какие признаки являются наиболее значимыми для включения и как они должны быть представлены.

feature_columns = []

# численные столбцы
for header in ['age', 'trestbps', 'chol', 'thalach', 'oldpeak', 'slope', 'ca']:
  feature_columns.append(feature_column.numeric_column(header))

# группировка значений столбцов
age_buckets = feature_column.bucketized_column(age, boundaries=[18, 25, 30, 35, 40, 45, 50, 55, 60, 65])
feature_columns.append(age_buckets)

# столбцы индикаторы
thal = feature_column.categorical_column_with_vocabulary_list(
      'thal', ['fixed', 'normal', 'reversible'])
thal_one_hot = feature_column.indicator_column(thal)
feature_columns.append(thal_one_hot)

# столбцы векторных представлений
thal_embedding = feature_column.embedding_column(thal, dimension=8)
feature_columns.append(thal_embedding)

# столбцы пересечений свойств
crossed_feature = feature_column.crossed_column([age_buckets, thal], hash_bucket_size=1000)
crossed_feature = feature_column.indicator_column(crossed_feature)
feature_columns.append(crossed_feature)

Создайте слой признаков

Сейчас, после того как мы определили колонки признаков, используем слой DenseFeatures чтобы передать их в модель Keras.

feature_layer = tf.keras.layers.DenseFeatures(feature_columns)

Ранее мы использовали пакеты маленького размера, чтобы показать вам как работают колонки признаков. Сейчас мы создали новый входной пайплайн с большим размером пакетов.

batch_size = 32
train_ds = df_to_dataset(train, batch_size=batch_size)
val_ds = df_to_dataset(val, shuffle=False, batch_size=batch_size)
test_ds = df_to_dataset(test, shuffle=False, batch_size=batch_size)

Создайте, скомпилируйте и обучите модель

model = tf.keras.Sequential([
  feature_layer,
  layers.Dense(128, activation='relu'),
  layers.Dense(128, activation='relu'),
  layers.Dense(1, activation='sigmoid')
])

model.compile(optimizer='adam',
              loss='binary_crossentropy',
              metrics=['accuracy'],
              run_eagerly=True)

model.fit(train_ds,
          validation_data=val_ds,
          epochs=5)
Epoch 1/5
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[60],
       [62],
       [58],
       [49],
       [57],
       [62],
       [41],
       [60],
       [35],
       [67],
       [59],
       [67],
       [64],
       [60],
       [41],
       [56],
       [66],
       [54],
       [42],
       [60],
       [47],
       [54],
       [45],
       [65],
       [71],
       [66],
       [49],
       [68],
       [37],
       [53],
       [48],
       [58]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [3],
       [1],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [3],
       [1],
       [3],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [128],
       [132],
       [134],
       [128],
       [130],
       [120],
       [102],
       [122],
       [152],
       [170],
       [100],
       [170],
       [145],
       [110],
       [134],
       [112],
       [125],
       [148],
       [120],
       [108],
       [120],
       [104],
       [135],
       [160],
       [160],
       [130],
       [144],
       [120],
       [130],
       [130],
       [100]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[258],
       [208],
       [224],
       [271],
       [229],
       [263],
       [157],
       [318],
       [192],
       [212],
       [288],
       [299],
       [227],
       [282],
       [235],
       [409],
       [212],
       [273],
       [244],
       [178],
       [243],
       [258],
       [208],
       [254],
       [302],
       [228],
       [269],
       [193],
       [215],
       [264],
       [256],
       [248]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [1],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[157],
       [140],
       [173],
       [162],
       [150],
       [ 97],
       [182],
       [160],
       [174],
       [150],
       [159],
       [125],
       [155],
       [142],
       [153],
       [150],
       [132],
       [152],
       [178],
       [ 96],
       [152],
       [147],
       [148],
       [127],
       [162],
       [138],
       [163],
       [141],
       [170],
       [143],
       [150],
       [122]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.6],
       [0. ],
       [3.2],
       [0. ],
       [0.4],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.8],
       [0.2],
       [0.9],
       [0.6],
       [2.8],
       [0. ],
       [1.9],
       [0.1],
       [0.5],
       [0.8],
       [0. ],
       [0. ],
       [0.4],
       [3. ],
       [2.8],
       [0.4],
       [2.3],
       [0. ],
       [3.4],
       [0. ],
       [0.4],
       [0. ],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [1],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layer dense_features_6 is casting an input tensor from dtype float64 to the layer's dtype of float32, which is new behavior in TensorFlow 2.  The layer has dtype float32 because its dtype defaults to floatx.

If you intended to run this layer in float32, you can safely ignore this warning. If in doubt, this warning is likely only an issue if you are porting a TensorFlow 1.X model to TensorFlow 2.

To change all layers to have dtype float64 by default, call `tf.keras.backend.set_floatx('float64')`. To change just this layer, pass dtype='float64' to the layer constructor. If you are the author of this layer, you can disable autocasting by passing autocast=False to the base Layer constructor.

1/7 [===>..........................] - ETA: 0s - loss: 2.2391 - accuracy: 0.2812WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[55],
       [53],
       [51],
       [58],
       [64],
       [38],
       [41],
       [46],
       [45],
       [62],
       [67],
       [29],
       [40],
       [58],
       [68],
       [63],
       [68],
       [47],
       [42],
       [57],
       [67],
       [34],
       [57],
       [61],
       [51],
       [62],
       [67],
       [62],
       [59],
       [55],
       [54],
       [60]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [4],
       [1],
       [2],
       [4],
       [4],
       [3],
       [4],
       [2],
       [1],
       [4],
       [3],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [2],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [142],
       [140],
       [170],
       [128],
       [120],
       [135],
       [120],
       [115],
       [130],
       [125],
       [130],
       [140],
       [100],
       [180],
       [140],
       [118],
       [138],
       [130],
       [110],
       [106],
       [118],
       [130],
       [130],
       [140],
       [124],
       [120],
       [138],
       [174],
       [132],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[289],
       [226],
       [261],
       [225],
       [263],
       [231],
       [203],
       [249],
       [260],
       [231],
       [254],
       [204],
       [199],
       [234],
       [274],
       [187],
       [277],
       [257],
       [180],
       [335],
       [223],
       [210],
       [236],
       [330],
       [299],
       [209],
       [229],
       [294],
       [249],
       [353],
       [188],
       [185]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[145],
       [111],
       [186],
       [146],
       [105],
       [182],
       [132],
       [144],
       [185],
       [146],
       [163],
       [202],
       [178],
       [156],
       [150],
       [144],
       [151],
       [156],
       [150],
       [143],
       [142],
       [192],
       [174],
       [169],
       [173],
       [163],
       [129],
       [106],
       [143],
       [132],
       [113],
       [155]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [0. ],
       [2.8],
       [0.2],
       [3.8],
       [0. ],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1.4],
       [0.1],
       [1.6],
       [4. ],
       [1. ],
       [0. ],
       [0. ],
       [3. ],
       [0.3],
       [0.7],
       [0. ],
       [0. ],
       [1.6],
       [0. ],
       [2.6],
       [1.9],
       [0. ],
       [1.2],
       [1.4],
       [3. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [0],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [1],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[47],
       [71],
       [52],
       [59],
       [43],
       [42],
       [41],
       [39],
       [53],
       [44],
       [54],
       [51],
       [67],
       [44],
       [63],
       [51],
       [63],
       [44],
       [52],
       [57],
       [43],
       [63],
       [69],
       [50],
       [48],
       [44],
       [59],
       [57],
       [50],
       [54],
       [52],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [2],
       [3],
       [4],
       [3],
       [1],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [3],
       [3],
       [3],
       [4],
       [3],
       [1],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [112],
       [120],
       [150],
       [115],
       [136],
       [130],
       [138],
       [130],
       [112],
       [110],
       [140],
       [152],
       [118],
       [140],
       [140],
       [130],
       [130],
       [152],
       [132],
       [120],
       [135],
       [140],
       [120],
       [124],
       [140],
       [126],
       [150],
       [150],
       [150],
       [118],
       [165]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[275],
       [149],
       [325],
       [212],
       [303],
       [315],
       [214],
       [220],
       [246],
       [290],
       [239],
       [298],
       [277],
       [242],
       [195],
       [308],
       [254],
       [233],
       [298],
       [207],
       [177],
       [252],
       [254],
       [219],
       [255],
       [235],
       [218],
       [126],
       [243],
       [232],
       [186],
       [289]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[118],
       [125],
       [172],
       [157],
       [181],
       [125],
       [168],
       [152],
       [173],
       [153],
       [126],
       [122],
       [172],
       [149],
       [179],
       [142],
       [147],
       [179],
       [178],
       [168],
       [120],
       [172],
       [146],
       [158],
       [175],
       [180],
       [134],
       [173],
       [128],
       [165],
       [190],
       [124]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [1.6],
       [0.2],
       [1.6],
       [1.2],
       [1.8],
       [2. ],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [4.2],
       [0. ],
       [0.3],
       [0. ],
       [1.5],
       [1.4],
       [0.4],
       [1.2],
       [0. ],
       [2.5],
       [0. ],
       [2. ],
       [1.6],
       [0. ],
       [0. ],
       [2.2],
       [0.2],
       [2.6],
       [1.6],
       [0. ],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 2.1815 - accuracy: 0.5417WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[69],
       [58],
       [45],
       [48],
       [58],
       [60],
       [59],
       [35],
       [53],
       [51],
       [56],
       [66],
       [54],
       [60],
       [65],
       [62],
       [76],
       [55],
       [40],
       [44],
       [65],
       [66],
       [34],
       [74],
       [61],
       [62],
       [70],
       [45],
       [65],
       [55],
       [63],
       [56]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [2],
       [4],
       [4],
       [1],
       [4],
       [3],
       [3],
       [4],
       [1],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [4],
       [2],
       [4],
       [2],
       [1],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [136],
       [110],
       [110],
       [150],
       [125],
       [178],
       [126],
       [130],
       [130],
       [200],
       [150],
       [110],
       [117],
       [160],
       [140],
       [140],
       [132],
       [152],
       [120],
       [120],
       [160],
       [118],
       [120],
       [148],
       [160],
       [130],
       [128],
       [150],
       [140],
       [130],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[234],
       [319],
       [264],
       [229],
       [270],
       [258],
       [270],
       [282],
       [197],
       [256],
       [288],
       [226],
       [206],
       [230],
       [360],
       [268],
       [197],
       [342],
       [223],
       [263],
       [177],
       [246],
       [182],
       [269],
       [203],
       [164],
       [322],
       [308],
       [225],
       [217],
       [330],
       [193]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[131],
       [152],
       [132],
       [168],
       [111],
       [141],
       [145],
       [156],
       [152],
       [149],
       [133],
       [114],
       [108],
       [160],
       [151],
       [160],
       [116],
       [166],
       [181],
       [173],
       [140],
       [120],
       [174],
       [121],
       [161],
       [145],
       [109],
       [170],
       [114],
       [111],
       [132],
       [162]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.1],
       [0. ],
       [1.2],
       [1. ],
       [0.8],
       [2.8],
       [4.2],
       [0. ],
       [1.2],
       [0.5],
       [4. ],
       [2.6],
       [0. ],
       [1.4],
       [0.8],
       [3.6],
       [1.1],
       [1.2],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0.2],
       [0. ],
       [6.2],
       [2.4],
       [0. ],
       [1. ],
       [5.6],
       [1.8],
       [1.9]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [2],
       [3],
       [1],
       [2],
       [3],
       [1],
       [3],
       [1],
       [3],
       [3],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [3],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [1],
       [3],
       [3],
       [0],
       [3],
       [0],
       [3],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[40],
       [59],
       [64],
       [46],
       [42],
       [52],
       [58],
       [56],
       [51],
       [58],
       [56],
       [55],
       [42],
       [43],
       [48],
       [54],
       [62],
       [68],
       [67],
       [57],
       [53],
       [44],
       [56],
       [64],
       [64],
       [57],
       [58],
       [66],
       [61],
       [54],
       [41],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4],
       [2],
       [3],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [110],
       [180],
       [105],
       [120],
       [172],
       [128],
       [140],
       [100],
       [128],
       [130],
       [180],
       [120],
       [150],
       [122],
       [110],
       [120],
       [144],
       [115],
       [150],
       [123],
       [120],
       [125],
       [130],
       [120],
       [140],
       [130],
       [178],
       [150],
       [122],
       [126],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[167],
       [239],
       [325],
       [204],
       [209],
       [199],
       [216],
       [294],
       [222],
       [259],
       [256],
       [327],
       [295],
       [247],
       [222],
       [214],
       [281],
       [193],
       [564],
       [168],
       [282],
       [220],
       [249],
       [303],
       [246],
       [192],
       [197],
       [228],
       [243],
       [286],
       [306],
       [244]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[114],
       [142],
       [154],
       [172],
       [173],
       [162],
       [131],
       [153],
       [143],
       [130],
       [142],
       [117],
       [162],
       [171],
       [186],
       [158],
       [103],
       [141],
       [160],
       [174],
       [ 95],
       [170],
       [144],
       [122],
       [ 96],
       [148],
       [131],
       [165],
       [137],
       [116],
       [163],
       [154]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2. ],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.5],
       [2.2],
       [1.3],
       [1.2],
       [3. ],
       [0.6],
       [3.4],
       [0. ],
       [1.5],
       [0. ],
       [1.6],
       [1.4],
       [3.4],
       [1.6],
       [1.6],
       [2. ],
       [0. ],
       [1.2],
       [2. ],
       [2.2],
       [0.4],
       [0.6],
       [1. ],
       [1. ],
       [3.2],
       [0. ],
       [1.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 2.0383 - accuracy: 0.5813WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[61],
       [65],
       [44],
       [46],
       [61],
       [59],
       [41],
       [45],
       [70],
       [64],
       [44],
       [51],
       [54],
       [66],
       [56],
       [50],
       [61],
       [61],
       [51],
       [43],
       [48],
       [57],
       [54],
       [51],
       [71],
       [56],
       [42],
       [60],
       [42],
       [52],
       [46],
       [63]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [1],
       [2],
       [3],
       [4],
       [4],
       [2],
       [3],
       [2],
       [3],
       [3],
       [1],
       [2],
       [4],
       [2],
       [3],
       [4],
       [1],
       [4],
       [4],
       [3],
       [2],
       [3],
       [3],
       [3],
       [2],
       [4],
       [1],
       [3],
       [2],
       [4],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[145],
       [138],
       [130],
       [142],
       [138],
       [164],
       [105],
       [110],
       [156],
       [140],
       [120],
       [125],
       [132],
       [120],
       [120],
       [129],
       [140],
       [134],
       [130],
       [132],
       [130],
       [124],
       [108],
       [120],
       [110],
       [130],
       [102],
       [150],
       [120],
       [134],
       [140],
       [145]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[307],
       [282],
       [219],
       [177],
       [166],
       [176],
       [198],
       [264],
       [245],
       [313],
       [226],
       [213],
       [288],
       [302],
       [236],
       [196],
       [207],
       [234],
       [305],
       [341],
       [275],
       [261],
       [267],
       [295],
       [265],
       [221],
       [265],
       [240],
       [240],
       [201],
       [311],
       [233]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[146],
       [174],
       [188],
       [160],
       [125],
       [ 90],
       [168],
       [132],
       [143],
       [133],
       [169],
       [125],
       [159],
       [151],
       [178],
       [163],
       [138],
       [145],
       [142],
       [136],
       [139],
       [141],
       [167],
       [157],
       [130],
       [163],
       [122],
       [171],
       [194],
       [158],
       [120],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [1.4],
       [0. ],
       [1.4],
       [3.6],
       [1. ],
       [0. ],
       [1.2],
       [0. ],
       [0.2],
       [0. ],
       [1.4],
       [0. ],
       [0.4],
       [0.8],
       [0. ],
       [1.9],
       [2.6],
       [1.2],
       [3. ],
       [0.2],
       [0.3],
       [0. ],
       [0.6],
       [0. ],
       [0. ],
       [0.6],
       [0.9],
       [0.8],
       [0.8],
       [1.8],
       [2.3]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [3],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[50]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[4]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[110]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[254]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[159]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 1.7649 - accuracy: 0.6321WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [46],
       [60],
       [59],
       [58],
       [64],
       [57],
       [39],
       [58],
       [59],
       [50],
       [54],
       [60],
       [59],
       [65],
       [49],
       [57],
       [57],
       [58],
       [57],
       [44],
       [59],
       [35],
       [41],
       [62],
       [77],
       [64],
       [49],
       [68],
       [64],
       [37],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [1],
       [4],
       [1],
       [0],
       [3],
       [1],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [150],
       [140],
       [134],
       [125],
       [110],
       [140],
       [ 94],
       [150],
       [140],
       [140],
       [160],
       [130],
       [135],
       [155],
       [120],
       [128],
       [154],
       [120],
       [140],
       [108],
       [160],
       [120],
       [112],
       [120],
       [125],
       [125],
       [118],
       [120],
       [145],
       [130],
       [124]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[335],
       [231],
       [293],
       [204],
       [300],
       [211],
       [241],
       [199],
       [283],
       [177],
       [233],
       [201],
       [253],
       [234],
       [269],
       [188],
       [303],
       [232],
       [284],
       [241],
       [141],
       [273],
       [198],
       [250],
       [267],
       [304],
       [309],
       [149],
       [211],
       [212],
       [250],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [147],
       [170],
       [162],
       [171],
       [144],
       [123],
       [179],
       [162],
       [162],
       [163],
       [163],
       [144],
       [161],
       [148],
       [139],
       [159],
       [164],
       [160],
       [123],
       [175],
       [125],
       [130],
       [179],
       [ 99],
       [162],
       [131],
       [126],
       [115],
       [132],
       [187],
       [166]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.6],
       [1.2],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0.5],
       [0.8],
       [2. ],
       [0. ],
       [0. ],
       [1.8],
       [0.2],
       [0.6],
       [0. ],
       [1.6],
       [0. ],
       [1.8],
       [0. ],
       [1.8],
       [0.8],
       [1.5],
       [2. ],
       [3.5],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[65],
       [46],
       [53],
       [57],
       [70],
       [57],
       [51],
       [49],
       [45],
       [55],
       [59],
       [41],
       [47],
       [60],
       [48],
       [58],
       [54]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[140],
       [101],
       [140],
       [120],
       [160],
       [130],
       [125],
       [130],
       [130],
       [135],
       [140],
       [112],
       [130],
       [130],
       [130],
       [114],
       [192]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[417],
       [197],
       [203],
       [354],
       [269],
       [131],
       [245],
       [266],
       [234],
       [250],
       [221],
       [268],
       [253],
       [206],
       [245],
       [318],
       [283]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[157],
       [156],
       [155],
       [163],
       [112],
       [115],
       [166],
       [171],
       [175],
       [161],
       [164],
       [172],
       [179],
       [132],
       [180],
       [140],
       [195]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [3.1],
       [0.6],
       [2.9],
       [1.2],
       [2.4],
       [0.6],
       [0.6],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0.2],
       [4.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [1]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 36ms/step - loss: 1.7649 - accuracy: 0.6321 - val_loss: 1.0085 - val_accuracy: 0.3265
Epoch 2/5
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [44],
       [66],
       [64],
       [57],
       [57],
       [59],
       [56],
       [71],
       [68],
       [64],
       [65],
       [68],
       [67],
       [71],
       [43],
       [61],
       [48],
       [57],
       [54],
       [34],
       [42],
       [58],
       [56],
       [53],
       [40],
       [41],
       [67],
       [49],
       [50],
       [52],
       [51]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [2],
       [4],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [1],
       [0],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [1],
       [4],
       [4],
       [2],
       [3],
       [4],
       [3],
       [3],
       [2],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [120],
       [160],
       [180],
       [165],
       [150],
       [178],
       [200],
       [110],
       [144],
       [130],
       [138],
       [144],
       [125],
       [112],
       [120],
       [150],
       [130],
       [110],
       [108],
       [118],
       [102],
       [130],
       [120],
       [130],
       [110],
       [130],
       [115],
       [134],
       [129],
       [172],
       [100]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[268],
       [226],
       [246],
       [325],
       [289],
       [126],
       [270],
       [288],
       [265],
       [193],
       [303],
       [282],
       [193],
       [254],
       [149],
       [177],
       [243],
       [256],
       [335],
       [267],
       [182],
       [265],
       [197],
       [236],
       [246],
       [167],
       [214],
       [564],
       [271],
       [196],
       [199],
       [222]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [169],
       [120],
       [154],
       [124],
       [173],
       [145],
       [133],
       [130],
       [141],
       [122],
       [174],
       [141],
       [163],
       [125],
       [120],
       [137],
       [150],
       [143],
       [167],
       [174],
       [122],
       [131],
       [178],
       [173],
       [114],
       [168],
       [160],
       [162],
       [163],
       [162],
       [143]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[3.6],
       [0. ],
       [0. ],
       [0. ],
       [1. ],
       [0.2],
       [4.2],
       [4. ],
       [0. ],
       [3.4],
       [2. ],
       [1.4],
       [3.4],
       [0.2],
       [1.6],
       [2.5],
       [1. ],
       [0. ],
       [3. ],
       [0. ],
       [0. ],
       [0.6],
       [0.6],
       [0.8],
       [0. ],
       [2. ],
       [2. ],
       [1.6],
       [0. ],
       [0. ],
       [0.5],
       [1.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [2],
       [1],
       [2],
       [1],
       [3],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [3],
       [0],
       [3],
       [1],
       [0],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.8908 - accuracy: 0.4688WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[52],
       [44],
       [54],
       [47],
       [51],
       [42],
       [54],
       [67],
       [44],
       [44],
       [59],
       [74],
       [37],
       [69],
       [62],
       [56],
       [40],
       [65],
       [35],
       [53],
       [52],
       [58],
       [61],
       [54],
       [38],
       [44],
       [59],
       [56],
       [65],
       [67],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4],
       [1],
       [4],
       [4],
       [2],
       [4],
       [1],
       [4],
       [4],
       [3],
       [1],
       [3],
       [1],
       [2],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[134],
       [140],
       [120],
       [110],
       [130],
       [130],
       [122],
       [100],
       [130],
       [112],
       [164],
       [120],
       [120],
       [140],
       [138],
       [120],
       [152],
       [120],
       [122],
       [142],
       [118],
       [100],
       [130],
       [110],
       [120],
       [118],
       [170],
       [140],
       [135],
       [120],
       [125],
       [132]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[201],
       [235],
       [188],
       [275],
       [305],
       [180],
       [286],
       [299],
       [233],
       [290],
       [176],
       [269],
       [215],
       [254],
       [294],
       [193],
       [223],
       [177],
       [192],
       [226],
       [186],
       [234],
       [330],
       [214],
       [231],
       [242],
       [288],
       [294],
       [254],
       [229],
       [249],
       [341]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [180],
       [113],
       [118],
       [142],
       [150],
       [116],
       [125],
       [179],
       [153],
       [ 90],
       [121],
       [170],
       [146],
       [106],
       [162],
       [181],
       [140],
       [174],
       [111],
       [190],
       [156],
       [169],
       [158],
       [182],
       [149],
       [159],
       [153],
       [127],
       [129],
       [144],
       [136]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [1.4],
       [1. ],
       [1.2],
       [0. ],
       [3.2],
       [0.9],
       [0.4],
       [0. ],
       [1. ],
       [0.2],
       [0. ],
       [2. ],
       [1.9],
       [1.9],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0.1],
       [0. ],
       [1.6],
       [3.8],
       [0.3],
       [0.2],
       [1.3],
       [2.8],
       [2.6],
       [1.2],
       [3. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [2],
       [1],
       [0],
       [3],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[67],
       [66],
       [65],
       [58],
       [52],
       [63],
       [56],
       [61],
       [51],
       [49],
       [45],
       [54],
       [59],
       [71],
       [34],
       [35],
       [76],
       [58],
       [63],
       [63],
       [62],
       [66],
       [44],
       [48],
       [47],
       [53],
       [43],
       [48],
       [50],
       [64],
       [66],
       [67]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [2],
       [2],
       [2],
       [1],
       [4],
       [4],
       [4],
       [3],
       [3],
       [2],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [1],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[106],
       [112],
       [150],
       [170],
       [120],
       [140],
       [130],
       [134],
       [140],
       [130],
       [104],
       [120],
       [126],
       [160],
       [118],
       [126],
       [140],
       [128],
       [135],
       [130],
       [150],
       [120],
       [130],
       [130],
       [138],
       [130],
       [115],
       [122],
       [110],
       [170],
       [150],
       [152]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[223],
       [212],
       [225],
       [225],
       [325],
       [195],
       [221],
       [234],
       [261],
       [269],
       [208],
       [258],
       [218],
       [302],
       [210],
       [282],
       [197],
       [216],
       [252],
       [254],
       [244],
       [302],
       [219],
       [275],
       [257],
       [264],
       [303],
       [222],
       [254],
       [227],
       [226],
       [212]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[142],
       [132],
       [114],
       [146],
       [172],
       [179],
       [163],
       [145],
       [186],
       [163],
       [148],
       [147],
       [134],
       [162],
       [192],
       [156],
       [116],
       [131],
       [172],
       [147],
       [154],
       [151],
       [188],
       [139],
       [156],
       [143],
       [181],
       [186],
       [159],
       [155],
       [114],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.3],
       [0.1],
       [1. ],
       [2.8],
       [0.2],
       [0. ],
       [0. ],
       [2.6],
       [0. ],
       [0. ],
       [3. ],
       [0.4],
       [2.2],
       [0.4],
       [0.7],
       [0. ],
       [1.1],
       [2.2],
       [0. ],
       [1.4],
       [1.4],
       [0.4],
       [0. ],
       [0.2],
       [0. ],
       [0.4],
       [1.2],
       [0. ],
       [0. ],
       [0.6],
       [2.6],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.6587 - accuracy: 0.6562WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[55],
       [42],
       [42],
       [60],
       [51],
       [58],
       [48],
       [59],
       [46],
       [60],
       [61],
       [69],
       [54],
       [42],
       [41],
       [66],
       [59],
       [48],
       [50],
       [61],
       [45],
       [64],
       [60],
       [42],
       [58],
       [51],
       [55],
       [46],
       [64],
       [45],
       [61],
       [60]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [4],
       [2],
       [3],
       [4],
       [4],
       [4],
       [1],
       [3],
       [2],
       [2],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3],
       [4],
       [2],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[180],
       [120],
       [120],
       [125],
       [130],
       [150],
       [110],
       [150],
       [120],
       [145],
       [140],
       [160],
       [125],
       [120],
       [110],
       [160],
       [174],
       [124],
       [120],
       [148],
       [115],
       [120],
       [140],
       [136],
       [100],
       [140],
       [132],
       [142],
       [128],
       [128],
       [145],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[327],
       [240],
       [209],
       [258],
       [256],
       [270],
       [229],
       [212],
       [249],
       [282],
       [207],
       [234],
       [273],
       [295],
       [235],
       [228],
       [249],
       [255],
       [219],
       [203],
       [260],
       [246],
       [185],
       [315],
       [248],
       [308],
       [353],
       [177],
       [263],
       [308],
       [307],
       [178]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[117],
       [194],
       [173],
       [141],
       [149],
       [111],
       [168],
       [157],
       [144],
       [142],
       [138],
       [131],
       [152],
       [162],
       [153],
       [138],
       [143],
       [175],
       [158],
       [161],
       [185],
       [ 96],
       [155],
       [125],
       [122],
       [142],
       [132],
       [160],
       [105],
       [170],
       [146],
       [ 96]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[3.4],
       [0.8],
       [0. ],
       [2.8],
       [0.5],
       [0.8],
       [1. ],
       [1.6],
       [0.8],
       [2.8],
       [1.9],
       [0.1],
       [0.5],
       [0. ],
       [0. ],
       [2.3],
       [0. ],
       [0. ],
       [1.6],
       [0. ],
       [0. ],
       [2.2],
       [3. ],
       [1.8],
       [1. ],
       [1.5],
       [1.2],
       [1.4],
       [0.2],
       [0. ],
       [1. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [2],
       [3],
       [2],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[50],
       [63],
       [57],
       [70],
       [65],
       [45],
       [66],
       [62],
       [67],
       [41],
       [55],
       [54],
       [68],
       [29],
       [46],
       [58],
       [41],
       [70],
       [46],
       [54],
       [58],
       [57],
       [60],
       [64],
       [39],
       [42],
       [61],
       [55],
       [62],
       [56],
       [60],
       [63]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [3],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [2],
       [2],
       [4],
       [2],
       [4],
       [3],
       [3],
       [3],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [140],
       [132],
       [130],
       [160],
       [110],
       [178],
       [128],
       [152],
       [105],
       [160],
       [110],
       [118],
       [130],
       [140],
       [128],
       [135],
       [156],
       [105],
       [110],
       [136],
       [140],
       [102],
       [140],
       [138],
       [148],
       [138],
       [132],
       [124],
       [134],
       [117],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[243],
       [187],
       [207],
       [322],
       [360],
       [264],
       [228],
       [208],
       [277],
       [198],
       [289],
       [239],
       [277],
       [204],
       [311],
       [259],
       [203],
       [245],
       [204],
       [206],
       [319],
       [192],
       [318],
       [313],
       [220],
       [244],
       [166],
       [342],
       [209],
       [409],
       [230],
       [330]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [144],
       [168],
       [109],
       [151],
       [132],
       [165],
       [140],
       [172],
       [168],
       [145],
       [126],
       [151],
       [202],
       [120],
       [130],
       [132],
       [143],
       [172],
       [108],
       [152],
       [148],
       [160],
       [133],
       [152],
       [178],
       [125],
       [166],
       [163],
       [150],
       [160],
       [132]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.6],
       [4. ],
       [0. ],
       [2.4],
       [0.8],
       [1.2],
       [1. ],
       [0. ],
       [0. ],
       [0. ],
       [0.8],
       [2.8],
       [1. ],
       [0. ],
       [1.8],
       [3. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [0.2],
       [0. ],
       [0.8],
       [3.6],
       [1.2],
       [0. ],
       [1.9],
       [1.4],
       [1.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [2],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [2],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.7334 - accuracy: 0.6687WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[41],
       [55],
       [57],
       [68],
       [54],
       [58],
       [44],
       [40],
       [57],
       [62],
       [51],
       [62],
       [53],
       [47],
       [56],
       [51],
       [51],
       [63],
       [62],
       [53],
       [57],
       [54],
       [57],
       [59],
       [52],
       [41],
       [60],
       [45],
       [43],
       [62],
       [51],
       [44]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [2],
       [3],
       [3],
       [3],
       [2],
       [1],
       [2],
       [3],
       [4],
       [3],
       [4],
       [3],
       [3],
       [1],
       [4],
       [1],
       [2],
       [3],
       [3],
       [2],
       [3],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[126],
       [140],
       [124],
       [180],
       [150],
       [132],
       [120],
       [140],
       [130],
       [130],
       [140],
       [130],
       [123],
       [108],
       [130],
       [125],
       [140],
       [145],
       [120],
       [130],
       [150],
       [132],
       [128],
       [110],
       [152],
       [120],
       [150],
       [110],
       [150],
       [160],
       [120],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[306],
       [217],
       [261],
       [274],
       [232],
       [224],
       [220],
       [199],
       [236],
       [263],
       [299],
       [231],
       [282],
       [243],
       [256],
       [213],
       [298],
       [233],
       [281],
       [197],
       [168],
       [288],
       [229],
       [239],
       [298],
       [157],
       [258],
       [264],
       [247],
       [164],
       [295],
       [263]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[163],
       [111],
       [141],
       [150],
       [165],
       [173],
       [170],
       [178],
       [174],
       [ 97],
       [173],
       [146],
       [ 95],
       [152],
       [142],
       [125],
       [122],
       [150],
       [103],
       [152],
       [174],
       [159],
       [150],
       [142],
       [178],
       [182],
       [157],
       [132],
       [171],
       [145],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [5.6],
       [0.3],
       [1.6],
       [1.6],
       [3.2],
       [0. ],
       [1.4],
       [0. ],
       [1.2],
       [1.6],
       [1.8],
       [2. ],
       [0. ],
       [0.6],
       [1.4],
       [4.2],
       [2.3],
       [1.4],
       [1.2],
       [1.6],
       [0. ],
       [0.4],
       [1.2],
       [1.2],
       [0. ],
       [2.6],
       [1.2],
       [1.5],
       [6.2],
       [0.6],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [3],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [3],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [3],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [1],
       [0],
       [3],
       [2],
       [0],
       [1],
       [1],
       [3],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [3],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[60]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[150]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[240]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[171]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.9]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.7239 - accuracy: 0.6684WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [46],
       [60],
       [59],
       [58],
       [64],
       [57],
       [39],
       [58],
       [59],
       [50],
       [54],
       [60],
       [59],
       [65],
       [49],
       [57],
       [57],
       [58],
       [57],
       [44],
       [59],
       [35],
       [41],
       [62],
       [77],
       [64],
       [49],
       [68],
       [64],
       [37],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [1],
       [4],
       [1],
       [0],
       [3],
       [1],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [150],
       [140],
       [134],
       [125],
       [110],
       [140],
       [ 94],
       [150],
       [140],
       [140],
       [160],
       [130],
       [135],
       [155],
       [120],
       [128],
       [154],
       [120],
       [140],
       [108],
       [160],
       [120],
       [112],
       [120],
       [125],
       [125],
       [118],
       [120],
       [145],
       [130],
       [124]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[335],
       [231],
       [293],
       [204],
       [300],
       [211],
       [241],
       [199],
       [283],
       [177],
       [233],
       [201],
       [253],
       [234],
       [269],
       [188],
       [303],
       [232],
       [284],
       [241],
       [141],
       [273],
       [198],
       [250],
       [267],
       [304],
       [309],
       [149],
       [211],
       [212],
       [250],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [147],
       [170],
       [162],
       [171],
       [144],
       [123],
       [179],
       [162],
       [162],
       [163],
       [163],
       [144],
       [161],
       [148],
       [139],
       [159],
       [164],
       [160],
       [123],
       [175],
       [125],
       [130],
       [179],
       [ 99],
       [162],
       [131],
       [126],
       [115],
       [132],
       [187],
       [166]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.6],
       [1.2],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0.5],
       [0.8],
       [2. ],
       [0. ],
       [0. ],
       [1.8],
       [0.2],
       [0.6],
       [0. ],
       [1.6],
       [0. ],
       [1.8],
       [0. ],
       [1.8],
       [0.8],
       [1.5],
       [2. ],
       [3.5],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[65],
       [46],
       [53],
       [57],
       [70],
       [57],
       [51],
       [49],
       [45],
       [55],
       [59],
       [41],
       [47],
       [60],
       [48],
       [58],
       [54]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[140],
       [101],
       [140],
       [120],
       [160],
       [130],
       [125],
       [130],
       [130],
       [135],
       [140],
       [112],
       [130],
       [130],
       [130],
       [114],
       [192]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[417],
       [197],
       [203],
       [354],
       [269],
       [131],
       [245],
       [266],
       [234],
       [250],
       [221],
       [268],
       [253],
       [206],
       [245],
       [318],
       [283]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[157],
       [156],
       [155],
       [163],
       [112],
       [115],
       [166],
       [171],
       [175],
       [161],
       [164],
       [172],
       [179],
       [132],
       [180],
       [140],
       [195]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [3.1],
       [0.6],
       [2.9],
       [1.2],
       [2.4],
       [0.6],
       [0.6],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0.2],
       [4.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [1]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 35ms/step - loss: 0.7239 - accuracy: 0.6684 - val_loss: 0.5865 - val_accuracy: 0.6735
Epoch 3/5
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[67],
       [49],
       [57],
       [44],
       [53],
       [52],
       [62],
       [47],
       [43],
       [56],
       [37],
       [62],
       [58],
       [69],
       [55],
       [51],
       [63],
       [61],
       [71],
       [51],
       [64],
       [55],
       [64],
       [57],
       [58],
       [51],
       [47],
       [63],
       [62],
       [56],
       [46],
       [56]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [3],
       [4],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [2],
       [4],
       [3],
       [2],
       [4],
       [3],
       [4],
       [2],
       [3],
       [1],
       [4],
       [4],
       [4],
       [4],
       [1],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[106],
       [130],
       [132],
       [140],
       [130],
       [118],
       [160],
       [138],
       [120],
       [125],
       [120],
       [128],
       [128],
       [140],
       [132],
       [130],
       [135],
       [145],
       [160],
       [130],
       [170],
       [132],
       [128],
       [110],
       [170],
       [125],
       [110],
       [130],
       [130],
       [200],
       [142],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[223],
       [269],
       [207],
       [235],
       [264],
       [186],
       [164],
       [257],
       [177],
       [249],
       [215],
       [208],
       [216],
       [254],
       [342],
       [305],
       [252],
       [307],
       [302],
       [256],
       [227],
       [353],
       [263],
       [335],
       [225],
       [213],
       [275],
       [254],
       [263],
       [288],
       [177],
       [294]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[142],
       [163],
       [168],
       [180],
       [143],
       [190],
       [145],
       [156],
       [120],
       [144],
       [170],
       [140],
       [131],
       [146],
       [166],
       [142],
       [172],
       [146],
       [162],
       [149],
       [155],
       [132],
       [105],
       [143],
       [146],
       [125],
       [118],
       [147],
       [ 97],
       [133],
       [160],
       [153]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.3],
       [0. ],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [6.2],
       [0. ],
       [2.5],
       [1.2],
       [0. ],
       [0. ],
       [2.2],
       [2. ],
       [1.2],
       [1.2],
       [0. ],
       [1. ],
       [0.4],
       [0.5],
       [0.6],
       [1.2],
       [0.2],
       [3. ],
       [2.8],
       [1.4],
       [1. ],
       [1.4],
       [1.2],
       [4. ],
       [1.4],
       [1.3]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [3],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [1],
       [0],
       [0],
       [3],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.5228 - accuracy: 0.7188WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[45],
       [40],
       [39],
       [48],
       [68],
       [51],
       [55],
       [57],
       [59],
       [54],
       [50],
       [44],
       [60],
       [43],
       [65],
       [60],
       [42],
       [53],
       [40],
       [66],
       [57],
       [62],
       [42],
       [41],
       [62],
       [50],
       [40],
       [60],
       [45],
       [59],
       [76],
       [59]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [2],
       [3],
       [2],
       [3],
       [3],
       [1],
       [3],
       [1],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [152],
       [138],
       [130],
       [144],
       [140],
       [180],
       [140],
       [110],
       [108],
       [120],
       [120],
       [145],
       [150],
       [160],
       [150],
       [102],
       [130],
       [110],
       [112],
       [150],
       [120],
       [120],
       [126],
       [130],
       [129],
       [140],
       [102],
       [110],
       [126],
       [140],
       [164]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [223],
       [220],
       [256],
       [193],
       [261],
       [327],
       [192],
       [239],
       [267],
       [219],
       [220],
       [282],
       [247],
       [360],
       [258],
       [265],
       [197],
       [167],
       [212],
       [168],
       [281],
       [240],
       [306],
       [231],
       [196],
       [199],
       [318],
       [264],
       [218],
       [197],
       [176]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [181],
       [152],
       [150],
       [141],
       [186],
       [117],
       [148],
       [142],
       [167],
       [158],
       [170],
       [142],
       [171],
       [151],
       [157],
       [122],
       [152],
       [114],
       [132],
       [174],
       [103],
       [194],
       [163],
       [146],
       [163],
       [178],
       [160],
       [132],
       [134],
       [116],
       [ 90]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0. ],
       [0. ],
       [3.4],
       [0. ],
       [3.4],
       [0.4],
       [1.2],
       [0. ],
       [1.6],
       [0. ],
       [2.8],
       [1.5],
       [0.8],
       [2.6],
       [0.6],
       [1.2],
       [2. ],
       [0.1],
       [1.6],
       [1.4],
       [0.8],
       [0. ],
       [1.8],
       [0. ],
       [1.4],
       [0. ],
       [1.2],
       [2.2],
       [1.1],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [3],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [3],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[65],
       [60],
       [44],
       [56],
       [53],
       [65],
       [52],
       [67],
       [42],
       [71],
       [56],
       [58],
       [51],
       [62],
       [57],
       [62],
       [59],
       [53],
       [61],
       [58],
       [56],
       [57],
       [62],
       [54],
       [60],
       [71],
       [44],
       [68],
       [54],
       [53],
       [58],
       [44]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [1],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[135],
       [120],
       [130],
       [130],
       [123],
       [120],
       [152],
       [115],
       [130],
       [110],
       [120],
       [100],
       [140],
       [124],
       [150],
       [138],
       [170],
       [130],
       [150],
       [150],
       [130],
       [165],
       [150],
       [110],
       [117],
       [112],
       [130],
       [180],
       [132],
       [142],
       [132],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[254],
       [178],
       [233],
       [221],
       [282],
       [177],
       [298],
       [564],
       [180],
       [265],
       [193],
       [234],
       [298],
       [209],
       [126],
       [294],
       [288],
       [246],
       [243],
       [270],
       [256],
       [289],
       [244],
       [206],
       [230],
       [149],
       [219],
       [274],
       [288],
       [226],
       [224],
       [263]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[127],
       [ 96],
       [179],
       [163],
       [ 95],
       [140],
       [178],
       [160],
       [150],
       [130],
       [162],
       [156],
       [122],
       [163],
       [173],
       [106],
       [159],
       [173],
       [137],
       [111],
       [142],
       [124],
       [154],
       [108],
       [160],
       [125],
       [188],
       [150],
       [159],
       [111],
       [173],
       [173]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.8],
       [0. ],
       [0.4],
       [0. ],
       [2. ],
       [0.4],
       [1.2],
       [1.6],
       [0. ],
       [0. ],
       [1.9],
       [0.1],
       [4.2],
       [0. ],
       [0.2],
       [1.9],
       [0.2],
       [0. ],
       [1. ],
       [0.8],
       [0.6],
       [1. ],
       [1.4],
       [0. ],
       [1.4],
       [1.6],
       [0. ],
       [1.6],
       [0. ],
       [0. ],
       [3.2],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [3],
       [0],
       [1],
       [3],
       [0],
       [3],
       [0],
       [0],
       [1],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.5327 - accuracy: 0.7500WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[66],
       [35],
       [70],
       [48],
       [58],
       [46],
       [51],
       [63],
       [43],
       [48],
       [41],
       [48],
       [51],
       [34],
       [67],
       [54],
       [42],
       [58],
       [61],
       [41],
       [38],
       [44],
       [41],
       [61],
       [51],
       [59],
       [58],
       [45],
       [41],
       [67],
       [54],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [3],
       [3],
       [1],
       [3],
       [3],
       [3],
       [4],
       [1],
       [2],
       [1],
       [3],
       [2],
       [4],
       [3],
       [4],
       [2],
       [4],
       [2],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [126],
       [130],
       [110],
       [130],
       [140],
       [140],
       [140],
       [115],
       [122],
       [130],
       [130],
       [100],
       [118],
       [152],
       [120],
       [120],
       [128],
       [134],
       [110],
       [120],
       [118],
       [105],
       [140],
       [140],
       [174],
       [136],
       [104],
       [120],
       [125],
       [110],
       [128]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[226],
       [282],
       [322],
       [229],
       [197],
       [311],
       [299],
       [195],
       [303],
       [222],
       [214],
       [275],
       [222],
       [182],
       [277],
       [258],
       [209],
       [259],
       [234],
       [235],
       [231],
       [242],
       [198],
       [207],
       [308],
       [249],
       [319],
       [208],
       [157],
       [254],
       [239],
       [229]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[114],
       [156],
       [109],
       [168],
       [131],
       [120],
       [173],
       [179],
       [181],
       [186],
       [168],
       [139],
       [143],
       [174],
       [172],
       [147],
       [173],
       [130],
       [145],
       [153],
       [182],
       [149],
       [168],
       [138],
       [142],
       [143],
       [152],
       [148],
       [182],
       [163],
       [126],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.6],
       [0. ],
       [2.4],
       [1. ],
       [0.6],
       [1.8],
       [1.6],
       [0. ],
       [1.2],
       [0. ],
       [2. ],
       [0.2],
       [1.2],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [3. ],
       [2.6],
       [0. ],
       [3.8],
       [0.3],
       [0. ],
       [1.9],
       [1.5],
       [0. ],
       [0. ],
       [3. ],
       [0. ],
       [0.2],
       [2.8],
       [0.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [3],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [2],
       [0],
       [0],
       [2],
       [1],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[67],
       [65],
       [35],
       [60],
       [51],
       [64],
       [50],
       [61],
       [66],
       [54],
       [62],
       [54],
       [42],
       [44],
       [47],
       [55],
       [52],
       [50],
       [67],
       [52],
       [54],
       [54],
       [63],
       [60],
       [59],
       [42],
       [74],
       [61],
       [56],
       [63],
       [56],
       [46]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [4],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4],
       [3],
       [3],
       [3],
       [3],
       [4],
       [1],
       [1],
       [1],
       [2],
       [4],
       [2],
       [1],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[100],
       [150],
       [122],
       [125],
       [120],
       [140],
       [110],
       [130],
       [160],
       [122],
       [140],
       [120],
       [136],
       [112],
       [108],
       [140],
       [134],
       [150],
       [152],
       [172],
       [110],
       [125],
       [130],
       [150],
       [178],
       [148],
       [120],
       [138],
       [120],
       [145],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[299],
       [225],
       [192],
       [258],
       [295],
       [313],
       [254],
       [330],
       [246],
       [286],
       [268],
       [188],
       [315],
       [290],
       [243],
       [217],
       [201],
       [243],
       [212],
       [199],
       [214],
       [273],
       [330],
       [240],
       [270],
       [244],
       [269],
       [166],
       [236],
       [233],
       [409],
       [249]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[125],
       [114],
       [174],
       [141],
       [157],
       [133],
       [159],
       [169],
       [120],
       [116],
       [160],
       [113],
       [125],
       [153],
       [152],
       [111],
       [158],
       [128],
       [150],
       [162],
       [158],
       [152],
       [132],
       [171],
       [145],
       [178],
       [121],
       [125],
       [178],
       [150],
       [150],
       [144]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.9],
       [1. ],
       [0. ],
       [2.8],
       [0.6],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [3.2],
       [3.6],
       [1.4],
       [1.8],
       [0. ],
       [0. ],
       [5.6],
       [0.8],
       [2.6],
       [0.8],
       [0.5],
       [1.6],
       [0.5],
       [1.8],
       [0.9],
       [4.2],
       [0.8],
       [0.2],
       [3.6],
       [0.8],
       [2.3],
       [1.9],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [3],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [2],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [2],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.5386 - accuracy: 0.7375WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[66],
       [55],
       [57],
       [58],
       [52],
       [45],
       [49],
       [65],
       [66],
       [64],
       [63],
       [68],
       [46],
       [64],
       [43],
       [42],
       [64],
       [61],
       [34],
       [41],
       [44],
       [69],
       [29],
       [68],
       [59],
       [54],
       [45],
       [67],
       [57],
       [48],
       [60],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [4],
       [2],
       [3],
       [2],
       [1],
       [4],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [2],
       [3],
       [1],
       [2],
       [0],
       [3],
       [3],
       [2],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[178],
       [160],
       [124],
       [100],
       [120],
       [110],
       [134],
       [138],
       [120],
       [130],
       [140],
       [118],
       [105],
       [120],
       [132],
       [120],
       [180],
       [148],
       [118],
       [135],
       [120],
       [160],
       [130],
       [144],
       [150],
       [150],
       [128],
       [120],
       [130],
       [124],
       [140],
       [160]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[228],
       [289],
       [261],
       [248],
       [325],
       [264],
       [271],
       [282],
       [302],
       [303],
       [187],
       [277],
       [204],
       [246],
       [341],
       [295],
       [325],
       [203],
       [210],
       [203],
       [226],
       [234],
       [204],
       [193],
       [212],
       [232],
       [308],
       [229],
       [236],
       [255],
       [185],
       [228]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [0],
       [1],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[165],
       [145],
       [141],
       [122],
       [172],
       [132],
       [162],
       [174],
       [151],
       [122],
       [144],
       [151],
       [172],
       [ 96],
       [136],
       [162],
       [154],
       [161],
       [192],
       [132],
       [169],
       [131],
       [202],
       [141],
       [157],
       [165],
       [170],
       [129],
       [174],
       [175],
       [155],
       [138]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [0.8],
       [0.3],
       [1. ],
       [0.2],
       [1.2],
       [0. ],
       [1.4],
       [0.4],
       [2. ],
       [4. ],
       [1. ],
       [0. ],
       [2.2],
       [3. ],
       [0. ],
       [0. ],
       [0. ],
       [0.7],
       [0. ],
       [0. ],
       [0.1],
       [0. ],
       [3.4],
       [1.6],
       [1.6],
       [0. ],
       [2.6],
       [0. ],
       [0. ],
       [3. ],
       [2.3]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [2],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[70]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[156]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[245]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[143]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.5128 - accuracy: 0.7461WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [46],
       [60],
       [59],
       [58],
       [64],
       [57],
       [39],
       [58],
       [59],
       [50],
       [54],
       [60],
       [59],
       [65],
       [49],
       [57],
       [57],
       [58],
       [57],
       [44],
       [59],
       [35],
       [41],
       [62],
       [77],
       [64],
       [49],
       [68],
       [64],
       [37],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [1],
       [4],
       [1],
       [0],
       [3],
       [1],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [150],
       [140],
       [134],
       [125],
       [110],
       [140],
       [ 94],
       [150],
       [140],
       [140],
       [160],
       [130],
       [135],
       [155],
       [120],
       [128],
       [154],
       [120],
       [140],
       [108],
       [160],
       [120],
       [112],
       [120],
       [125],
       [125],
       [118],
       [120],
       [145],
       [130],
       [124]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[335],
       [231],
       [293],
       [204],
       [300],
       [211],
       [241],
       [199],
       [283],
       [177],
       [233],
       [201],
       [253],
       [234],
       [269],
       [188],
       [303],
       [232],
       [284],
       [241],
       [141],
       [273],
       [198],
       [250],
       [267],
       [304],
       [309],
       [149],
       [211],
       [212],
       [250],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [147],
       [170],
       [162],
       [171],
       [144],
       [123],
       [179],
       [162],
       [162],
       [163],
       [163],
       [144],
       [161],
       [148],
       [139],
       [159],
       [164],
       [160],
       [123],
       [175],
       [125],
       [130],
       [179],
       [ 99],
       [162],
       [131],
       [126],
       [115],
       [132],
       [187],
       [166]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.6],
       [1.2],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0.5],
       [0.8],
       [2. ],
       [0. ],
       [0. ],
       [1.8],
       [0.2],
       [0.6],
       [0. ],
       [1.6],
       [0. ],
       [1.8],
       [0. ],
       [1.8],
       [0.8],
       [1.5],
       [2. ],
       [3.5],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[65],
       [46],
       [53],
       [57],
       [70],
       [57],
       [51],
       [49],
       [45],
       [55],
       [59],
       [41],
       [47],
       [60],
       [48],
       [58],
       [54]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[140],
       [101],
       [140],
       [120],
       [160],
       [130],
       [125],
       [130],
       [130],
       [135],
       [140],
       [112],
       [130],
       [130],
       [130],
       [114],
       [192]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[417],
       [197],
       [203],
       [354],
       [269],
       [131],
       [245],
       [266],
       [234],
       [250],
       [221],
       [268],
       [253],
       [206],
       [245],
       [318],
       [283]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[157],
       [156],
       [155],
       [163],
       [112],
       [115],
       [166],
       [171],
       [175],
       [161],
       [164],
       [172],
       [179],
       [132],
       [180],
       [140],
       [195]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [3.1],
       [0.6],
       [2.9],
       [1.2],
       [2.4],
       [0.6],
       [0.6],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0.2],
       [4.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [1]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 36ms/step - loss: 0.5128 - accuracy: 0.7461 - val_loss: 0.6819 - val_accuracy: 0.8163
Epoch 4/5
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[57],
       [57],
       [48],
       [34],
       [57],
       [68],
       [43],
       [63],
       [52],
       [56],
       [70],
       [29],
       [69],
       [54],
       [62],
       [45],
       [57],
       [43],
       [51],
       [56],
       [38],
       [59],
       [65],
       [48],
       [67],
       [59],
       [61],
       [54],
       [66],
       [51],
       [50],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [2],
       [2],
       [4],
       [0],
       [4],
       [4],
       [1],
       [1],
       [2],
       [2],
       [3],
       [4],
       [2],
       [2],
       [3],
       [4],
       [4],
       [2],
       [1],
       [1],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [150],
       [110],
       [118],
       [132],
       [144],
       [132],
       [140],
       [152],
       [120],
       [156],
       [130],
       [140],
       [110],
       [128],
       [128],
       [150],
       [150],
       [140],
       [120],
       [120],
       [178],
       [120],
       [124],
       [115],
       [126],
       [130],
       [120],
       [160],
       [140],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[229],
       [126],
       [229],
       [210],
       [207],
       [193],
       [341],
       [187],
       [298],
       [193],
       [245],
       [204],
       [254],
       [206],
       [208],
       [308],
       [168],
       [247],
       [298],
       [236],
       [231],
       [270],
       [177],
       [255],
       [564],
       [218],
       [330],
       [258],
       [246],
       [299],
       [243],
       [228]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [173],
       [168],
       [192],
       [168],
       [141],
       [136],
       [144],
       [178],
       [162],
       [143],
       [202],
       [146],
       [108],
       [140],
       [170],
       [174],
       [171],
       [122],
       [178],
       [182],
       [145],
       [140],
       [175],
       [160],
       [134],
       [169],
       [147],
       [120],
       [173],
       [128],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.4],
       [0.2],
       [1. ],
       [0.7],
       [0. ],
       [3.4],
       [3. ],
       [4. ],
       [1.2],
       [1.9],
       [0. ],
       [0. ],
       [2. ],
       [0. ],
       [0. ],
       [0. ],
       [1.6],
       [1.5],
       [4.2],
       [0.8],
       [3.8],
       [4.2],
       [0.4],
       [0. ],
       [1.6],
       [2.2],
       [0. ],
       [0.4],
       [0. ],
       [1.6],
       [2.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [3],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.7905 - accuracy: 0.6875WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [42],
       [54],
       [61],
       [58],
       [67],
       [63],
       [66],
       [64],
       [57],
       [65],
       [59],
       [52],
       [62],
       [61],
       [41],
       [42],
       [40],
       [53],
       [62],
       [60],
       [68],
       [51],
       [49],
       [64],
       [58],
       [71],
       [42],
       [62],
       [44],
       [54],
       [50]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [2],
       [1],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [1],
       [1],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [4],
       [2],
       [3],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [120],
       [132],
       [134],
       [100],
       [100],
       [130],
       [120],
       [140],
       [110],
       [138],
       [170],
       [172],
       [138],
       [138],
       [105],
       [136],
       [110],
       [123],
       [140],
       [117],
       [118],
       [130],
       [134],
       [128],
       [128],
       [160],
       [120],
       [150],
       [118],
       [110],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[239],
       [295],
       [288],
       [234],
       [234],
       [299],
       [330],
       [302],
       [313],
       [335],
       [282],
       [288],
       [199],
       [294],
       [166],
       [198],
       [315],
       [167],
       [282],
       [268],
       [230],
       [277],
       [256],
       [271],
       [263],
       [216],
       [302],
       [240],
       [244],
       [242],
       [214],
       [254]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[142],
       [162],
       [159],
       [145],
       [156],
       [125],
       [132],
       [151],
       [133],
       [143],
       [174],
       [159],
       [162],
       [106],
       [125],
       [168],
       [125],
       [114],
       [ 95],
       [160],
       [160],
       [151],
       [149],
       [162],
       [105],
       [131],
       [162],
       [194],
       [154],
       [149],
       [158],
       [159]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.2],
       [0. ],
       [0. ],
       [2.6],
       [0.1],
       [0.9],
       [1.8],
       [0.4],
       [0.2],
       [3. ],
       [1.4],
       [0.2],
       [0.5],
       [1.9],
       [3.6],
       [0. ],
       [1.8],
       [2. ],
       [2. ],
       [3.6],
       [1.4],
       [1. ],
       [0.5],
       [0. ],
       [0.2],
       [2.2],
       [0.4],
       [0.8],
       [1.4],
       [0.3],
       [1.6],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [2],
       [1],
       [2],
       [3],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [2],
       [2],
       [2],
       [1],
       [0],
       [0],
       [1],
       [3],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[37],
       [52],
       [63],
       [67],
       [51],
       [43],
       [54],
       [56],
       [39],
       [55],
       [57],
       [41],
       [58],
       [67],
       [60],
       [45],
       [55],
       [45],
       [46],
       [48],
       [52],
       [35],
       [61],
       [65],
       [71],
       [76],
       [58],
       [54],
       [56],
       [57],
       [62],
       [56]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [1],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [2],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [118],
       [145],
       [120],
       [140],
       [120],
       [108],
       [130],
       [138],
       [132],
       [130],
       [110],
       [170],
       [125],
       [150],
       [115],
       [160],
       [104],
       [142],
       [130],
       [134],
       [122],
       [140],
       [135],
       [112],
       [140],
       [150],
       [120],
       [125],
       [124],
       [160],
       [200]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[215],
       [186],
       [233],
       [229],
       [261],
       [177],
       [267],
       [256],
       [220],
       [353],
       [236],
       [235],
       [225],
       [254],
       [258],
       [260],
       [289],
       [208],
       [177],
       [275],
       [201],
       [192],
       [207],
       [254],
       [149],
       [197],
       [270],
       [188],
       [249],
       [261],
       [164],
       [288]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[170],
       [190],
       [150],
       [129],
       [186],
       [120],
       [167],
       [142],
       [152],
       [132],
       [174],
       [153],
       [146],
       [163],
       [157],
       [185],
       [145],
       [148],
       [160],
       [139],
       [158],
       [174],
       [138],
       [127],
       [125],
       [116],
       [111],
       [113],
       [144],
       [141],
       [145],
       [133]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [2.3],
       [2.6],
       [0. ],
       [2.5],
       [0. ],
       [0.6],
       [0. ],
       [1.2],
       [0. ],
       [0. ],
       [2.8],
       [0.2],
       [2.6],
       [0. ],
       [0.8],
       [3. ],
       [1.4],
       [0.2],
       [0.8],
       [0. ],
       [1.9],
       [2.8],
       [1.6],
       [1.1],
       [0.8],
       [1.4],
       [1.2],
       [0.3],
       [6.2],
       [4. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [3],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [3],
       [3]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [2],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [3],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'fixed'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.9365 - accuracy: 0.6562WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[46],
       [41],
       [44],
       [40],
       [42],
       [44],
       [52],
       [42],
       [35],
       [54],
       [49],
       [62],
       [55],
       [74],
       [53],
       [57],
       [67],
       [50],
       [47],
       [60],
       [56],
       [50],
       [62],
       [70],
       [60],
       [42],
       [68],
       [48],
       [60],
       [51],
       [69],
       [54]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [4],
       [3],
       [2],
       [2],
       [4],
       [4],
       [4],
       [4],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [2],
       [3],
       [3],
       [4],
       [3],
       [1],
       [4],
       [4],
       [1],
       [4],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[105],
       [120],
       [120],
       [152],
       [130],
       [120],
       [120],
       [102],
       [126],
       [110],
       [130],
       [130],
       [132],
       [120],
       [130],
       [140],
       [106],
       [129],
       [138],
       [102],
       [130],
       [120],
       [130],
       [130],
       [120],
       [148],
       [144],
       [130],
       [150],
       [130],
       [160],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[204],
       [157],
       [263],
       [223],
       [180],
       [220],
       [325],
       [265],
       [282],
       [239],
       [269],
       [231],
       [342],
       [269],
       [197],
       [192],
       [223],
       [196],
       [257],
       [318],
       [221],
       [219],
       [263],
       [322],
       [178],
       [244],
       [193],
       [256],
       [240],
       [305],
       [234],
       [232]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[172],
       [182],
       [173],
       [181],
       [150],
       [170],
       [172],
       [122],
       [156],
       [126],
       [163],
       [146],
       [166],
       [121],
       [152],
       [148],
       [142],
       [163],
       [156],
       [160],
       [163],
       [158],
       [ 97],
       [109],
       [ 96],
       [178],
       [141],
       [150],
       [171],
       [142],
       [131],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.2],
       [0.6],
       [0. ],
       [2.8],
       [0. ],
       [1.8],
       [1.2],
       [0.2],
       [1.2],
       [0.4],
       [0.3],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [1.6],
       [1.2],
       [2.4],
       [0. ],
       [0.8],
       [3.4],
       [0. ],
       [0.9],
       [1.2],
       [0.1],
       [1.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [3],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[58],
       [63],
       [60],
       [58],
       [54],
       [67],
       [62],
       [60],
       [42],
       [53],
       [51],
       [34],
       [53],
       [66],
       [58],
       [63],
       [51],
       [41],
       [57],
       [65],
       [55],
       [56],
       [41],
       [40],
       [43],
       [44],
       [55],
       [48],
       [67],
       [61],
       [61],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3],
       [1],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [2],
       [2],
       [1],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[136],
       [130],
       [140],
       [130],
       [122],
       [152],
       [124],
       [145],
       [120],
       [142],
       [100],
       [118],
       [130],
       [160],
       [132],
       [135],
       [140],
       [130],
       [165],
       [160],
       [180],
       [140],
       [135],
       [140],
       [115],
       [112],
       [140],
       [122],
       [152],
       [148],
       [150],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[319],
       [254],
       [185],
       [197],
       [286],
       [277],
       [209],
       [282],
       [209],
       [226],
       [222],
       [182],
       [264],
       [228],
       [224],
       [252],
       [308],
       [214],
       [289],
       [360],
       [327],
       [294],
       [203],
       [199],
       [303],
       [290],
       [217],
       [222],
       [212],
       [203],
       [243],
       [281]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[152],
       [147],
       [155],
       [131],
       [116],
       [172],
       [163],
       [142],
       [173],
       [111],
       [143],
       [174],
       [143],
       [138],
       [173],
       [172],
       [142],
       [168],
       [124],
       [151],
       [117],
       [153],
       [132],
       [178],
       [181],
       [153],
       [111],
       [186],
       [150],
       [161],
       [137],
       [103]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.4],
       [3. ],
       [0.6],
       [3.2],
       [0. ],
       [0. ],
       [2.8],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [0.4],
       [2.3],
       [3.2],
       [0. ],
       [1.5],
       [2. ],
       [1. ],
       [0.8],
       [3.4],
       [1.3],
       [0. ],
       [1.4],
       [1.2],
       [0. ],
       [5.6],
       [0. ],
       [0.8],
       [0. ],
       [1. ],
       [1.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [0],
       [0],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.7486 - accuracy: 0.6875WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [44],
       [44],
       [63],
       [68],
       [56],
       [54],
       [59],
       [64],
       [65],
       [46],
       [44],
       [45],
       [66],
       [47],
       [64],
       [41],
       [58],
       [44],
       [51],
       [59],
       [71],
       [61],
       [45],
       [51],
       [60],
       [66],
       [59],
       [46],
       [58],
       [47],
       [53]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [2],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [1],
       [2],
       [4],
       [2],
       [1],
       [4],
       [3],
       [4],
       [1],
       [3],
       [4],
       [1],
       [3],
       [4],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[180],
       [120],
       [130],
       [140],
       [180],
       [134],
       [125],
       [164],
       [120],
       [150],
       [120],
       [140],
       [110],
       [112],
       [108],
       [170],
       [126],
       [100],
       [130],
       [125],
       [174],
       [110],
       [145],
       [110],
       [120],
       [125],
       [150],
       [150],
       [140],
       [128],
       [110],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[325],
       [226],
       [233],
       [195],
       [274],
       [409],
       [273],
       [176],
       [246],
       [225],
       [249],
       [235],
       [264],
       [212],
       [243],
       [227],
       [306],
       [248],
       [219],
       [213],
       [249],
       [265],
       [307],
       [264],
       [295],
       [258],
       [226],
       [212],
       [311],
       [259],
       [275],
       [246]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[154],
       [169],
       [179],
       [179],
       [150],
       [150],
       [152],
       [ 90],
       [ 96],
       [114],
       [144],
       [180],
       [132],
       [132],
       [152],
       [155],
       [163],
       [122],
       [188],
       [125],
       [143],
       [130],
       [146],
       [132],
       [157],
       [141],
       [114],
       [157],
       [120],
       [130],
       [118],
       [173]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0.4],
       [0. ],
       [1.6],
       [1.9],
       [0.5],
       [1. ],
       [2.2],
       [1. ],
       [0.8],
       [0. ],
       [1.2],
       [0.1],
       [0. ],
       [0.6],
       [0. ],
       [1. ],
       [0. ],
       [1.4],
       [0. ],
       [0. ],
       [1. ],
       [1.2],
       [0.6],
       [2.8],
       [2.6],
       [1.6],
       [1.8],
       [3. ],
       [1. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [2],
       [1],
       [3],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [2],
       [1],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[64]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[4]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[130]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[303]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[122]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[2.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.7633 - accuracy: 0.6528WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [46],
       [60],
       [59],
       [58],
       [64],
       [57],
       [39],
       [58],
       [59],
       [50],
       [54],
       [60],
       [59],
       [65],
       [49],
       [57],
       [57],
       [58],
       [57],
       [44],
       [59],
       [35],
       [41],
       [62],
       [77],
       [64],
       [49],
       [68],
       [64],
       [37],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [1],
       [4],
       [1],
       [0],
       [3],
       [1],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [150],
       [140],
       [134],
       [125],
       [110],
       [140],
       [ 94],
       [150],
       [140],
       [140],
       [160],
       [130],
       [135],
       [155],
       [120],
       [128],
       [154],
       [120],
       [140],
       [108],
       [160],
       [120],
       [112],
       [120],
       [125],
       [125],
       [118],
       [120],
       [145],
       [130],
       [124]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[335],
       [231],
       [293],
       [204],
       [300],
       [211],
       [241],
       [199],
       [283],
       [177],
       [233],
       [201],
       [253],
       [234],
       [269],
       [188],
       [303],
       [232],
       [284],
       [241],
       [141],
       [273],
       [198],
       [250],
       [267],
       [304],
       [309],
       [149],
       [211],
       [212],
       [250],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [147],
       [170],
       [162],
       [171],
       [144],
       [123],
       [179],
       [162],
       [162],
       [163],
       [163],
       [144],
       [161],
       [148],
       [139],
       [159],
       [164],
       [160],
       [123],
       [175],
       [125],
       [130],
       [179],
       [ 99],
       [162],
       [131],
       [126],
       [115],
       [132],
       [187],
       [166]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.6],
       [1.2],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0.5],
       [0.8],
       [2. ],
       [0. ],
       [0. ],
       [1.8],
       [0.2],
       [0.6],
       [0. ],
       [1.6],
       [0. ],
       [1.8],
       [0. ],
       [1.8],
       [0.8],
       [1.5],
       [2. ],
       [3.5],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[65],
       [46],
       [53],
       [57],
       [70],
       [57],
       [51],
       [49],
       [45],
       [55],
       [59],
       [41],
       [47],
       [60],
       [48],
       [58],
       [54]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[140],
       [101],
       [140],
       [120],
       [160],
       [130],
       [125],
       [130],
       [130],
       [135],
       [140],
       [112],
       [130],
       [130],
       [130],
       [114],
       [192]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[417],
       [197],
       [203],
       [354],
       [269],
       [131],
       [245],
       [266],
       [234],
       [250],
       [221],
       [268],
       [253],
       [206],
       [245],
       [318],
       [283]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[157],
       [156],
       [155],
       [163],
       [112],
       [115],
       [166],
       [171],
       [175],
       [161],
       [164],
       [172],
       [179],
       [132],
       [180],
       [140],
       [195]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [3.1],
       [0.6],
       [2.9],
       [1.2],
       [2.4],
       [0.6],
       [0.6],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0.2],
       [4.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [1]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 35ms/step - loss: 0.7633 - accuracy: 0.6528 - val_loss: 0.5888 - val_accuracy: 0.7959
Epoch 5/5
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[50],
       [52],
       [40],
       [57],
       [61],
       [45],
       [61],
       [67],
       [34],
       [53],
       [61],
       [54],
       [51],
       [44],
       [71],
       [45],
       [48],
       [42],
       [76],
       [54],
       [57],
       [67],
       [51],
       [42],
       [53],
       [74],
       [54],
       [34],
       [44],
       [54],
       [63],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [4],
       [2],
       [4],
       [1],
       [4],
       [1],
       [3],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [2],
       [4],
       [2],
       [2],
       [3],
       [2],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[129],
       [120],
       [110],
       [110],
       [150],
       [115],
       [134],
       [100],
       [118],
       [123],
       [148],
       [132],
       [130],
       [120],
       [112],
       [110],
       [130],
       [148],
       [140],
       [108],
       [130],
       [125],
       [130],
       [130],
       [130],
       [120],
       [110],
       [118],
       [120],
       [110],
       [140],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[196],
       [325],
       [167],
       [335],
       [243],
       [260],
       [234],
       [299],
       [182],
       [282],
       [203],
       [288],
       [305],
       [263],
       [149],
       [264],
       [256],
       [244],
       [197],
       [267],
       [236],
       [254],
       [256],
       [180],
       [246],
       [269],
       [206],
       [210],
       [220],
       [214],
       [195],
       [263]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[163],
       [172],
       [114],
       [143],
       [137],
       [185],
       [145],
       [125],
       [174],
       [ 95],
       [161],
       [159],
       [142],
       [173],
       [125],
       [132],
       [150],
       [178],
       [116],
       [167],
       [174],
       [163],
       [149],
       [150],
       [173],
       [121],
       [108],
       [192],
       [170],
       [158],
       [179],
       [ 97]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.2],
       [2. ],
       [3. ],
       [1. ],
       [0. ],
       [2.6],
       [0.9],
       [0. ],
       [2. ],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [1.2],
       [0. ],
       [0.8],
       [1.1],
       [0. ],
       [0. ],
       [0.2],
       [0.5],
       [0. ],
       [0. ],
       [0.2],
       [0. ],
       [0.7],
       [0. ],
       [1.6],
       [0. ],
       [1.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [2],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.7754 - accuracy: 0.7188WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[58],
       [63],
       [57],
       [58],
       [45],
       [62],
       [56],
       [40],
       [41],
       [42],
       [59],
       [66],
       [67],
       [50],
       [54],
       [54],
       [56],
       [42],
       [62],
       [43],
       [64],
       [56],
       [44],
       [51],
       [66],
       [51],
       [52],
       [60],
       [44],
       [55],
       [48],
       [59]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [4],
       [2],
       [2],
       [4],
       [2],
       [3],
       [1],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [1],
       [1],
       [2],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [130],
       [132],
       [150],
       [104],
       [120],
       [120],
       [152],
       [126],
       [120],
       [170],
       [120],
       [152],
       [120],
       [120],
       [120],
       [125],
       [136],
       [160],
       [115],
       [140],
       [134],
       [112],
       [140],
       [160],
       [100],
       [118],
       [150],
       [130],
       [140],
       [122],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[197],
       [254],
       [207],
       [270],
       [208],
       [281],
       [236],
       [223],
       [306],
       [209],
       [288],
       [302],
       [212],
       [219],
       [258],
       [188],
       [249],
       [315],
       [164],
       [303],
       [313],
       [409],
       [290],
       [299],
       [246],
       [222],
       [186],
       [240],
       [219],
       [217],
       [222],
       [212]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[131],
       [147],
       [168],
       [111],
       [148],
       [103],
       [178],
       [181],
       [163],
       [173],
       [159],
       [151],
       [150],
       [158],
       [147],
       [113],
       [144],
       [125],
       [145],
       [181],
       [133],
       [150],
       [153],
       [173],
       [120],
       [143],
       [190],
       [171],
       [188],
       [111],
       [186],
       [157]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.6],
       [1.4],
       [0. ],
       [0.8],
       [3. ],
       [1.4],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [0.2],
       [0.4],
       [0.8],
       [1.6],
       [0.4],
       [1.4],
       [1.2],
       [1.8],
       [6.2],
       [1.2],
       [0.2],
       [1.9],
       [0. ],
       [1.6],
       [0. ],
       [1.2],
       [0. ],
       [0.9],
       [0. ],
       [5.6],
       [0. ],
       [1.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [3],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [3],
       [0],
       [0],
       [2],
       [1],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[41],
       [44],
       [46],
       [57],
       [42],
       [68],
       [54],
       [47],
       [61],
       [59],
       [68],
       [63],
       [64],
       [53],
       [46],
       [41],
       [61],
       [45],
       [51],
       [59],
       [47],
       [65],
       [65],
       [44],
       [53],
       [65],
       [60],
       [55],
       [67],
       [35],
       [48],
       [69]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [4],
       [3],
       [3],
       [3],
       [3],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [4],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [3],
       [2],
       [2],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [130],
       [120],
       [150],
       [120],
       [118],
       [125],
       [138],
       [140],
       [110],
       [180],
       [140],
       [128],
       [130],
       [105],
       [130],
       [130],
       [110],
       [140],
       [126],
       [108],
       [120],
       [135],
       [140],
       [142],
       [150],
       [117],
       [132],
       [115],
       [122],
       [110],
       [160]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[235],
       [233],
       [249],
       [126],
       [240],
       [277],
       [273],
       [257],
       [207],
       [239],
       [274],
       [187],
       [263],
       [264],
       [204],
       [214],
       [330],
       [264],
       [298],
       [218],
       [243],
       [177],
       [254],
       [235],
       [226],
       [225],
       [230],
       [353],
       [564],
       [192],
       [229],
       [234]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[153],
       [179],
       [144],
       [173],
       [194],
       [151],
       [152],
       [156],
       [138],
       [142],
       [150],
       [144],
       [105],
       [143],
       [172],
       [168],
       [169],
       [132],
       [122],
       [134],
       [152],
       [140],
       [127],
       [180],
       [111],
       [114],
       [160],
       [132],
       [160],
       [174],
       [168],
       [131]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.4],
       [0.8],
       [0.2],
       [0.8],
       [1. ],
       [0.5],
       [0. ],
       [1.9],
       [1.2],
       [1.6],
       [4. ],
       [0.2],
       [0.4],
       [0. ],
       [2. ],
       [0. ],
       [1.2],
       [4.2],
       [2.2],
       [0. ],
       [0.4],
       [2.8],
       [0. ],
       [0. ],
       [1. ],
       [1.4],
       [1.2],
       [1.6],
       [0. ],
       [1. ],
       [0.1]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [3],
       [1],
       [3],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [3],
       [2],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.9580 - accuracy: 0.7083WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[52],
       [42],
       [52],
       [56],
       [65],
       [39],
       [56],
       [62],
       [55],
       [52],
       [57],
       [40],
       [44],
       [56],
       [58],
       [63],
       [68],
       [47],
       [51],
       [42],
       [53],
       [59],
       [59],
       [70],
       [57],
       [65],
       [62],
       [50],
       [58],
       [43],
       [59],
       [46]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [4],
       [3],
       [2],
       [1],
       [3],
       [1],
       [4],
       [4],
       [2],
       [4],
       [1],
       [3],
       [2],
       [4],
       [3],
       [0],
       [4],
       [4],
       [2],
       [3],
       [1],
       [4],
       [2],
       [2],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[152],
       [102],
       [172],
       [130],
       [138],
       [138],
       [120],
       [150],
       [160],
       [134],
       [165],
       [140],
       [118],
       [140],
       [100],
       [135],
       [144],
       [110],
       [140],
       [120],
       [130],
       [178],
       [174],
       [156],
       [124],
       [160],
       [130],
       [110],
       [132],
       [132],
       [164],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[298],
       [265],
       [199],
       [221],
       [282],
       [220],
       [193],
       [244],
       [289],
       [201],
       [289],
       [199],
       [242],
       [294],
       [234],
       [252],
       [193],
       [275],
       [261],
       [295],
       [197],
       [270],
       [249],
       [245],
       [261],
       [360],
       [231],
       [254],
       [224],
       [341],
       [176],
       [311]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[178],
       [122],
       [162],
       [163],
       [174],
       [152],
       [162],
       [154],
       [145],
       [158],
       [124],
       [178],
       [149],
       [153],
       [156],
       [172],
       [141],
       [118],
       [186],
       [162],
       [152],
       [145],
       [143],
       [143],
       [141],
       [151],
       [146],
       [159],
       [173],
       [136],
       [ 90],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.2],
       [0.6],
       [0.5],
       [0. ],
       [1.4],
       [0. ],
       [1.9],
       [1.4],
       [0.8],
       [0.8],
       [1. ],
       [1.4],
       [0.3],
       [1.3],
       [0.1],
       [0. ],
       [3.4],
       [1. ],
       [0. ],
       [0. ],
       [1.2],
       [4.2],
       [0. ],
       [0. ],
       [0.3],
       [0.8],
       [1.8],
       [0. ],
       [3.2],
       [3. ],
       [1. ],
       [1.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [3],
       [3],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [3],
       [0],
       [1],
       [0],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [2],
       [0],
       [2],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[35],
       [66],
       [66],
       [71],
       [45],
       [51],
       [64],
       [60],
       [51],
       [41],
       [55],
       [58],
       [68],
       [43],
       [49],
       [29],
       [49],
       [37],
       [67],
       [41],
       [48],
       [57],
       [58],
       [54],
       [54],
       [63],
       [58],
       [56],
       [67],
       [62],
       [57],
       [70]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [2],
       [2],
       [1],
       [4],
       [4],
       [3],
       [2],
       [2],
       [2],
       [4],
       [4],
       [4],
       [2],
       [2],
       [3],
       [4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [4],
       [1],
       [4],
       [3],
       [4],
       [2],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[126],
       [178],
       [112],
       [160],
       [128],
       [125],
       [120],
       [145],
       [140],
       [105],
       [132],
       [136],
       [144],
       [150],
       [130],
       [130],
       [134],
       [120],
       [106],
       [120],
       [130],
       [140],
       [128],
       [150],
       [122],
       [145],
       [170],
       [130],
       [120],
       [128],
       [150],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[282],
       [228],
       [212],
       [302],
       [308],
       [213],
       [246],
       [282],
       [308],
       [198],
       [342],
       [319],
       [193],
       [247],
       [269],
       [204],
       [271],
       [215],
       [223],
       [157],
       [275],
       [192],
       [216],
       [232],
       [286],
       [233],
       [225],
       [256],
       [229],
       [208],
       [168],
       [322]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[156],
       [165],
       [132],
       [162],
       [170],
       [125],
       [ 96],
       [142],
       [142],
       [168],
       [166],
       [152],
       [141],
       [171],
       [163],
       [202],
       [162],
       [170],
       [142],
       [182],
       [139],
       [148],
       [131],
       [165],
       [116],
       [150],
       [146],
       [142],
       [129],
       [140],
       [174],
       [109]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1. ],
       [0.1],
       [0.4],
       [0. ],
       [1.4],
       [2.2],
       [2.8],
       [1.5],
       [0. ],
       [1.2],
       [0. ],
       [3.4],
       [1.5],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.3],
       [0. ],
       [0.2],
       [0.4],
       [2.2],
       [1.6],
       [3.2],
       [2.3],
       [2.8],
       [0.6],
       [2.6],
       [0. ],
       [1.6],
       [2.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [1],
       [2],
       [1],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [3],
       [0],
       [2],
       [0],
       [2],
       [1],
       [2],
       [0],
       [0],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'fixed'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.9878 - accuracy: 0.7250WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [71],
       [60],
       [58],
       [54],
       [50],
       [46],
       [38],
       [69],
       [56],
       [61],
       [66],
       [66],
       [43],
       [44],
       [58],
       [51],
       [48],
       [60],
       [55],
       [57],
       [62],
       [67],
       [62],
       [60],
       [41],
       [64],
       [60],
       [61],
       [60],
       [63],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [1],
       [3],
       [4],
       [4],
       [1],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3],
       [4],
       [3],
       [2],
       [1],
       [3],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [110],
       [120],
       [100],
       [110],
       [150],
       [142],
       [120],
       [140],
       [200],
       [138],
       [150],
       [160],
       [120],
       [120],
       [128],
       [120],
       [124],
       [125],
       [180],
       [128],
       [140],
       [152],
       [124],
       [102],
       [135],
       [170],
       [140],
       [145],
       [150],
       [130],
       [138]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[303],
       [265],
       [178],
       [248],
       [239],
       [243],
       [177],
       [231],
       [254],
       [288],
       [166],
       [226],
       [228],
       [177],
       [226],
       [259],
       [295],
       [255],
       [258],
       [327],
       [229],
       [268],
       [277],
       [209],
       [318],
       [203],
       [227],
       [185],
       [307],
       [258],
       [330],
       [294]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [1],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[122],
       [130],
       [ 96],
       [122],
       [126],
       [128],
       [160],
       [182],
       [146],
       [133],
       [125],
       [114],
       [138],
       [120],
       [169],
       [130],
       [157],
       [175],
       [141],
       [117],
       [150],
       [160],
       [172],
       [163],
       [160],
       [132],
       [155],
       [155],
       [146],
       [157],
       [132],
       [106]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2. ],
       [0. ],
       [0. ],
       [1. ],
       [2.8],
       [2.6],
       [1.4],
       [3.8],
       [2. ],
       [4. ],
       [3.6],
       [2.6],
       [2.3],
       [2.5],
       [0. ],
       [3. ],
       [0.6],
       [0. ],
       [2.8],
       [3.4],
       [0.4],
       [3.6],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.6],
       [3. ],
       [1. ],
       [2.6],
       [1.8],
       [1.9]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [3],
       [2],
       [2],
       [3],
       [2],
       [3],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [3],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [0],
       [1],
       [2],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[64]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[4]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[180]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[325]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[154]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 1.0219 - accuracy: 0.7047WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[64],
       [46],
       [60],
       [59],
       [58],
       [64],
       [57],
       [39],
       [58],
       [59],
       [50],
       [54],
       [60],
       [59],
       [65],
       [49],
       [57],
       [57],
       [58],
       [57],
       [44],
       [59],
       [35],
       [41],
       [62],
       [77],
       [64],
       [49],
       [68],
       [64],
       [37],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [1],
       [4],
       [1],
       [0],
       [3],
       [1],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [150],
       [140],
       [134],
       [125],
       [110],
       [140],
       [ 94],
       [150],
       [140],
       [140],
       [160],
       [130],
       [135],
       [155],
       [120],
       [128],
       [154],
       [120],
       [140],
       [108],
       [160],
       [120],
       [112],
       [120],
       [125],
       [125],
       [118],
       [120],
       [145],
       [130],
       [124]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[335],
       [231],
       [293],
       [204],
       [300],
       [211],
       [241],
       [199],
       [283],
       [177],
       [233],
       [201],
       [253],
       [234],
       [269],
       [188],
       [303],
       [232],
       [284],
       [241],
       [141],
       [273],
       [198],
       [250],
       [267],
       [304],
       [309],
       [149],
       [211],
       [212],
       [250],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [147],
       [170],
       [162],
       [171],
       [144],
       [123],
       [179],
       [162],
       [162],
       [163],
       [163],
       [144],
       [161],
       [148],
       [139],
       [159],
       [164],
       [160],
       [123],
       [175],
       [125],
       [130],
       [179],
       [ 99],
       [162],
       [131],
       [126],
       [115],
       [132],
       [187],
       [166]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.6],
       [1.2],
       [0.8],
       [0. ],
       [1.8],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0.5],
       [0.8],
       [2. ],
       [0. ],
       [0. ],
       [1.8],
       [0.2],
       [0.6],
       [0. ],
       [1.6],
       [0. ],
       [1.8],
       [0. ],
       [1.8],
       [0.8],
       [1.5],
       [2. ],
       [3.5],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[65],
       [46],
       [53],
       [57],
       [70],
       [57],
       [51],
       [49],
       [45],
       [55],
       [59],
       [41],
       [47],
       [60],
       [48],
       [58],
       [54]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[140],
       [101],
       [140],
       [120],
       [160],
       [130],
       [125],
       [130],
       [130],
       [135],
       [140],
       [112],
       [130],
       [130],
       [130],
       [114],
       [192]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[417],
       [197],
       [203],
       [354],
       [269],
       [131],
       [245],
       [266],
       [234],
       [250],
       [221],
       [268],
       [253],
       [206],
       [245],
       [318],
       [283]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[157],
       [156],
       [155],
       [163],
       [112],
       [115],
       [166],
       [171],
       [175],
       [161],
       [164],
       [172],
       [179],
       [132],
       [180],
       [140],
       [195]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [3.1],
       [0.6],
       [2.9],
       [1.2],
       [2.4],
       [0.6],
       [0.6],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0.2],
       [4.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [1]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 34ms/step - loss: 1.0219 - accuracy: 0.7047 - val_loss: 0.4736 - val_accuracy: 0.7755

<tensorflow.python.keras.callbacks.History at 0x7fda2c1bd748>
loss, accuracy = model.evaluate(test_ds)
print("Accuracy", accuracy)
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[65],
       [44],
       [59],
       [59],
       [63],
       [50],
       [67],
       [52],
       [54],
       [35],
       [69],
       [54],
       [58],
       [42],
       [55],
       [50],
       [43],
       [47],
       [45],
       [56],
       [60],
       [62],
       [54],
       [43],
       [46],
       [58],
       [53],
       [55],
       [57],
       [54],
       [44],
       [58]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [0],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [3],
       [4],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [1],
       [2],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [120],
       [164],
       [138],
       [108],
       [144],
       [160],
       [128],
       [124],
       [138],
       [140],
       [140],
       [140],
       [140],
       [130],
       [120],
       [122],
       [112],
       [142],
       [132],
       [158],
       [140],
       [135],
       [110],
       [138],
       [146],
       [138],
       [128],
       [130],
       [108],
       [110],
       [105]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[248],
       [169],
       [176],
       [271],
       [269],
       [200],
       [286],
       [205],
       [266],
       [183],
       [239],
       [239],
       [211],
       [226],
       [262],
       [244],
       [213],
       [204],
       [309],
       [184],
       [305],
       [394],
       [304],
       [211],
       [243],
       [218],
       [234],
       [205],
       [236],
       [309],
       [197],
       [240]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [144],
       [ 90],
       [182],
       [169],
       [126],
       [108],
       [184],
       [109],
       [182],
       [151],
       [160],
       [165],
       [178],
       [155],
       [162],
       [165],
       [143],
       [147],
       [105],
       [161],
       [157],
       [170],
       [161],
       [152],
       [105],
       [160],
       [130],
       [174],
       [156],
       [177],
       [154]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.6],
       [2.8],
       [1. ],
       [0. ],
       [1.8],
       [0.9],
       [1.5],
       [0. ],
       [2.2],
       [1.4],
       [1.8],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [1.1],
       [0.2],
       [0.1],
       [0. ],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [2. ],
       [0. ],
       [2. ],
       [0. ],
       [0. ],
       [0. ],
       [0.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [3],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [3],
       [0],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'fixed'],
       [b'1'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'2'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/2 [==============>...............] - ETA: 0s - loss: 0.3707 - accuracy: 0.7500WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[43],
       [51],
       [58],
       [61],
       [45],
       [56],
       [39],
       [57],
       [41],
       [51],
       [57],
       [67],
       [56],
       [63],
       [58],
       [39],
       [52],
       [66],
       [52],
       [59],
       [63],
       [57],
       [70],
       [57],
       [45],
       [52],
       [52],
       [52],
       [41]])>, 'sex': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[3],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [0],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[130],
       [110],
       [112],
       [120],
       [138],
       [120],
       [118],
       [110],
       [110],
       [ 94],
       [150],
       [120],
       [130],
       [124],
       [120],
       [140],
       [125],
       [146],
       [128],
       [170],
       [150],
       [130],
       [145],
       [152],
       [112],
       [108],
       [112],
       [136],
       [130]])>, 'chol': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[315],
       [175],
       [230],
       [260],
       [236],
       [240],
       [219],
       [201],
       [172],
       [227],
       [276],
       [237],
       [283],
       [197],
       [340],
       [321],
       [212],
       [278],
       [255],
       [326],
       [407],
       [131],
       [174],
       [274],
       [160],
       [233],
       [230],
       [196],
       [204]])>, 'fbs': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[162],
       [123],
       [165],
       [140],
       [152],
       [169],
       [140],
       [126],
       [158],
       [154],
       [112],
       [ 71],
       [103],
       [136],
       [172],
       [182],
       [168],
       [152],
       [161],
       [140],
       [154],
       [115],
       [125],
       [ 88],
       [138],
       [147],
       [160],
       [169],
       [172]])>, 'exang': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(29, 1), dtype=float64, numpy=
array([[1.9],
       [0.6],
       [2.5],
       [3.6],
       [0.2],
       [0. ],
       [1.2],
       [1.5],
       [0. ],
       [0. ],
       [0.6],
       [1. ],
       [1.6],
       [0. ],
       [0. ],
       [0. ],
       [1. ],
       [0. ],
       [0. ],
       [3.4],
       [4. ],
       [1.2],
       [2.6],
       [1.2],
       [0. ],
       [0.1],
       [0. ],
       [0.1],
       [1.4]])>, 'slope': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [2],
       [1],
       [3],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [1],
       [0],
       [3],
       [1],
       [0],
       [1],
       [0],
       [3],
       [1],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(29, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
2/2 [==============================] - 0s 12ms/step - loss: 0.4758 - accuracy: 0.7377
Accuracy 0.7377049326896667

Ключевой момент: вы, как правило, получите лучшие результаты при использовании глубокого обучения с гораздо большими и более сложными датасетами. При работе с небольшими наборами данных, подобным этому, мы рекомендуем использовать дерево решений или случайный лес в качестве надежной базовой модели. Цель этого руководства - не обучить точную модель, а продемонстрировать механику работы со структурированными данными, дать вам код, который можно использовать в качестве старта при работе с вашими собственными наборами данных в будущем.

Следующие шаги

Лучший способ узнать больше о классификации структурированных данных - попробовать самостоятельно. Мы предлагаем взять другой набор данных и обучить модель его классифицировать с использованием кода, аналогичного приведенному выше. Чтобы повысить точность, тщательно продумайте, какие признаки включить в вашу модель и как они должны быть представлены.