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

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
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([44 68 39 51 42], shape=(5,), dtype=int64)
A batch of targets: tf.Tensor([0 0 0 0 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.

[[35.]
 [65.]
 [50.]
 [44.]
 [35.]]

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

Сгруппированные столбцы (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. 1. 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. 0.]
 [0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 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. 1. 0.]
 [0. 0. 1.]
 [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.37483707  0.17073545  0.3557808  -0.37053284 -0.32164672 -0.6694506
   0.47162643 -0.08054481]
 [-0.37483707  0.17073545  0.3557808  -0.37053284 -0.32164672 -0.6694506
   0.47162643 -0.08054481]
 [-0.7061232  -0.20989028  0.04063108 -0.25560054 -0.18929654  0.32459578
   0.27578083  0.19869879]
 [-0.37483707  0.17073545  0.3557808  -0.37053284 -0.32164672 -0.6694506
   0.47162643 -0.08054481]
 [-0.37483707  0.17073545  0.3557808  -0.37053284 -0.32164672 -0.6694506
   0.47162643 -0.08054481]]

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

Другим способом представления категориального столбца с большим количеством значений является использование 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([[57],
       [48],
       [47],
       [52],
       [67],
       [70],
       [58],
       [63],
       [57],
       [64],
       [77],
       [57],
       [69],
       [58],
       [58],
       [45],
       [50],
       [54],
       [54],
       [76],
       [60],
       [39],
       [50],
       [62],
       [63],
       [68],
       [61],
       [51],
       [60],
       [54],
       [54],
       [67]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [4],
       [3],
       [2],
       [4],
       [4],
       [3],
       [4],
       [4],
       [1],
       [4],
       [4],
       [1],
       [3],
       [4],
       [1],
       [4],
       [2],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [1],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [130],
       [130],
       [128],
       [125],
       [145],
       [132],
       [140],
       [165],
       [110],
       [125],
       [140],
       [140],
       [140],
       [146],
       [110],
       [144],
       [132],
       [120],
       [140],
       [130],
       [138],
       [140],
       [140],
       [145],
       [144],
       [140],
       [140],
       [117],
       [108],
       [120],
       [100]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[241],
       [256],
       [253],
       [205],
       [254],
       [174],
       [224],
       [187],
       [289],
       [211],
       [304],
       [241],
       [239],
       [211],
       [218],
       [264],
       [200],
       [288],
       [258],
       [197],
       [206],
       [220],
       [233],
       [268],
       [233],
       [193],
       [207],
       [298],
       [230],
       [267],
       [188],
       [299]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[123],
       [150],
       [179],
       [184],
       [163],
       [125],
       [173],
       [144],
       [124],
       [144],
       [162],
       [123],
       [151],
       [165],
       [105],
       [132],
       [126],
       [159],
       [147],
       [116],
       [132],
       [152],
       [163],
       [160],
       [150],
       [141],
       [138],
       [122],
       [160],
       [167],
       [113],
       [125]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.2],
       [0. ],
       [0. ],
       [0. ],
       [0.2],
       [2.6],
       [3.2],
       [4. ],
       [1. ],
       [1.8],
       [0. ],
       [0.2],
       [1.8],
       [0. ],
       [2. ],
       [1.2],
       [0.9],
       [0. ],
       [0.4],
       [1.1],
       [2.4],
       [0. ],
       [0.6],
       [3.6],
       [2.3],
       [3.4],
       [1.9],
       [4.2],
       [1.4],
       [0. ],
       [1.4],
       [0.9]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [3],
       [0],
       [3],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [0],
       [2],
       [1],
       [3],
       [2],
       [0],
       [1],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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: 1.9144 - accuracy: 0.5312WARNING: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([[54],
       [68],
       [39],
       [67],
       [57],
       [41],
       [57],
       [66],
       [55],
       [70],
       [44],
       [58],
       [58],
       [37],
       [41],
       [62],
       [35],
       [65],
       [60],
       [64],
       [66],
       [67],
       [60],
       [56],
       [59],
       [43],
       [54],
       [48],
       [39],
       [55],
       [65],
       [68]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [4],
       [3],
       [1],
       [2],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [2],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [0]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[125],
       [120],
       [118],
       [152],
       [130],
       [105],
       [128],
       [160],
       [128],
       [160],
       [140],
       [100],
       [128],
       [120],
       [120],
       [150],
       [120],
       [120],
       [130],
       [180],
       [146],
       [160],
       [102],
       [120],
       [170],
       [115],
       [122],
       [122],
       [ 94],
       [180],
       [140],
       [144]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[273],
       [211],
       [219],
       [277],
       [236],
       [198],
       [229],
       [228],
       [205],
       [269],
       [235],
       [248],
       [259],
       [215],
       [157],
       [244],
       [198],
       [177],
       [253],
       [325],
       [278],
       [286],
       [318],
       [240],
       [288],
       [303],
       [286],
       [222],
       [199],
       [327],
       [417],
       [193]])>, '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],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [1],
       [2],
       [1]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[152],
       [115],
       [140],
       [172],
       [174],
       [168],
       [150],
       [138],
       [130],
       [112],
       [180],
       [122],
       [130],
       [170],
       [182],
       [154],
       [130],
       [140],
       [144],
       [154],
       [152],
       [108],
       [160],
       [169],
       [159],
       [181],
       [116],
       [186],
       [179],
       [117],
       [157],
       [141]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.5],
       [1.5],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.4],
       [2.3],
       [2. ],
       [2.9],
       [0. ],
       [1. ],
       [3. ],
       [0. ],
       [0. ],
       [1.4],
       [1.6],
       [0.4],
       [1.4],
       [0. ],
       [0. ],
       [1.5],
       [0. ],
       [0. ],
       [0.2],
       [1.2],
       [3.2],
       [0. ],
       [0. ],
       [3.4],
       [0.8],
       [3.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [3],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'2'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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'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([[54],
       [64],
       [61],
       [54],
       [60],
       [52],
       [52],
       [69],
       [54],
       [64],
       [56],
       [58],
       [53],
       [65],
       [61],
       [61],
       [62],
       [65],
       [52],
       [46],
       [58],
       [51],
       [53],
       [49],
       [52],
       [57],
       [58],
       [57],
       [49],
       [63],
       [53],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [1],
       [3],
       [4],
       [4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [1],
       [2],
       [4],
       [3],
       [4],
       [4],
       [3],
       [2],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[108],
       [140],
       [134],
       [160],
       [150],
       [112],
       [120],
       [140],
       [124],
       [128],
       [130],
       [100],
       [142],
       [155],
       [145],
       [148],
       [140],
       [160],
       [118],
       [101],
       [130],
       [140],
       [138],
       [130],
       [136],
       [130],
       [120],
       [152],
       [120],
       [130],
       [130],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[309],
       [313],
       [234],
       [201],
       [258],
       [230],
       [325],
       [254],
       [266],
       [263],
       [256],
       [234],
       [226],
       [269],
       [307],
       [203],
       [394],
       [360],
       [186],
       [197],
       [197],
       [308],
       [234],
       [269],
       [196],
       [236],
       [284],
       [274],
       [188],
       [254],
       [197],
       [225]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[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]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[156],
       [133],
       [145],
       [163],
       [157],
       [160],
       [172],
       [146],
       [109],
       [105],
       [142],
       [156],
       [111],
       [148],
       [146],
       [161],
       [157],
       [151],
       [190],
       [156],
       [131],
       [142],
       [160],
       [163],
       [169],
       [174],
       [160],
       [ 88],
       [139],
       [147],
       [152],
       [114]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [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([[0. ],
       [0.2],
       [2.6],
       [0. ],
       [2.6],
       [0. ],
       [0.2],
       [2. ],
       [2.2],
       [0.2],
       [0.6],
       [0.1],
       [0. ],
       [0.8],
       [1. ],
       [0. ],
       [1.2],
       [0.8],
       [0. ],
       [0. ],
       [0.6],
       [1.5],
       [0. ],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [1.2],
       [2. ],
       [1.4],
       [1.2],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [1],
       [2],
       [1],
       [0],
       [3],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [3],
       [1],
       [0],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 2.2864 - accuracy: 0.3750WARNING: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([[51],
       [74],
       [60],
       [66],
       [29],
       [71],
       [70],
       [45],
       [60],
       [42],
       [44],
       [59],
       [61],
       [56],
       [44],
       [57],
       [55],
       [35],
       [51],
       [51],
       [59],
       [62],
       [53],
       [43],
       [56],
       [69],
       [63],
       [66],
       [41],
       [58],
       [55],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [1],
       [2],
       [2],
       [2],
       [4],
       [3],
       [3],
       [2],
       [1],
       [4],
       [2],
       [2],
       [4],
       [2],
       [2],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [2],
       [1],
       [2],
       [4],
       [3],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [120],
       [125],
       [150],
       [130],
       [160],
       [156],
       [138],
       [120],
       [120],
       [120],
       [160],
       [138],
       [140],
       [130],
       [110],
       [130],
       [122],
       [125],
       [100],
       [140],
       [130],
       [123],
       [132],
       [130],
       [160],
       [140],
       [178],
       [130],
       [114],
       [160],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[175],
       [269],
       [258],
       [226],
       [204],
       [302],
       [245],
       [236],
       [178],
       [240],
       [263],
       [273],
       [166],
       [294],
       [219],
       [201],
       [262],
       [192],
       [245],
       [222],
       [177],
       [263],
       [282],
       [341],
       [221],
       [234],
       [195],
       [228],
       [214],
       [318],
       [289],
       [276]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [1],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[123],
       [121],
       [141],
       [114],
       [202],
       [162],
       [143],
       [152],
       [ 96],
       [194],
       [173],
       [125],
       [125],
       [153],
       [188],
       [126],
       [155],
       [174],
       [166],
       [143],
       [162],
       [ 97],
       [ 95],
       [136],
       [163],
       [131],
       [179],
       [165],
       [168],
       [140],
       [145],
       [112]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.6],
       [0.2],
       [2.8],
       [2.6],
       [0. ],
       [0.4],
       [0. ],
       [0.2],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [3.6],
       [1.3],
       [0. ],
       [1.5],
       [0. ],
       [0. ],
       [2.4],
       [1.2],
       [0. ],
       [1.2],
       [2. ],
       [3. ],
       [0. ],
       [0.1],
       [0. ],
       [1. ],
       [2. ],
       [4.4],
       [0.8],
       [0.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [3],
       [1],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[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'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(32, 1), dtype=int64, numpy=
array([[67],
       [51],
       [41],
       [41],
       [42],
       [59],
       [34],
       [42],
       [68],
       [56],
       [52],
       [59],
       [57],
       [48],
       [64],
       [60],
       [71],
       [54],
       [43],
       [59],
       [55],
       [45],
       [45],
       [40],
       [64],
       [44],
       [42],
       [53],
       [50],
       [67],
       [48],
       [40]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [2],
       [2],
       [1],
       [3],
       [2],
       [3],
       [3],
       [1],
       [2],
       [1],
       [4],
       [4],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [2],
       [3],
       [1],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [ 94],
       [126],
       [135],
       [148],
       [126],
       [118],
       [120],
       [180],
       [120],
       [134],
       [178],
       [120],
       [124],
       [130],
       [140],
       [110],
       [192],
       [150],
       [174],
       [132],
       [128],
       [110],
       [140],
       [120],
       [130],
       [102],
       [130],
       [110],
       [106],
       [130],
       [152]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[237],
       [227],
       [306],
       [203],
       [244],
       [218],
       [210],
       [209],
       [274],
       [193],
       [201],
       [270],
       [354],
       [274],
       [303],
       [293],
       [265],
       [283],
       [247],
       [249],
       [342],
       [308],
       [264],
       [199],
       [246],
       [233],
       [265],
       [246],
       [254],
       [223],
       [245],
       [223]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [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([[0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 71],
       [154],
       [163],
       [132],
       [178],
       [134],
       [192],
       [173],
       [150],
       [162],
       [158],
       [145],
       [163],
       [166],
       [122],
       [170],
       [130],
       [195],
       [171],
       [143],
       [166],
       [170],
       [132],
       [178],
       [ 96],
       [179],
       [122],
       [173],
       [159],
       [142],
       [180],
       [181]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [0. ],
       [0. ],
       [0. ],
       [0.8],
       [2.2],
       [0.7],
       [0. ],
       [1.6],
       [1.9],
       [0.8],
       [4.2],
       [0.6],
       [0.5],
       [2. ],
       [1.2],
       [0. ],
       [0. ],
       [1.5],
       [0. ],
       [1.2],
       [0. ],
       [1.2],
       [1.4],
       [2.2],
       [0.4],
       [0.6],
       [0. ],
       [0. ],
       [0.3],
       [0.2],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [3],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [3],
       [0],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [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'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 1.7917 - accuracy: 0.5375WARNING: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],
       [41],
       [64],
       [52],
       [45],
       [47],
       [57],
       [44],
       [63],
       [35],
       [46],
       [59],
       [55],
       [54],
       [37],
       [50],
       [44],
       [43],
       [46],
       [57],
       [67],
       [40],
       [54],
       [49],
       [45],
       [48],
       [57],
       [62],
       [57],
       [41],
       [43],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [3],
       [4],
       [2],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [3],
       [4],
       [2],
       [0],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [130],
       [140],
       [108],
       [130],
       [110],
       [154],
       [110],
       [108],
       [138],
       [150],
       [110],
       [140],
       [110],
       [130],
       [129],
       [120],
       [122],
       [142],
       [110],
       [115],
       [110],
       [150],
       [118],
       [104],
       [110],
       [130],
       [160],
       [124],
       [112],
       [130],
       [132]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[126],
       [204],
       [335],
       [233],
       [234],
       [275],
       [232],
       [197],
       [269],
       [183],
       [231],
       [239],
       [217],
       [206],
       [250],
       [196],
       [226],
       [213],
       [177],
       [335],
       [564],
       [167],
       [232],
       [149],
       [208],
       [229],
       [131],
       [164],
       [261],
       [268],
       [315],
       [207]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [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],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[173],
       [172],
       [158],
       [147],
       [175],
       [118],
       [164],
       [177],
       [169],
       [182],
       [147],
       [142],
       [111],
       [108],
       [187],
       [163],
       [169],
       [165],
       [160],
       [143],
       [160],
       [114],
       [165],
       [126],
       [148],
       [168],
       [115],
       [145],
       [141],
       [172],
       [162],
       [168]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.2],
       [1.4],
       [0. ],
       [0.1],
       [0.6],
       [1. ],
       [0. ],
       [0. ],
       [1.8],
       [1.4],
       [3.6],
       [1.2],
       [5.6],
       [0. ],
       [3.5],
       [0. ],
       [0. ],
       [0.2],
       [1.4],
       [3. ],
       [1.6],
       [2. ],
       [1.6],
       [0.8],
       [3. ],
       [1. ],
       [1.2],
       [6.2],
       [0.3],
       [0. ],
       [1.9],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [3],
       [1],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [3],
       [1],
       [3],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [3],
       [0],
       [1],
       [1],
       [1],
       [2],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [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'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [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([[42]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[4]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[136]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[315]])>, '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([[125]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[1.8]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 1.7597 - accuracy: 0.5803WARNING: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],
       [54],
       [68],
       [62],
       [57],
       [58],
       [47],
       [54],
       [64],
       [63],
       [57],
       [41],
       [52],
       [45],
       [66],
       [48],
       [44],
       [70],
       [39],
       [56],
       [60],
       [42],
       [53],
       [46],
       [64],
       [59],
       [62],
       [64],
       [55],
       [55],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [110],
       [118],
       [124],
       [150],
       [136],
       [112],
       [135],
       [125],
       [135],
       [140],
       [110],
       [128],
       [142],
       [160],
       [124],
       [120],
       [130],
       [140],
       [125],
       [145],
       [120],
       [130],
       [120],
       [170],
       [170],
       [138],
       [145],
       [135],
       [132],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [214],
       [277],
       [209],
       [168],
       [319],
       [204],
       [304],
       [309],
       [252],
       [192],
       [172],
       [255],
       [309],
       [246],
       [255],
       [220],
       [322],
       [321],
       [249],
       [282],
       [295],
       [264],
       [249],
       [227],
       [326],
       [294],
       [212],
       [250],
       [353],
       [409],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [158],
       [151],
       [163],
       [174],
       [152],
       [143],
       [170],
       [131],
       [172],
       [148],
       [158],
       [161],
       [147],
       [120],
       [175],
       [170],
       [109],
       [182],
       [144],
       [142],
       [162],
       [143],
       [144],
       [155],
       [140],
       [106],
       [132],
       [161],
       [132],
       [150],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [1. ],
       [0. ],
       [1.6],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [0.4],
       [0.8],
       [0.6],
       [3.4],
       [1.9],
       [2. ],
       [1.4],
       [1.2],
       [1.9],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [2],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(17, 1), dtype=int64, numpy=
array([[38],
       [56],
       [44],
       [34],
       [58],
       [41],
       [63],
       [58],
       [54],
       [59],
       [44],
       [56],
       [35],
       [51],
       [41],
       [50],
       [53]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [2],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[120],
       [120],
       [120],
       [118],
       [150],
       [110],
       [124],
       [125],
       [110],
       [164],
       [108],
       [132],
       [126],
       [130],
       [112],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[231],
       [236],
       [169],
       [182],
       [270],
       [235],
       [197],
       [300],
       [239],
       [176],
       [141],
       [184],
       [282],
       [305],
       [250],
       [219],
       [203]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[182],
       [178],
       [144],
       [174],
       [111],
       [153],
       [136],
       [171],
       [126],
       [ 90],
       [175],
       [105],
       [156],
       [142],
       [179],
       [158],
       [155]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[3.8],
       [0.8],
       [2.8],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [1. ],
       [0.6],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [3.1]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 37ms/step - loss: 1.7597 - accuracy: 0.5803 - val_loss: 2.0787 - val_accuracy: 0.6939
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([[66],
       [58],
       [54],
       [54],
       [45],
       [65],
       [51],
       [63],
       [66],
       [54],
       [52],
       [43],
       [68],
       [58],
       [42],
       [59],
       [54],
       [58],
       [59],
       [57],
       [61],
       [42],
       [47],
       [57],
       [59],
       [57],
       [71],
       [43],
       [64],
       [47],
       [71],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [2],
       [3],
       [1],
       [4],
       [3],
       [4],
       [1],
       [2],
       [4],
       [3],
       [0],
       [4],
       [3],
       [4],
       [3],
       [2],
       [3],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [140],
       [108],
       [125],
       [110],
       [120],
       [100],
       [130],
       [150],
       [132],
       [108],
       [130],
       [144],
       [100],
       [120],
       [110],
       [120],
       [120],
       [126],
       [154],
       [145],
       [102],
       [130],
       [130],
       [174],
       [140],
       [160],
       [132],
       [140],
       [110],
       [110],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[228],
       [211],
       [309],
       [273],
       [264],
       [177],
       [222],
       [254],
       [226],
       [288],
       [233],
       [315],
       [193],
       [248],
       [209],
       [239],
       [258],
       [284],
       [218],
       [232],
       [307],
       [265],
       [253],
       [236],
       [249],
       [241],
       [302],
       [341],
       [313],
       [275],
       [265],
       [247]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [1],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [165],
       [156],
       [152],
       [132],
       [140],
       [143],
       [147],
       [114],
       [159],
       [147],
       [162],
       [141],
       [122],
       [173],
       [142],
       [147],
       [160],
       [134],
       [164],
       [146],
       [122],
       [179],
       [174],
       [143],
       [123],
       [162],
       [136],
       [133],
       [118],
       [130],
       [171]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.3],
       [0. ],
       [0. ],
       [0.5],
       [1.2],
       [0.4],
       [1.2],
       [1.4],
       [2.6],
       [0. ],
       [0.1],
       [1.9],
       [3.4],
       [1. ],
       [0. ],
       [1.2],
       [0.4],
       [1.8],
       [2.2],
       [0. ],
       [1. ],
       [0.6],
       [0. ],
       [0. ],
       [0. ],
       [0.2],
       [0.4],
       [3. ],
       [0.2],
       [1. ],
       [0. ],
       [1.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [3],
       [1],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.8055 - accuracy: 0.8750WARNING: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],
       [57],
       [60],
       [62],
       [61],
       [55],
       [67],
       [60],
       [61],
       [63],
       [56],
       [64],
       [43],
       [64],
       [29],
       [62],
       [35],
       [54],
       [51],
       [42],
       [67],
       [54],
       [49],
       [55],
       [60],
       [70],
       [58],
       [46],
       [77],
       [52],
       [45],
       [50]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [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],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [2],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[146],
       [152],
       [117],
       [130],
       [140],
       [180],
       [152],
       [102],
       [148],
       [108],
       [130],
       [180],
       [115],
       [120],
       [130],
       [160],
       [138],
       [120],
       [140],
       [136],
       [160],
       [160],
       [118],
       [132],
       [140],
       [160],
       [114],
       [150],
       [125],
       [128],
       [104],
       [129]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[218],
       [274],
       [230],
       [263],
       [207],
       [327],
       [277],
       [318],
       [203],
       [269],
       [221],
       [325],
       [303],
       [246],
       [204],
       [164],
       [183],
       [188],
       [308],
       [315],
       [286],
       [201],
       [149],
       [342],
       [293],
       [269],
       [318],
       [231],
       [304],
       [205],
       [208],
       [196]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[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],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [1],
       [0],
       [2],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[105],
       [ 88],
       [160],
       [ 97],
       [138],
       [117],
       [172],
       [160],
       [161],
       [169],
       [163],
       [154],
       [181],
       [ 96],
       [202],
       [145],
       [182],
       [113],
       [142],
       [125],
       [108],
       [163],
       [126],
       [166],
       [170],
       [112],
       [140],
       [147],
       [162],
       [184],
       [148],
       [163]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2. ],
       [1.2],
       [1.4],
       [1.2],
       [1.9],
       [3.4],
       [0. ],
       [0. ],
       [0. ],
       [1.8],
       [0. ],
       [0. ],
       [1.2],
       [2.2],
       [0. ],
       [6.2],
       [1.4],
       [1.4],
       [1.5],
       [1.8],
       [1.5],
       [0. ],
       [0.8],
       [1.2],
       [1.2],
       [2.9],
       [4.4],
       [3.6],
       [0. ],
       [0. ],
       [3. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [3],
       [1],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [0],
       [1],
       [1],
       [0],
       [3],
       [1],
       [3],
       [0],
       [2],
       [1],
       [3],
       [0],
       [3],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [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'reversible'],
       [b'fixed'],
       [b'normal'],
       [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([[63],
       [54],
       [68],
       [58],
       [58],
       [63],
       [43],
       [64],
       [55],
       [63],
       [48],
       [45],
       [56],
       [61],
       [54],
       [59],
       [65],
       [68],
       [45],
       [68],
       [44],
       [39],
       [56],
       [57],
       [40],
       [59],
       [35],
       [57],
       [57],
       [67],
       [41],
       [41]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [2],
       [4],
       [2],
       [1],
       [1],
       [2],
       [1],
       [3],
       [4],
       [3],
       [3],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[145],
       [150],
       [180],
       [100],
       [128],
       [140],
       [122],
       [128],
       [130],
       [140],
       [130],
       [130],
       [120],
       [134],
       [192],
       [160],
       [155],
       [144],
       [110],
       [120],
       [140],
       [118],
       [120],
       [150],
       [110],
       [140],
       [122],
       [120],
       [110],
       [125],
       [105],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[233],
       [232],
       [274],
       [234],
       [259],
       [187],
       [213],
       [263],
       [262],
       [195],
       [256],
       [234],
       [193],
       [234],
       [283],
       [273],
       [269],
       [193],
       [264],
       [211],
       [235],
       [219],
       [240],
       [276],
       [167],
       [177],
       [192],
       [354],
       [335],
       [254],
       [198],
       [214]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [165],
       [150],
       [156],
       [130],
       [144],
       [165],
       [105],
       [155],
       [179],
       [150],
       [175],
       [162],
       [145],
       [195],
       [125],
       [148],
       [141],
       [132],
       [115],
       [180],
       [140],
       [169],
       [112],
       [114],
       [162],
       [174],
       [163],
       [143],
       [163],
       [168],
       [168]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.3],
       [1.6],
       [1.6],
       [0.1],
       [3. ],
       [4. ],
       [0.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [0.6],
       [1.9],
       [2.6],
       [0. ],
       [0. ],
       [0.8],
       [3.4],
       [1.2],
       [1.5],
       [0. ],
       [1.2],
       [0. ],
       [0.6],
       [2. ],
       [0. ],
       [0. ],
       [0.6],
       [3. ],
       [0.2],
       [0. ],
       [2. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.9389 - 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([[35],
       [57],
       [49],
       [57],
       [74],
       [76],
       [69],
       [60],
       [52],
       [69],
       [53],
       [51],
       [52],
       [42],
       [49],
       [51],
       [54],
       [56],
       [55],
       [60],
       [52],
       [54],
       [40],
       [57],
       [64],
       [51],
       [48],
       [57],
       [37],
       [69],
       [70],
       [44]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [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],
       [3],
       [3],
       [2],
       [3],
       [1],
       [4],
       [4],
       [1],
       [4],
       [3],
       [2],
       [1],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [1],
       [3],
       [4],
       [1],
       [3],
       [3],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [165],
       [120],
       [150],
       [120],
       [140],
       [140],
       [130],
       [112],
       [160],
       [142],
       [110],
       [120],
       [148],
       [130],
       [ 94],
       [122],
       [140],
       [160],
       [125],
       [136],
       [108],
       [152],
       [128],
       [110],
       [125],
       [124],
       [130],
       [130],
       [140],
       [156],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[198],
       [289],
       [188],
       [126],
       [269],
       [197],
       [239],
       [253],
       [230],
       [234],
       [226],
       [175],
       [325],
       [244],
       [269],
       [227],
       [286],
       [294],
       [289],
       [258],
       [196],
       [267],
       [223],
       [229],
       [211],
       [245],
       [274],
       [236],
       [250],
       [254],
       [245],
       [197]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [124],
       [139],
       [173],
       [121],
       [116],
       [151],
       [144],
       [160],
       [131],
       [111],
       [123],
       [172],
       [178],
       [163],
       [154],
       [116],
       [153],
       [145],
       [141],
       [169],
       [167],
       [181],
       [150],
       [144],
       [166],
       [166],
       [174],
       [187],
       [146],
       [143],
       [177]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.6],
       [1. ],
       [2. ],
       [0.2],
       [0.2],
       [1.1],
       [1.8],
       [1.4],
       [0. ],
       [0.1],
       [0. ],
       [0.6],
       [0.2],
       [0.8],
       [0. ],
       [0. ],
       [3.2],
       [1.3],
       [0.8],
       [2.8],
       [0.1],
       [0. ],
       [0. ],
       [0.4],
       [1.8],
       [2.4],
       [0.5],
       [0. ],
       [3.5],
       [2. ],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [3],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [3],
       [3],
       [1],
       [1],
       [0],
       [2],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'2'],
       [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([[52],
       [48],
       [54],
       [57],
       [41],
       [46],
       [45],
       [44],
       [65],
       [50],
       [57],
       [67],
       [48],
       [54],
       [56],
       [61],
       [59],
       [53],
       [70],
       [52],
       [48],
       [67],
       [62],
       [44],
       [62],
       [41],
       [53],
       [60],
       [55],
       [53],
       [45],
       [41]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [4],
       [4],
       [2],
       [3],
       [4],
       [2],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [1],
       [3],
       [4],
       [1],
       [2],
       [3],
       [4],
       [2],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [2],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[134],
       [122],
       [110],
       [110],
       [120],
       [142],
       [138],
       [120],
       [140],
       [140],
       [132],
       [120],
       [130],
       [124],
       [130],
       [138],
       [178],
       [130],
       [145],
       [118],
       [110],
       [115],
       [140],
       [130],
       [150],
       [126],
       [138],
       [120],
       [128],
       [130],
       [128],
       [112]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[201],
       [222],
       [206],
       [201],
       [157],
       [177],
       [236],
       [263],
       [417],
       [233],
       [207],
       [237],
       [245],
       [266],
       [256],
       [166],
       [270],
       [246],
       [174],
       [186],
       [229],
       [564],
       [268],
       [219],
       [244],
       [306],
       [234],
       [178],
       [205],
       [197],
       [308],
       [268]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [186],
       [108],
       [126],
       [182],
       [160],
       [152],
       [173],
       [157],
       [163],
       [168],
       [ 71],
       [180],
       [109],
       [142],
       [125],
       [145],
       [173],
       [125],
       [190],
       [168],
       [160],
       [160],
       [188],
       [154],
       [163],
       [160],
       [ 96],
       [130],
       [152],
       [170],
       [172]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [0. ],
       [1.5],
       [0. ],
       [1.4],
       [0.2],
       [0. ],
       [0.8],
       [0.6],
       [0. ],
       [1. ],
       [0.2],
       [2.2],
       [0.6],
       [3.6],
       [4.2],
       [0. ],
       [2.6],
       [0. ],
       [1. ],
       [1.6],
       [3.6],
       [0. ],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [2. ],
       [1.2],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [1],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [1],
       [3],
       [2],
       [3],
       [2],
       [3],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [3],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 1.2822 - accuracy: 0.5000WARNING: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],
       [40],
       [64],
       [64],
       [57],
       [62],
       [41],
       [50],
       [67],
       [42],
       [51],
       [59],
       [37],
       [67],
       [60],
       [57],
       [65],
       [46],
       [44],
       [60],
       [50],
       [53],
       [34],
       [55],
       [58],
       [44],
       [41],
       [39],
       [39],
       [66],
       [58],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [1],
       [3],
       [4],
       [0],
       [4],
       [2],
       [4],
       [4],
       [3],
       [4],
       [1],
       [3],
       [4],
       [4],
       [0],
       [4],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [3],
       [2],
       [3],
       [3],
       [3],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[178],
       [140],
       [140],
       [130],
       [130],
       [140],
       [130],
       [144],
       [100],
       [120],
       [140],
       [170],
       [120],
       [106],
       [150],
       [140],
       [150],
       [101],
       [120],
       [130],
       [110],
       [123],
       [118],
       [140],
       [132],
       [130],
       [135],
       [138],
       [ 94],
       [146],
       [130],
       [160]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[228],
       [199],
       [335],
       [303],
       [131],
       [394],
       [204],
       [200],
       [299],
       [240],
       [298],
       [288],
       [215],
       [223],
       [258],
       [241],
       [225],
       [197],
       [226],
       [206],
       [254],
       [282],
       [210],
       [217],
       [224],
       [233],
       [203],
       [220],
       [199],
       [278],
       [197],
       [360]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [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],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[165],
       [178],
       [158],
       [122],
       [115],
       [157],
       [172],
       [126],
       [125],
       [194],
       [122],
       [159],
       [170],
       [142],
       [157],
       [123],
       [114],
       [156],
       [169],
       [132],
       [159],
       [ 95],
       [192],
       [111],
       [173],
       [179],
       [132],
       [152],
       [179],
       [152],
       [131],
       [151]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [1.4],
       [0. ],
       [2. ],
       [1.2],
       [1.2],
       [1.4],
       [0.9],
       [0.9],
       [0.8],
       [4.2],
       [0.2],
       [0. ],
       [0.3],
       [2.6],
       [0.2],
       [1. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [2. ],
       [0.7],
       [5.6],
       [3.2],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.6],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [2],
       [2],
       [0],
       [3],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, '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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [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=(1, 1), dtype=int64, numpy=array([[57]])>, '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([[124]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[261]])>, '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([[141]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.3]])>, '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'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 1.2670 - accuracy: 0.4870WARNING: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],
       [54],
       [68],
       [62],
       [57],
       [58],
       [47],
       [54],
       [64],
       [63],
       [57],
       [41],
       [52],
       [45],
       [66],
       [48],
       [44],
       [70],
       [39],
       [56],
       [60],
       [42],
       [53],
       [46],
       [64],
       [59],
       [62],
       [64],
       [55],
       [55],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [110],
       [118],
       [124],
       [150],
       [136],
       [112],
       [135],
       [125],
       [135],
       [140],
       [110],
       [128],
       [142],
       [160],
       [124],
       [120],
       [130],
       [140],
       [125],
       [145],
       [120],
       [130],
       [120],
       [170],
       [170],
       [138],
       [145],
       [135],
       [132],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [214],
       [277],
       [209],
       [168],
       [319],
       [204],
       [304],
       [309],
       [252],
       [192],
       [172],
       [255],
       [309],
       [246],
       [255],
       [220],
       [322],
       [321],
       [249],
       [282],
       [295],
       [264],
       [249],
       [227],
       [326],
       [294],
       [212],
       [250],
       [353],
       [409],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [158],
       [151],
       [163],
       [174],
       [152],
       [143],
       [170],
       [131],
       [172],
       [148],
       [158],
       [161],
       [147],
       [120],
       [175],
       [170],
       [109],
       [182],
       [144],
       [142],
       [162],
       [143],
       [144],
       [155],
       [140],
       [106],
       [132],
       [161],
       [132],
       [150],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [1. ],
       [0. ],
       [1.6],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [0.4],
       [0.8],
       [0.6],
       [3.4],
       [1.9],
       [2. ],
       [1.4],
       [1.2],
       [1.9],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [2],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(17, 1), dtype=int64, numpy=
array([[38],
       [56],
       [44],
       [34],
       [58],
       [41],
       [63],
       [58],
       [54],
       [59],
       [44],
       [56],
       [35],
       [51],
       [41],
       [50],
       [53]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [2],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[120],
       [120],
       [120],
       [118],
       [150],
       [110],
       [124],
       [125],
       [110],
       [164],
       [108],
       [132],
       [126],
       [130],
       [112],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[231],
       [236],
       [169],
       [182],
       [270],
       [235],
       [197],
       [300],
       [239],
       [176],
       [141],
       [184],
       [282],
       [305],
       [250],
       [219],
       [203]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[182],
       [178],
       [144],
       [174],
       [111],
       [153],
       [136],
       [171],
       [126],
       [ 90],
       [175],
       [105],
       [156],
       [142],
       [179],
       [158],
       [155]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[3.8],
       [0.8],
       [2.8],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [1. ],
       [0.6],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [3.1]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 35ms/step - loss: 1.2670 - accuracy: 0.4870 - val_loss: 0.6701 - 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([[52],
       [29],
       [77],
       [60],
       [65],
       [57],
       [61],
       [53],
       [70],
       [59],
       [63],
       [60],
       [71],
       [46],
       [69],
       [58],
       [61],
       [67],
       [47],
       [42],
       [48],
       [50],
       [62],
       [57],
       [54],
       [57],
       [53],
       [42],
       [54],
       [41],
       [48],
       [68]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [1],
       [4],
       [4],
       [2],
       [2],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [2],
       [3],
       [3],
       [3],
       [2],
       [2],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [130],
       [125],
       [120],
       [150],
       [124],
       [145],
       [123],
       [145],
       [170],
       [108],
       [150],
       [160],
       [101],
       [140],
       [100],
       [140],
       [106],
       [130],
       [136],
       [130],
       [129],
       [160],
       [110],
       [150],
       [130],
       [130],
       [120],
       [108],
       [126],
       [130],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[205],
       [204],
       [304],
       [178],
       [225],
       [261],
       [307],
       [282],
       [174],
       [288],
       [269],
       [258],
       [302],
       [197],
       [239],
       [234],
       [207],
       [223],
       [253],
       [315],
       [256],
       [196],
       [164],
       [201],
       [232],
       [236],
       [246],
       [209],
       [267],
       [306],
       [245],
       [211]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[184],
       [202],
       [162],
       [ 96],
       [114],
       [141],
       [146],
       [ 95],
       [125],
       [159],
       [169],
       [157],
       [162],
       [156],
       [151],
       [156],
       [138],
       [142],
       [179],
       [125],
       [150],
       [163],
       [145],
       [126],
       [165],
       [174],
       [173],
       [173],
       [167],
       [163],
       [180],
       [115]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0. ],
       [0. ],
       [1. ],
       [0.3],
       [1. ],
       [2. ],
       [2.6],
       [0.2],
       [1.8],
       [2.6],
       [0.4],
       [0. ],
       [1.8],
       [0.1],
       [1.9],
       [0.3],
       [0. ],
       [1.8],
       [0. ],
       [0. ],
       [6.2],
       [1.5],
       [1.6],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.2],
       [1.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [3],
       [0],
       [3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [1],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.5929 - 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([[34],
       [52],
       [63],
       [54],
       [35],
       [57],
       [55],
       [57],
       [64],
       [41],
       [58],
       [68],
       [41],
       [61],
       [60],
       [41],
       [69],
       [44],
       [60],
       [59],
       [48],
       [57],
       [43],
       [60],
       [59],
       [48],
       [68],
       [64],
       [53],
       [56],
       [55],
       [45]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [2],
       [1],
       [2],
       [4],
       [1],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [0],
       [3],
       [4],
       [2],
       [2],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[118],
       [108],
       [140],
       [160],
       [138],
       [110],
       [140],
       [154],
       [128],
       [112],
       [146],
       [180],
       [130],
       [148],
       [117],
       [135],
       [160],
       [130],
       [125],
       [178],
       [122],
       [120],
       [122],
       [102],
       [110],
       [110],
       [144],
       [140],
       [138],
       [120],
       [132],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[210],
       [233],
       [187],
       [201],
       [183],
       [335],
       [217],
       [232],
       [263],
       [268],
       [218],
       [274],
       [214],
       [203],
       [230],
       [203],
       [234],
       [219],
       [258],
       [270],
       [222],
       [354],
       [213],
       [318],
       [239],
       [229],
       [193],
       [335],
       [234],
       [240],
       [342],
       [264]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [2],
       [0],
       [0],
       [1]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[192],
       [147],
       [144],
       [163],
       [182],
       [143],
       [111],
       [164],
       [105],
       [172],
       [105],
       [150],
       [168],
       [161],
       [160],
       [132],
       [131],
       [188],
       [141],
       [145],
       [186],
       [163],
       [165],
       [160],
       [142],
       [168],
       [141],
       [158],
       [160],
       [169],
       [166],
       [132]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.7],
       [0.1],
       [4. ],
       [0. ],
       [1.4],
       [3. ],
       [5.6],
       [0. ],
       [0.2],
       [0. ],
       [2. ],
       [1.6],
       [2. ],
       [0. ],
       [1.4],
       [0. ],
       [0.1],
       [0. ],
       [2.8],
       [4.2],
       [0. ],
       [0.6],
       [0.2],
       [0. ],
       [1.2],
       [1. ],
       [3.4],
       [0. ],
       [0. ],
       [0. ],
       [1.2],
       [1.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [1],
       [3],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [3],
       [2],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [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([[58],
       [63],
       [70],
       [58],
       [64],
       [54],
       [69],
       [62],
       [45],
       [63],
       [55],
       [57],
       [58],
       [65],
       [57],
       [52],
       [54],
       [51],
       [61],
       [74],
       [63],
       [58],
       [61],
       [65],
       [64],
       [43],
       [45],
       [67],
       [58],
       [56],
       [57],
       [44]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [2],
       [4],
       [2],
       [3],
       [4],
       [4],
       [1],
       [4],
       [3],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [2],
       [4],
       [1],
       [4],
       [3],
       [4],
       [2],
       [4],
       [3],
       [2],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[114],
       [130],
       [156],
       [120],
       [180],
       [108],
       [140],
       [140],
       [104],
       [145],
       [160],
       [150],
       [128],
       [155],
       [150],
       [134],
       [120],
       [140],
       [138],
       [120],
       [140],
       [100],
       [134],
       [120],
       [140],
       [132],
       [128],
       [160],
       [132],
       [130],
       [128],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[318],
       [254],
       [245],
       [284],
       [325],
       [309],
       [254],
       [268],
       [208],
       [233],
       [289],
       [126],
       [259],
       [269],
       [276],
       [201],
       [188],
       [298],
       [166],
       [269],
       [195],
       [248],
       [234],
       [177],
       [313],
       [341],
       [308],
       [286],
       [224],
       [221],
       [229],
       [226]])>, '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],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [147],
       [143],
       [160],
       [154],
       [156],
       [146],
       [160],
       [148],
       [150],
       [145],
       [173],
       [130],
       [148],
       [112],
       [158],
       [113],
       [122],
       [125],
       [121],
       [179],
       [122],
       [145],
       [140],
       [133],
       [136],
       [170],
       [108],
       [173],
       [163],
       [150],
       [169]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[4.4],
       [1.4],
       [0. ],
       [1.8],
       [0. ],
       [0. ],
       [2. ],
       [3.6],
       [3. ],
       [2.3],
       [0.8],
       [0.2],
       [3. ],
       [0.8],
       [0.6],
       [0.8],
       [1.4],
       [4.2],
       [3.6],
       [0.2],
       [0. ],
       [1. ],
       [2.6],
       [0.4],
       [0.2],
       [3. ],
       [0. ],
       [1.5],
       [3.2],
       [0. ],
       [0.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [3],
       [2],
       [3],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [0],
       [1],
       [1],
       [2],
       [0],
       [1],
       [1],
       [1],
       [3],
       [1],
       [1],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 1.2045 - 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([[44],
       [43],
       [51],
       [41],
       [67],
       [65],
       [45],
       [52],
       [59],
       [57],
       [55],
       [62],
       [50],
       [67],
       [71],
       [56],
       [49],
       [51],
       [57],
       [40],
       [42],
       [58],
       [41],
       [64],
       [39],
       [65],
       [37],
       [47],
       [59],
       [44],
       [67],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [3],
       [1],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [130],
       [100],
       [120],
       [115],
       [140],
       [138],
       [120],
       [140],
       [165],
       [130],
       [150],
       [110],
       [152],
       [110],
       [120],
       [120],
       [110],
       [152],
       [110],
       [120],
       [140],
       [130],
       [120],
       [ 94],
       [160],
       [130],
       [110],
       [126],
       [140],
       [100],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[197],
       [315],
       [222],
       [157],
       [564],
       [417],
       [236],
       [325],
       [177],
       [289],
       [262],
       [244],
       [254],
       [277],
       [265],
       [193],
       [188],
       [175],
       [274],
       [167],
       [240],
       [211],
       [204],
       [246],
       [199],
       [360],
       [250],
       [275],
       [218],
       [235],
       [299],
       [226]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[177],
       [162],
       [143],
       [182],
       [160],
       [157],
       [152],
       [172],
       [162],
       [124],
       [155],
       [154],
       [159],
       [172],
       [130],
       [162],
       [139],
       [123],
       [ 88],
       [114],
       [194],
       [165],
       [172],
       [ 96],
       [179],
       [151],
       [187],
       [118],
       [134],
       [180],
       [125],
       [114]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.9],
       [1.2],
       [0. ],
       [1.6],
       [0.8],
       [0.2],
       [0.2],
       [0. ],
       [1. ],
       [0. ],
       [1.4],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [2. ],
       [0.6],
       [1.2],
       [2. ],
       [0.8],
       [0. ],
       [1.4],
       [2.2],
       [0. ],
       [0.8],
       [3.5],
       [1. ],
       [2.2],
       [0. ],
       [0.9],
       [2.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [1],
       [1],
       [3],
       [1],
       [1],
       [3],
       [2],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [3],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [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'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [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([[66],
       [55],
       [42],
       [50],
       [59],
       [53],
       [48],
       [57],
       [46],
       [42],
       [45],
       [52],
       [54],
       [57],
       [54],
       [35],
       [67],
       [54],
       [57],
       [40],
       [59],
       [37],
       [70],
       [57],
       [76],
       [62],
       [64],
       [44],
       [35],
       [51],
       [64],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [1],
       [3],
       [1],
       [2],
       [4],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [1],
       [3],
       [3],
       [0],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [1],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [180],
       [102],
       [140],
       [174],
       [142],
       [124],
       [130],
       [142],
       [148],
       [130],
       [112],
       [124],
       [132],
       [125],
       [122],
       [120],
       [110],
       [140],
       [152],
       [160],
       [120],
       [160],
       [130],
       [140],
       [130],
       [130],
       [130],
       [120],
       [ 94],
       [110],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[228],
       [327],
       [265],
       [233],
       [249],
       [226],
       [274],
       [236],
       [177],
       [244],
       [234],
       [230],
       [266],
       [207],
       [273],
       [192],
       [237],
       [206],
       [241],
       [223],
       [273],
       [215],
       [269],
       [131],
       [197],
       [263],
       [303],
       [233],
       [198],
       [227],
       [211],
       [228]])>, '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],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [117],
       [122],
       [163],
       [143],
       [111],
       [166],
       [174],
       [160],
       [178],
       [175],
       [160],
       [109],
       [168],
       [152],
       [174],
       [ 71],
       [108],
       [123],
       [181],
       [125],
       [170],
       [112],
       [115],
       [116],
       [ 97],
       [122],
       [179],
       [130],
       [154],
       [144],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.3],
       [3.4],
       [0.6],
       [0.6],
       [0. ],
       [0. ],
       [0.5],
       [0. ],
       [1.4],
       [0.8],
       [0.6],
       [0. ],
       [2.2],
       [0. ],
       [0.5],
       [0. ],
       [1. ],
       [0. ],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.9],
       [1.2],
       [1.1],
       [1.2],
       [2. ],
       [0.4],
       [1.6],
       [0. ],
       [1.8],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [2],
       [0],
       [0],
       [1],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'2'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [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'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 1.1438 - 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([[43],
       [55],
       [58],
       [66],
       [50],
       [56],
       [49],
       [67],
       [52],
       [68],
       [56],
       [40],
       [44],
       [57],
       [52],
       [60],
       [62],
       [43],
       [51],
       [39],
       [54],
       [46],
       [53],
       [54],
       [60],
       [39],
       [51],
       [60],
       [54],
       [49],
       [45],
       [54]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [3],
       [4],
       [3],
       [4],
       [3],
       [1],
       [2],
       [0],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [3],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [4],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [128],
       [130],
       [146],
       [144],
       [140],
       [118],
       [125],
       [136],
       [144],
       [130],
       [140],
       [120],
       [140],
       [118],
       [130],
       [140],
       [115],
       [125],
       [118],
       [192],
       [150],
       [130],
       [122],
       [140],
       [138],
       [140],
       [130],
       [132],
       [130],
       [110],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[247],
       [205],
       [197],
       [278],
       [200],
       [294],
       [149],
       [254],
       [196],
       [193],
       [256],
       [199],
       [263],
       [241],
       [186],
       [206],
       [394],
       [303],
       [245],
       [219],
       [283],
       [231],
       [197],
       [286],
       [293],
       [220],
       [308],
       [253],
       [288],
       [269],
       [264],
       [258]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[171],
       [130],
       [131],
       [152],
       [126],
       [153],
       [126],
       [163],
       [169],
       [141],
       [142],
       [178],
       [173],
       [123],
       [190],
       [132],
       [157],
       [181],
       [166],
       [140],
       [195],
       [147],
       [152],
       [116],
       [170],
       [152],
       [142],
       [144],
       [159],
       [163],
       [132],
       [147]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.5],
       [2. ],
       [0.6],
       [0. ],
       [0.9],
       [1.3],
       [0.8],
       [0.2],
       [0.1],
       [3.4],
       [0.6],
       [1.4],
       [0. ],
       [0.2],
       [0. ],
       [2.4],
       [1.2],
       [1.2],
       [2.4],
       [1.2],
       [0. ],
       [3.6],
       [1.2],
       [3.2],
       [1.2],
       [0. ],
       [1.5],
       [1.4],
       [0. ],
       [0. ],
       [1.2],
       [0.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [3],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [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=(1, 1), dtype=int64, numpy=array([[41]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[105]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[198]])>, '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([[168]])>, '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([[1]])>, '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.2139 - accuracy: 0.7358WARNING: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],
       [54],
       [68],
       [62],
       [57],
       [58],
       [47],
       [54],
       [64],
       [63],
       [57],
       [41],
       [52],
       [45],
       [66],
       [48],
       [44],
       [70],
       [39],
       [56],
       [60],
       [42],
       [53],
       [46],
       [64],
       [59],
       [62],
       [64],
       [55],
       [55],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [110],
       [118],
       [124],
       [150],
       [136],
       [112],
       [135],
       [125],
       [135],
       [140],
       [110],
       [128],
       [142],
       [160],
       [124],
       [120],
       [130],
       [140],
       [125],
       [145],
       [120],
       [130],
       [120],
       [170],
       [170],
       [138],
       [145],
       [135],
       [132],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [214],
       [277],
       [209],
       [168],
       [319],
       [204],
       [304],
       [309],
       [252],
       [192],
       [172],
       [255],
       [309],
       [246],
       [255],
       [220],
       [322],
       [321],
       [249],
       [282],
       [295],
       [264],
       [249],
       [227],
       [326],
       [294],
       [212],
       [250],
       [353],
       [409],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [158],
       [151],
       [163],
       [174],
       [152],
       [143],
       [170],
       [131],
       [172],
       [148],
       [158],
       [161],
       [147],
       [120],
       [175],
       [170],
       [109],
       [182],
       [144],
       [142],
       [162],
       [143],
       [144],
       [155],
       [140],
       [106],
       [132],
       [161],
       [132],
       [150],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [1. ],
       [0. ],
       [1.6],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [0.4],
       [0.8],
       [0.6],
       [3.4],
       [1.9],
       [2. ],
       [1.4],
       [1.2],
       [1.9],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [2],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(17, 1), dtype=int64, numpy=
array([[38],
       [56],
       [44],
       [34],
       [58],
       [41],
       [63],
       [58],
       [54],
       [59],
       [44],
       [56],
       [35],
       [51],
       [41],
       [50],
       [53]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [2],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[120],
       [120],
       [120],
       [118],
       [150],
       [110],
       [124],
       [125],
       [110],
       [164],
       [108],
       [132],
       [126],
       [130],
       [112],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[231],
       [236],
       [169],
       [182],
       [270],
       [235],
       [197],
       [300],
       [239],
       [176],
       [141],
       [184],
       [282],
       [305],
       [250],
       [219],
       [203]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[182],
       [178],
       [144],
       [174],
       [111],
       [153],
       [136],
       [171],
       [126],
       [ 90],
       [175],
       [105],
       [156],
       [142],
       [179],
       [158],
       [155]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[3.8],
       [0.8],
       [2.8],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [1. ],
       [0.6],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [3.1]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 35ms/step - loss: 1.2139 - accuracy: 0.7358 - val_loss: 1.1677 - val_accuracy: 0.6939
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([[66],
       [70],
       [43],
       [56],
       [57],
       [58],
       [65],
       [41],
       [40],
       [68],
       [53],
       [62],
       [60],
       [70],
       [54],
       [63],
       [60],
       [60],
       [67],
       [57],
       [50],
       [48],
       [51],
       [45],
       [51],
       [64],
       [55],
       [62],
       [57],
       [50],
       [57],
       [48]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [0],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [2],
       [3],
       [4],
       [3],
       [3],
       [3],
       [3],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [145],
       [115],
       [140],
       [120],
       [130],
       [160],
       [135],
       [152],
       [144],
       [142],
       [140],
       [150],
       [160],
       [108],
       [140],
       [102],
       [120],
       [120],
       [154],
       [129],
       [124],
       [110],
       [110],
       [ 94],
       [140],
       [132],
       [160],
       [110],
       [110],
       [130],
       [122]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[226],
       [174],
       [303],
       [294],
       [354],
       [197],
       [360],
       [203],
       [223],
       [193],
       [226],
       [268],
       [258],
       [269],
       [267],
       [187],
       [318],
       [178],
       [237],
       [232],
       [196],
       [274],
       [175],
       [264],
       [227],
       [313],
       [342],
       [164],
       [201],
       [254],
       [236],
       [222]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [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],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[114],
       [125],
       [181],
       [153],
       [163],
       [131],
       [151],
       [132],
       [181],
       [141],
       [111],
       [160],
       [157],
       [112],
       [167],
       [144],
       [160],
       [ 96],
       [ 71],
       [164],
       [163],
       [166],
       [123],
       [132],
       [154],
       [133],
       [166],
       [145],
       [126],
       [159],
       [174],
       [186]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.6],
       [2.6],
       [1.2],
       [1.3],
       [0.6],
       [0.6],
       [0.8],
       [0. ],
       [0. ],
       [3.4],
       [0. ],
       [3.6],
       [2.6],
       [2.9],
       [0. ],
       [4. ],
       [0. ],
       [0. ],
       [1. ],
       [0. ],
       [0. ],
       [0.5],
       [0.6],
       [1.2],
       [0. ],
       [0.2],
       [1.2],
       [6.2],
       [1.5],
       [0. ],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [3],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [3],
       [0],
       [0],
       [1],
       [0]])>, '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'fixed'],
       [b'reversible'],
       [b'normal'],
       [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'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.9346 - accuracy: 0.7812WARNING: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([[53],
       [59],
       [43],
       [63],
       [57],
       [64],
       [56],
       [57],
       [61],
       [59],
       [54],
       [41],
       [61],
       [65],
       [45],
       [57],
       [42],
       [53],
       [60],
       [42],
       [51],
       [41],
       [48],
       [66],
       [34],
       [67],
       [41],
       [69],
       [44],
       [60],
       [61],
       [68]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [2],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [4],
       [2],
       [3],
       [2],
       [4],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[123],
       [170],
       [132],
       [145],
       [165],
       [180],
       [120],
       [128],
       [148],
       [126],
       [124],
       [120],
       [140],
       [150],
       [130],
       [152],
       [120],
       [130],
       [125],
       [102],
       [100],
       [126],
       [130],
       [160],
       [118],
       [106],
       [105],
       [140],
       [130],
       [130],
       [134],
       [180]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[282],
       [288],
       [341],
       [233],
       [289],
       [325],
       [240],
       [229],
       [203],
       [218],
       [266],
       [157],
       [207],
       [225],
       [234],
       [274],
       [240],
       [197],
       [258],
       [265],
       [222],
       [306],
       [256],
       [228],
       [210],
       [223],
       [198],
       [254],
       [219],
       [206],
       [234],
       [274]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 95],
       [159],
       [136],
       [150],
       [124],
       [154],
       [169],
       [150],
       [161],
       [134],
       [109],
       [182],
       [138],
       [114],
       [175],
       [ 88],
       [194],
       [152],
       [141],
       [122],
       [143],
       [163],
       [150],
       [138],
       [192],
       [142],
       [168],
       [146],
       [188],
       [132],
       [145],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2. ],
       [0.2],
       [3. ],
       [2.3],
       [1. ],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [2.2],
       [2.2],
       [0. ],
       [1.9],
       [1. ],
       [0.6],
       [1.2],
       [0.8],
       [1.2],
       [2.8],
       [0.6],
       [1.2],
       [0. ],
       [0. ],
       [2.3],
       [0.7],
       [0.3],
       [0. ],
       [2. ],
       [0. ],
       [2.4],
       [2.6],
       [1.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [3],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [3],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [3],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [1],
       [3],
       [0],
       [2],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [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'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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([[53],
       [55],
       [52],
       [39],
       [64],
       [58],
       [60],
       [59],
       [57],
       [66],
       [71],
       [54],
       [52],
       [55],
       [60],
       [76],
       [58],
       [63],
       [57],
       [43],
       [48],
       [52],
       [49],
       [43],
       [61],
       [49],
       [35],
       [65],
       [67],
       [67],
       [52],
       [42]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [4],
       [2],
       [3],
       [4],
       [4],
       [4],
       [1],
       [0],
       [3],
       [3],
       [4],
       [1],
       [4],
       [4],
       [3],
       [3],
       [2],
       [2],
       [4],
       [2],
       [4],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [4],
       [3],
       [2],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [180],
       [128],
       [ 94],
       [128],
       [146],
       [140],
       [178],
       [130],
       [146],
       [110],
       [120],
       [118],
       [128],
       [117],
       [140],
       [140],
       [140],
       [124],
       [150],
       [110],
       [112],
       [120],
       [122],
       [138],
       [118],
       [138],
       [140],
       [100],
       [115],
       [120],
       [148]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[246],
       [327],
       [205],
       [199],
       [263],
       [218],
       [293],
       [270],
       [131],
       [278],
       [265],
       [188],
       [186],
       [205],
       [230],
       [197],
       [211],
       [195],
       [261],
       [247],
       [229],
       [230],
       [188],
       [213],
       [166],
       [149],
       [183],
       [417],
       [299],
       [564],
       [325],
       [244]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [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],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [2],
       [2],
       [0],
       [2],
       [1],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[173],
       [117],
       [184],
       [179],
       [105],
       [105],
       [170],
       [145],
       [115],
       [152],
       [130],
       [113],
       [190],
       [130],
       [160],
       [116],
       [165],
       [179],
       [141],
       [171],
       [168],
       [160],
       [139],
       [165],
       [125],
       [126],
       [182],
       [157],
       [125],
       [160],
       [172],
       [178]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [3.4],
       [0. ],
       [0. ],
       [0.2],
       [2. ],
       [1.2],
       [4.2],
       [1.2],
       [0. ],
       [0. ],
       [1.4],
       [0. ],
       [2. ],
       [1.4],
       [1.1],
       [0. ],
       [0. ],
       [0.3],
       [1.5],
       [1. ],
       [0. ],
       [2. ],
       [0.2],
       [3.6],
       [0.8],
       [1.4],
       [0.8],
       [0.9],
       [1.6],
       [0.2],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [0],
       [1],
       [1],
       [2],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [3],
       [0],
       [1],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [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'reversible'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.8532 - 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([[46],
       [58],
       [63],
       [55],
       [58],
       [68],
       [42],
       [59],
       [54],
       [64],
       [48],
       [52],
       [62],
       [58],
       [41],
       [54],
       [54],
       [51],
       [51],
       [45],
       [67],
       [43],
       [69],
       [57],
       [59],
       [77],
       [57],
       [55],
       [69],
       [46],
       [59],
       [39]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [3],
       [2],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [2],
       [3],
       [3],
       [1],
       [4],
       [1],
       [4],
       [0],
       [4],
       [1],
       [3],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[101],
       [100],
       [108],
       [140],
       [120],
       [144],
       [120],
       [110],
       [150],
       [140],
       [130],
       [134],
       [140],
       [128],
       [130],
       [132],
       [110],
       [125],
       [140],
       [128],
       [152],
       [130],
       [140],
       [140],
       [160],
       [125],
       [140],
       [160],
       [160],
       [142],
       [174],
       [138]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[197],
       [234],
       [269],
       [217],
       [284],
       [193],
       [209],
       [239],
       [232],
       [335],
       [245],
       [201],
       [394],
       [259],
       [214],
       [288],
       [206],
       [245],
       [308],
       [308],
       [277],
       [315],
       [239],
       [241],
       [273],
       [304],
       [241],
       [289],
       [234],
       [177],
       [249],
       [220]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[156],
       [156],
       [169],
       [111],
       [160],
       [141],
       [173],
       [142],
       [165],
       [158],
       [180],
       [158],
       [157],
       [130],
       [168],
       [159],
       [108],
       [166],
       [142],
       [170],
       [172],
       [162],
       [151],
       [123],
       [125],
       [162],
       [123],
       [145],
       [131],
       [160],
       [143],
       [152]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.1],
       [1.8],
       [5.6],
       [1.8],
       [3.4],
       [0. ],
       [1.2],
       [1.6],
       [0. ],
       [0.2],
       [0.8],
       [1.2],
       [3. ],
       [2. ],
       [0. ],
       [0. ],
       [2.4],
       [1.5],
       [0. ],
       [0. ],
       [1.9],
       [1.8],
       [0.2],
       [0. ],
       [0. ],
       [0.2],
       [0.8],
       [0.1],
       [1.4],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [2],
       [0],
       [0],
       [3],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [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'],
       [b'normal'],
       [b'normal'],
       [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([[40],
       [62],
       [41],
       [58],
       [56],
       [45],
       [47],
       [57],
       [41],
       [45],
       [29],
       [37],
       [70],
       [57],
       [68],
       [53],
       [47],
       [54],
       [62],
       [61],
       [44],
       [67],
       [37],
       [46],
       [56],
       [50],
       [67],
       [58],
       [64],
       [57],
       [44],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [3],
       [1],
       [4],
       [3],
       [3],
       [2],
       [1],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [130],
       [112],
       [132],
       [120],
       [138],
       [130],
       [150],
       [130],
       [110],
       [130],
       [130],
       [156],
       [150],
       [120],
       [138],
       [110],
       [122],
       [150],
       [145],
       [110],
       [160],
       [120],
       [150],
       [130],
       [140],
       [125],
       [114],
       [130],
       [132],
       [120],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[167],
       [263],
       [268],
       [224],
       [193],
       [236],
       [253],
       [126],
       [204],
       [264],
       [204],
       [250],
       [245],
       [276],
       [211],
       [234],
       [275],
       [286],
       [244],
       [307],
       [197],
       [286],
       [215],
       [231],
       [256],
       [233],
       [254],
       [318],
       [303],
       [207],
       [263],
       [335]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[114],
       [ 97],
       [172],
       [173],
       [162],
       [152],
       [179],
       [173],
       [172],
       [132],
       [202],
       [187],
       [143],
       [112],
       [115],
       [160],
       [118],
       [116],
       [154],
       [146],
       [177],
       [108],
       [170],
       [147],
       [142],
       [163],
       [163],
       [140],
       [122],
       [168],
       [173],
       [143]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2. ],
       [1.2],
       [0. ],
       [3.2],
       [1.9],
       [0.2],
       [0. ],
       [0.2],
       [1.4],
       [1.2],
       [0. ],
       [3.5],
       [0. ],
       [0.6],
       [1.5],
       [0. ],
       [1. ],
       [3.2],
       [1.4],
       [1. ],
       [0. ],
       [1.5],
       [0. ],
       [3.6],
       [0.6],
       [0.6],
       [0.2],
       [4.4],
       [2. ],
       [0. ],
       [0. ],
       [3. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [1],
       [1],
       [2],
       [3],
       [2],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.7510 - accuracy: 0.7000WARNING: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],
       [35],
       [44],
       [54],
       [44],
       [40],
       [54],
       [64],
       [63],
       [58],
       [44],
       [49],
       [35],
       [52],
       [55],
       [64],
       [71],
       [56],
       [60],
       [54],
       [39],
       [66],
       [54],
       [52],
       [65],
       [42],
       [54],
       [50],
       [74],
       [45],
       [57],
       [59]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [3],
       [3],
       [1],
       [3],
       [1],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4],
       [2],
       [4],
       [2],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [2],
       [4],
       [1],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [140],
       [120],
       [120],
       [140],
       [125],
       [110],
       [130],
       [100],
       [130],
       [130],
       [122],
       [108],
       [130],
       [120],
       [160],
       [130],
       [130],
       [160],
       [118],
       [178],
       [192],
       [136],
       [155],
       [136],
       [108],
       [144],
       [120],
       [104],
       [130],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[177],
       [198],
       [235],
       [258],
       [226],
       [199],
       [273],
       [211],
       [254],
       [248],
       [233],
       [269],
       [192],
       [233],
       [262],
       [246],
       [302],
       [221],
       [253],
       [201],
       [219],
       [228],
       [283],
       [196],
       [269],
       [315],
       [309],
       [200],
       [269],
       [208],
       [236],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [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]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [130],
       [180],
       [147],
       [169],
       [178],
       [152],
       [144],
       [147],
       [122],
       [179],
       [163],
       [174],
       [147],
       [155],
       [ 96],
       [162],
       [163],
       [144],
       [163],
       [140],
       [165],
       [195],
       [169],
       [148],
       [125],
       [156],
       [126],
       [121],
       [148],
       [174],
       [162]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.4],
       [1.6],
       [0. ],
       [0.4],
       [0. ],
       [1.4],
       [0.5],
       [1.8],
       [1.4],
       [1. ],
       [0.4],
       [0. ],
       [0. ],
       [0.1],
       [0. ],
       [2.2],
       [0.4],
       [0. ],
       [1.4],
       [0. ],
       [1.2],
       [1. ],
       [0. ],
       [0.1],
       [0.8],
       [1.8],
       [0. ],
       [0.9],
       [0.2],
       [3. ],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [1],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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'reversible'],
       [b'normal'],
       [b'normal'],
       [b'2'],
       [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([[51]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[4]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[140]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[298]])>, '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([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[4.2]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[3]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.7420 - accuracy: 0.6839WARNING: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],
       [54],
       [68],
       [62],
       [57],
       [58],
       [47],
       [54],
       [64],
       [63],
       [57],
       [41],
       [52],
       [45],
       [66],
       [48],
       [44],
       [70],
       [39],
       [56],
       [60],
       [42],
       [53],
       [46],
       [64],
       [59],
       [62],
       [64],
       [55],
       [55],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [110],
       [118],
       [124],
       [150],
       [136],
       [112],
       [135],
       [125],
       [135],
       [140],
       [110],
       [128],
       [142],
       [160],
       [124],
       [120],
       [130],
       [140],
       [125],
       [145],
       [120],
       [130],
       [120],
       [170],
       [170],
       [138],
       [145],
       [135],
       [132],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [214],
       [277],
       [209],
       [168],
       [319],
       [204],
       [304],
       [309],
       [252],
       [192],
       [172],
       [255],
       [309],
       [246],
       [255],
       [220],
       [322],
       [321],
       [249],
       [282],
       [295],
       [264],
       [249],
       [227],
       [326],
       [294],
       [212],
       [250],
       [353],
       [409],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [158],
       [151],
       [163],
       [174],
       [152],
       [143],
       [170],
       [131],
       [172],
       [148],
       [158],
       [161],
       [147],
       [120],
       [175],
       [170],
       [109],
       [182],
       [144],
       [142],
       [162],
       [143],
       [144],
       [155],
       [140],
       [106],
       [132],
       [161],
       [132],
       [150],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [1. ],
       [0. ],
       [1.6],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [0.4],
       [0.8],
       [0.6],
       [3.4],
       [1.9],
       [2. ],
       [1.4],
       [1.2],
       [1.9],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [2],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(17, 1), dtype=int64, numpy=
array([[38],
       [56],
       [44],
       [34],
       [58],
       [41],
       [63],
       [58],
       [54],
       [59],
       [44],
       [56],
       [35],
       [51],
       [41],
       [50],
       [53]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [2],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[120],
       [120],
       [120],
       [118],
       [150],
       [110],
       [124],
       [125],
       [110],
       [164],
       [108],
       [132],
       [126],
       [130],
       [112],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[231],
       [236],
       [169],
       [182],
       [270],
       [235],
       [197],
       [300],
       [239],
       [176],
       [141],
       [184],
       [282],
       [305],
       [250],
       [219],
       [203]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[182],
       [178],
       [144],
       [174],
       [111],
       [153],
       [136],
       [171],
       [126],
       [ 90],
       [175],
       [105],
       [156],
       [142],
       [179],
       [158],
       [155]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[3.8],
       [0.8],
       [2.8],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [1. ],
       [0.6],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [3.1]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 34ms/step - loss: 0.7420 - accuracy: 0.6839 - val_loss: 0.7041 - val_accuracy: 0.6939
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([[60],
       [44],
       [62],
       [54],
       [53],
       [71],
       [51],
       [63],
       [41],
       [58],
       [55],
       [54],
       [56],
       [43],
       [66],
       [44],
       [54],
       [57],
       [44],
       [43],
       [45],
       [58],
       [56],
       [41],
       [44],
       [70],
       [65],
       [50],
       [59],
       [60],
       [57],
       [67]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [4],
       [2],
       [3],
       [3],
       [3],
       [1],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [2],
       [3],
       [4],
       [4],
       [2],
       [2],
       [2],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [130],
       [140],
       [192],
       [130],
       [110],
       [125],
       [145],
       [130],
       [146],
       [128],
       [110],
       [130],
       [132],
       [160],
       [110],
       [124],
       [124],
       [130],
       [122],
       [104],
       [100],
       [140],
       [120],
       [120],
       [145],
       [150],
       [140],
       [126],
       [102],
       [110],
       [125]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[206],
       [233],
       [394],
       [283],
       [246],
       [265],
       [245],
       [233],
       [214],
       [218],
       [205],
       [206],
       [256],
       [341],
       [228],
       [197],
       [266],
       [261],
       [219],
       [213],
       [208],
       [248],
       [294],
       [157],
       [263],
       [174],
       [225],
       [233],
       [218],
       [318],
       [335],
       [254]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [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([[2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[132],
       [179],
       [157],
       [195],
       [173],
       [130],
       [166],
       [150],
       [168],
       [105],
       [130],
       [108],
       [142],
       [136],
       [138],
       [177],
       [109],
       [141],
       [188],
       [165],
       [148],
       [122],
       [153],
       [182],
       [173],
       [125],
       [114],
       [163],
       [134],
       [160],
       [143],
       [163]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.4],
       [0.4],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [2.3],
       [2. ],
       [2. ],
       [2. ],
       [0. ],
       [0.6],
       [3. ],
       [2.3],
       [0. ],
       [2.2],
       [0.3],
       [0. ],
       [0.2],
       [3. ],
       [1. ],
       [1.3],
       [0. ],
       [0. ],
       [2.6],
       [1. ],
       [0.6],
       [2.2],
       [0. ],
       [3. ],
       [0.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [1],
       [3],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 0.7405 - 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([[52],
       [63],
       [35],
       [59],
       [70],
       [64],
       [51],
       [62],
       [64],
       [29],
       [66],
       [45],
       [34],
       [59],
       [41],
       [62],
       [54],
       [57],
       [58],
       [76],
       [52],
       [52],
       [65],
       [71],
       [37],
       [44],
       [53],
       [64],
       [55],
       [57],
       [60],
       [59]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3],
       [3],
       [4],
       [2],
       [3],
       [1],
       [2],
       [1],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3],
       [1],
       [2],
       [3],
       [2],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[136],
       [108],
       [120],
       [178],
       [160],
       [140],
       [110],
       [130],
       [180],
       [130],
       [146],
       [110],
       [118],
       [170],
       [112],
       [150],
       [120],
       [130],
       [140],
       [140],
       [118],
       [120],
       [155],
       [160],
       [130],
       [120],
       [123],
       [140],
       [160],
       [150],
       [120],
       [174]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[196],
       [269],
       [198],
       [270],
       [269],
       [313],
       [175],
       [263],
       [325],
       [204],
       [278],
       [264],
       [210],
       [288],
       [268],
       [244],
       [188],
       [236],
       [211],
       [197],
       [186],
       [325],
       [269],
       [302],
       [250],
       [226],
       [282],
       [335],
       [289],
       [276],
       [178],
       [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],
       [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],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[169],
       [169],
       [130],
       [145],
       [112],
       [133],
       [123],
       [ 97],
       [154],
       [202],
       [152],
       [132],
       [192],
       [159],
       [172],
       [154],
       [113],
       [174],
       [165],
       [116],
       [190],
       [172],
       [148],
       [162],
       [187],
       [169],
       [ 95],
       [158],
       [145],
       [112],
       [ 96],
       [143]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.1],
       [1.8],
       [1.6],
       [4.2],
       [2.9],
       [0.2],
       [0.6],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [1.2],
       [0.7],
       [0.2],
       [0. ],
       [1.4],
       [1.4],
       [0. ],
       [0. ],
       [1.1],
       [0. ],
       [0.2],
       [0.8],
       [0.4],
       [3.5],
       [0. ],
       [2. ],
       [0. ],
       [0.8],
       [0.6],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [0]])>, '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'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [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([[64],
       [56],
       [45],
       [51],
       [59],
       [52],
       [37],
       [35],
       [61],
       [51],
       [57],
       [69],
       [39],
       [57],
       [57],
       [42],
       [51],
       [41],
       [60],
       [54],
       [63],
       [43],
       [61],
       [65],
       [40],
       [68],
       [48],
       [69],
       [60],
       [49],
       [58],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [3],
       [1],
       [2],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [0],
       [3],
       [4],
       [4],
       [2],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [0],
       [2],
       [1],
       [4],
       [3],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [130],
       [128],
       [100],
       [160],
       [128],
       [120],
       [138],
       [140],
       [140],
       [165],
       [140],
       [138],
       [130],
       [128],
       [102],
       [140],
       [105],
       [150],
       [108],
       [130],
       [130],
       [148],
       [160],
       [152],
       [144],
       [130],
       [160],
       [140],
       [120],
       [130],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[211],
       [221],
       [308],
       [222],
       [273],
       [205],
       [215],
       [183],
       [207],
       [308],
       [289],
       [254],
       [220],
       [131],
       [229],
       [265],
       [298],
       [198],
       [258],
       [309],
       [254],
       [315],
       [203],
       [360],
       [223],
       [193],
       [245],
       [234],
       [293],
       [188],
       [197],
       [241]])>, '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],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [1],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[144],
       [163],
       [170],
       [143],
       [125],
       [184],
       [170],
       [182],
       [138],
       [142],
       [124],
       [146],
       [152],
       [115],
       [150],
       [122],
       [122],
       [168],
       [157],
       [156],
       [147],
       [162],
       [161],
       [151],
       [181],
       [141],
       [180],
       [131],
       [170],
       [139],
       [131],
       [123]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [1.4],
       [1.9],
       [1.5],
       [1. ],
       [2. ],
       [0. ],
       [1.2],
       [0.4],
       [0.6],
       [4.2],
       [0. ],
       [2.6],
       [0. ],
       [1.4],
       [1.9],
       [0. ],
       [0.8],
       [0. ],
       [3.4],
       [0.2],
       [0.1],
       [1.2],
       [2. ],
       [0.6],
       [0.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [3],
       [3],
       [0],
       [1],
       [1],
       [0],
       [3],
       [1],
       [2],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [3],
       [0],
       [0]])>, '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'normal'],
       [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'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.6773 - 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],
       [54],
       [57],
       [40],
       [69],
       [48],
       [57],
       [77],
       [67],
       [54],
       [62],
       [39],
       [42],
       [48],
       [66],
       [62],
       [58],
       [55],
       [63],
       [58],
       [42],
       [68],
       [50],
       [54],
       [67],
       [45],
       [64],
       [70],
       [56],
       [44],
       [47],
       [46]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [0],
       [1],
       [1],
       [4],
       [2],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [2],
       [1],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [4],
       [2],
       [1],
       [3],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [150],
       [140],
       [140],
       [140],
       [130],
       [154],
       [125],
       [160],
       [160],
       [140],
       [ 94],
       [120],
       [110],
       [150],
       [160],
       [128],
       [140],
       [140],
       [132],
       [120],
       [180],
       [110],
       [125],
       [106],
       [110],
       [130],
       [156],
       [120],
       [140],
       [130],
       [101]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[262],
       [232],
       [241],
       [199],
       [239],
       [256],
       [232],
       [304],
       [286],
       [201],
       [268],
       [199],
       [209],
       [229],
       [226],
       [164],
       [259],
       [217],
       [195],
       [224],
       [240],
       [274],
       [254],
       [273],
       [223],
       [264],
       [303],
       [245],
       [193],
       [235],
       [253],
       [197]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [1],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[155],
       [165],
       [123],
       [178],
       [151],
       [150],
       [164],
       [162],
       [108],
       [163],
       [160],
       [179],
       [173],
       [168],
       [114],
       [145],
       [130],
       [111],
       [179],
       [173],
       [194],
       [150],
       [159],
       [152],
       [142],
       [132],
       [122],
       [143],
       [162],
       [180],
       [179],
       [156]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [0.2],
       [1.4],
       [1.8],
       [0. ],
       [0. ],
       [0. ],
       [1.5],
       [0. ],
       [3.6],
       [0. ],
       [0. ],
       [1. ],
       [2.6],
       [6.2],
       [3. ],
       [5.6],
       [0. ],
       [3.2],
       [0.8],
       [1.6],
       [0. ],
       [0.5],
       [0.3],
       [1.2],
       [2. ],
       [0. ],
       [1.9],
       [0. ],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [3],
       [3],
       [3],
       [2],
       [3],
       [1],
       [1],
       [3],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [3],
       [3],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [0],
       [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'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [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([[41],
       [65],
       [52],
       [53],
       [57],
       [48],
       [53],
       [61],
       [67],
       [46],
       [58],
       [49],
       [67],
       [55],
       [43],
       [67],
       [51],
       [54],
       [50],
       [54],
       [68],
       [64],
       [45],
       [49],
       [60],
       [65],
       [40],
       [41],
       [42],
       [43],
       [35],
       [61]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [2],
       [4],
       [3],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[135],
       [140],
       [134],
       [142],
       [110],
       [122],
       [138],
       [145],
       [100],
       [150],
       [100],
       [118],
       [115],
       [132],
       [115],
       [152],
       [ 94],
       [122],
       [144],
       [108],
       [144],
       [128],
       [130],
       [130],
       [125],
       [120],
       [110],
       [130],
       [136],
       [150],
       [122],
       [138]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[203],
       [417],
       [201],
       [226],
       [201],
       [222],
       [234],
       [307],
       [299],
       [231],
       [234],
       [149],
       [564],
       [342],
       [303],
       [277],
       [227],
       [286],
       [200],
       [267],
       [193],
       [263],
       [234],
       [269],
       [258],
       [177],
       [167],
       [204],
       [315],
       [247],
       [192],
       [166]])>, '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],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[132],
       [157],
       [158],
       [111],
       [126],
       [186],
       [160],
       [146],
       [125],
       [147],
       [156],
       [126],
       [160],
       [166],
       [181],
       [172],
       [154],
       [116],
       [126],
       [167],
       [141],
       [105],
       [175],
       [163],
       [141],
       [140],
       [114],
       [172],
       [125],
       [171],
       [174],
       [125]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.8],
       [0.8],
       [0. ],
       [1.5],
       [0. ],
       [0. ],
       [1. ],
       [0.9],
       [3.6],
       [0.1],
       [0.8],
       [1.6],
       [1.2],
       [1.2],
       [0. ],
       [0. ],
       [3.2],
       [0.9],
       [0. ],
       [3.4],
       [0.2],
       [0.6],
       [0. ],
       [2.8],
       [0.4],
       [2. ],
       [1.4],
       [1.8],
       [1.5],
       [0. ],
       [3.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [3],
       [0],
       [0],
       [0],
       [1],
       [1],
       [2],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.6450 - accuracy: 0.6938WARNING: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],
       [57],
       [60],
       [58],
       [74],
       [63],
       [50],
       [59],
       [47],
       [59],
       [57],
       [56],
       [57],
       [42],
       [45],
       [57],
       [64],
       [46],
       [67],
       [54],
       [57],
       [54],
       [68],
       [48],
       [52],
       [39],
       [58],
       [61],
       [52],
       [60],
       [53],
       [55]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [4],
       [2],
       [2],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [1],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [1],
       [4],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[126],
       [150],
       [130],
       [120],
       [120],
       [140],
       [129],
       [110],
       [110],
       [140],
       [152],
       [120],
       [120],
       [148],
       [138],
       [132],
       [120],
       [142],
       [120],
       [132],
       [130],
       [120],
       [120],
       [124],
       [112],
       [118],
       [114],
       [134],
       [108],
       [117],
       [130],
       [180]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[306],
       [126],
       [253],
       [284],
       [269],
       [187],
       [196],
       [239],
       [275],
       [177],
       [274],
       [240],
       [354],
       [244],
       [236],
       [207],
       [246],
       [177],
       [237],
       [288],
       [236],
       [258],
       [211],
       [274],
       [230],
       [219],
       [318],
       [234],
       [233],
       [230],
       [197],
       [327]])>, '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],
       [0],
       [1],
       [1],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [1]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[163],
       [173],
       [144],
       [160],
       [121],
       [144],
       [163],
       [142],
       [118],
       [162],
       [ 88],
       [169],
       [163],
       [178],
       [152],
       [168],
       [ 96],
       [160],
       [ 71],
       [159],
       [174],
       [147],
       [115],
       [166],
       [160],
       [140],
       [140],
       [145],
       [147],
       [160],
       [152],
       [117]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.2],
       [1.4],
       [1.8],
       [0.2],
       [4. ],
       [0. ],
       [1.2],
       [1. ],
       [0. ],
       [1.2],
       [0. ],
       [0.6],
       [0.8],
       [0.2],
       [0. ],
       [2.2],
       [1.4],
       [1. ],
       [0. ],
       [0. ],
       [0.4],
       [1.5],
       [0.5],
       [0. ],
       [1.2],
       [4.4],
       [2.6],
       [0.1],
       [1.4],
       [1.2],
       [3.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2],
       [1],
       [3],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [3],
       [2],
       [1],
       [1],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [2],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [2],
       [3],
       [2],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[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'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'2'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [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([[66]])>, '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([[178]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[228]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[165]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[1.]])>, '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'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.7131 - accuracy: 0.6839WARNING: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],
       [54],
       [68],
       [62],
       [57],
       [58],
       [47],
       [54],
       [64],
       [63],
       [57],
       [41],
       [52],
       [45],
       [66],
       [48],
       [44],
       [70],
       [39],
       [56],
       [60],
       [42],
       [53],
       [46],
       [64],
       [59],
       [62],
       [64],
       [55],
       [55],
       [56],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [4],
       [3],
       [2],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [4],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [110],
       [118],
       [124],
       [150],
       [136],
       [112],
       [135],
       [125],
       [135],
       [140],
       [110],
       [128],
       [142],
       [160],
       [124],
       [120],
       [130],
       [140],
       [125],
       [145],
       [120],
       [130],
       [120],
       [170],
       [170],
       [138],
       [145],
       [135],
       [132],
       [134],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [214],
       [277],
       [209],
       [168],
       [319],
       [204],
       [304],
       [309],
       [252],
       [192],
       [172],
       [255],
       [309],
       [246],
       [255],
       [220],
       [322],
       [321],
       [249],
       [282],
       [295],
       [264],
       [249],
       [227],
       [326],
       [294],
       [212],
       [250],
       [353],
       [409],
       [177]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [158],
       [151],
       [163],
       [174],
       [152],
       [143],
       [170],
       [131],
       [172],
       [148],
       [158],
       [161],
       [147],
       [120],
       [175],
       [170],
       [109],
       [182],
       [144],
       [142],
       [162],
       [143],
       [144],
       [155],
       [140],
       [106],
       [132],
       [161],
       [132],
       [150],
       [120]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [1. ],
       [0. ],
       [1.6],
       [0. ],
       [0.1],
       [0. ],
       [1.8],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [0.4],
       [0.8],
       [0.6],
       [3.4],
       [1.9],
       [2. ],
       [1.4],
       [1.2],
       [1.9],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [2],
       [0],
       [3],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [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=(17, 1), dtype=int64, numpy=
array([[38],
       [56],
       [44],
       [34],
       [58],
       [41],
       [63],
       [58],
       [54],
       [59],
       [44],
       [56],
       [35],
       [51],
       [41],
       [50],
       [53]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [2],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [0],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[120],
       [120],
       [120],
       [118],
       [150],
       [110],
       [124],
       [125],
       [110],
       [164],
       [108],
       [132],
       [126],
       [130],
       [112],
       [120],
       [140]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[231],
       [236],
       [169],
       [182],
       [270],
       [235],
       [197],
       [300],
       [239],
       [176],
       [141],
       [184],
       [282],
       [305],
       [250],
       [219],
       [203]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[182],
       [178],
       [144],
       [174],
       [111],
       [153],
       [136],
       [171],
       [126],
       [ 90],
       [175],
       [105],
       [156],
       [142],
       [179],
       [158],
       [155]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[3.8],
       [0.8],
       [2.8],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [1. ],
       [0.6],
       [2.1],
       [0. ],
       [1.2],
       [0. ],
       [1.6],
       [3.1]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - 0s 35ms/step - loss: 0.7131 - accuracy: 0.6839 - val_loss: 0.5457 - val_accuracy: 0.6939

<tensorflow.python.keras.callbacks.History at 0x7f79cc3b7a20>
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([[66],
       [62],
       [51],
       [45],
       [60],
       [58],
       [52],
       [65],
       [59],
       [47],
       [63],
       [58],
       [59],
       [65],
       [58],
       [61],
       [61],
       [67],
       [62],
       [56],
       [60],
       [46],
       [42],
       [51],
       [58],
       [58],
       [71],
       [48],
       [52],
       [49],
       [59],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [4],
       [2],
       [4],
       [3],
       [3],
       [4],
       [1],
       [3],
       [4],
       [1],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [1],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [140],
       [112],
       [158],
       [120],
       [172],
       [135],
       [134],
       [108],
       [130],
       [150],
       [150],
       [110],
       [112],
       [150],
       [120],
       [120],
       [120],
       [130],
       [150],
       [105],
       [140],
       [140],
       [128],
       [170],
       [112],
       [130],
       [125],
       [130],
       [164],
       [112]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[302],
       [281],
       [299],
       [160],
       [305],
       [340],
       [199],
       [254],
       [204],
       [243],
       [330],
       [283],
       [212],
       [248],
       [230],
       [243],
       [260],
       [229],
       [267],
       [283],
       [240],
       [204],
       [226],
       [261],
       [216],
       [225],
       [149],
       [275],
       [212],
       [266],
       [176],
       [212]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[151],
       [103],
       [173],
       [138],
       [161],
       [172],
       [162],
       [127],
       [162],
       [152],
       [132],
       [162],
       [157],
       [158],
       [165],
       [137],
       [140],
       [129],
       [ 99],
       [103],
       [171],
       [172],
       [178],
       [186],
       [131],
       [146],
       [125],
       [139],
       [168],
       [171],
       [ 90],
       [132]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.4],
       [1.4],
       [1.6],
       [0. ],
       [0. ],
       [0. ],
       [0.5],
       [2.8],
       [0.8],
       [0. ],
       [1.8],
       [1. ],
       [1.6],
       [0.6],
       [2.5],
       [1. ],
       [3.6],
       [2.6],
       [1.8],
       [1.6],
       [0.9],
       [0. ],
       [0. ],
       [0. ],
       [2.2],
       [2.8],
       [1.6],
       [0.2],
       [1. ],
       [0.6],
       [1. ],
       [0.1]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [3],
       [0],
       [0],
       [2],
       [1],
       [0],
       [1],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/2 [==============>...............] - ETA: 0s - loss: 0.4857 - accuracy: 0.7812WARNING: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([[62],
       [61],
       [59],
       [46],
       [60],
       [47],
       [51],
       [58],
       [67],
       [63],
       [44],
       [56],
       [43],
       [54],
       [44],
       [51],
       [51],
       [46],
       [59],
       [49],
       [50],
       [42],
       [65],
       [59],
       [50],
       [57],
       [62],
       [57],
       [52]])>, 'sex': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [1],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [2],
       [2],
       [2],
       [3],
       [1],
       [4],
       [4],
       [4],
       [2],
       [4],
       [1]])>, 'trestbps': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[130],
       [130],
       [138],
       [140],
       [140],
       [138],
       [125],
       [105],
       [152],
       [150],
       [112],
       [200],
       [110],
       [140],
       [118],
       [120],
       [130],
       [138],
       [140],
       [134],
       [120],
       [130],
       [138],
       [135],
       [150],
       [128],
       [128],
       [130],
       [152]])>, 'chol': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[231],
       [330],
       [271],
       [311],
       [185],
       [257],
       [213],
       [240],
       [212],
       [407],
       [290],
       [288],
       [211],
       [239],
       [242],
       [295],
       [256],
       [243],
       [221],
       [271],
       [244],
       [180],
       [282],
       [234],
       [243],
       [303],
       [208],
       [131],
       [298]])>, 'fbs': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[146],
       [169],
       [182],
       [120],
       [155],
       [156],
       [125],
       [154],
       [150],
       [154],
       [153],
       [133],
       [161],
       [160],
       [149],
       [157],
       [149],
       [152],
       [164],
       [162],
       [162],
       [150],
       [174],
       [161],
       [128],
       [159],
       [140],
       [115],
       [178]])>, 'exang': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(29, 1), dtype=float64, numpy=
array([[1.8],
       [0. ],
       [0. ],
       [1.8],
       [3. ],
       [0. ],
       [1.4],
       [0.6],
       [0.8],
       [4. ],
       [0. ],
       [4. ],
       [0. ],
       [1.2],
       [0.3],
       [0.6],
       [0.5],
       [0. ],
       [0. ],
       [0. ],
       [1.1],
       [0. ],
       [1.4],
       [0.5],
       [2.6],
       [0. ],
       [0. ],
       [1.2],
       [1.2]])>, 'slope': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [3],
       [1],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(29, 1), dtype=string, numpy=
array([[b'reversible'],
       [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'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
2/2 [==============================] - 0s 13ms/step - loss: 0.4023 - accuracy: 0.8361
Accuracy 0.8360655903816223

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

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

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