对结构化数据进行分类

在 tensorflow.google.cn 上查看 在 Google Colab 运行 在 Github 上查看源代码 下载此 notebook

本教程演示了如何对结构化数据进行分类(例如,CSV 中的表格数据)。我们将使用 Keras 来定义模型,将特征列(feature columns) 作为从 CSV 中的列(columns)映射到用于训练模型的特征(features)的桥梁。本教程包括了以下内容的完整代码:

  • Pandas 导入 CSV 文件。
  • tf.data 建立了一个输入流水线(pipeline),用于对行进行分批(batch)和随机排序(shuffle)。
  • 用特征列将 CSV 中的列映射到用于训练模型的特征。
  • 用 Keras 构建,训练并评估模型。

数据集

我们将使用一个小型 数据集,该数据集由克利夫兰心脏病诊所基金会(Cleveland Clinic Foundation for Heart Disease)提供。CSV 中有几百行数据。每行描述了一个病人(patient),每列描述了一个属性(attribute)。我们将使用这些信息来预测一位病人是否患有心脏病,这是在该数据集上的二分类任务。

下面是该数据集的描述。 请注意,有数值(numeric)和类别(categorical)类型的列。

描述 特征类型 数据类型
Age 年龄以年为单位 Numerical integer
Sex (1 = 男;0 = 女) Categorical integer
CP 胸痛类型(0,1,2,3,4) Categorical integer
Trestbpd 静息血压(入院时,以mm Hg计) Numerical integer
Chol 血清胆固醇(mg/dl) Numerical integer
FBS (空腹血糖> 120 mg/dl)(1 = true;0 = false) Categorical integer
RestECG 静息心电图结果(0,1,2) Categorical integer
Thalach 达到的最大心率 Numerical integer
Exang 运动诱发心绞痛(1 =是;0 =否) Categorical integer
Oldpeak 与休息时相比由运动引起的 ST 节段下降 Numerical integer
Slope 在运动高峰 ST 段的斜率 Numerical float
CA 荧光透视法染色的大血管动脉(0-3)的数量 Numerical integer
Thal 3 =正常;6 =固定缺陷;7 =可逆缺陷 Categorical string
Target 心脏病诊断(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 创建一个 dataframe

Pandas 是一个 Python 库,它有许多有用的实用程序,用于加载和处理结构化数据。我们将使用 Pandas 从 URL下载数据集,并将其加载到 dataframe 中。

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

将 dataframe 拆分为训练、验证和测试集

我们下载的数据集是一个 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 包装 dataframe。这让我们能将特征列作为一座桥梁,该桥梁将 Pandas dataframe 中的列映射到用于训练模型的特征。如果我们使用一个非常大的 CSV 文件(非常大以至于它不能放入内存),我们将使用 tf.data 直接从磁盘读取它。本教程不涉及这一点。

# 一种从 Pandas Dataframe 创建 tf.data 数据集的实用程序方法(utility method)
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([50 56 60 37 44], shape=(5,), dtype=int64)
A batch of targets: tf.Tensor([0 1 0 0 0], shape=(5,), dtype=int64)

我们可以看到数据集返回了一个字典,该字典从列名称(来自 dataframe)映射到 dataframe 中行的列值。

演示几种特征列

TensorFlow 提供了多种特征列。本节中,我们将创建几类特征列,并演示特征列如何转换 dataframe 中的列。

# 我们将使用该批数据演示几种特征列
example_batch = next(iter(train_ds))[0]
# 用于创建一个特征列
# 并转换一批次数据的一个实用程序方法
def demo(feature_column):
  feature_layer = layers.DenseFeatures(feature_column)
  print(feature_layer(example_batch).numpy())

数值列

一个特征列的输出将成为模型的输入(使用上面定义的 demo 函数,我们将能准确地看到 dataframe 中的每列的转换方式)。 数值列(numeric column) 是最简单的列类型。它用于表示实数特征。使用此列时,模型将从 dataframe 中接收未更改的列值。

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.

[[45.]
 [48.]
 [53.]
 [54.]
 [65.]]

在这个心脏病数据集中,dataframe 中的大多数列都是数值列。

分桶列

通常,您不希望将数字直接输入模型,而是根据数值范围将其值分成不同的类别。考虑代表一个人年龄的原始数据。我们可以用 分桶列(bucketized column)将年龄分成几个分桶(buckets),而不是将年龄表示成数值列。请注意下面的 one-hot 数值表示每行匹配的年龄范围。

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

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

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

[[0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 1. 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.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1.]]

分类列

在此数据集中,thal 用字符串表示(如 'fixed','normal',或 'reversible')。我们无法直接将字符串提供给模型。相反,我们必须首先将它们映射到数值。分类词汇列(categorical vocabulary columns)提供了一种用 one-hot 向量表示字符串的方法(就像您在上面看到的年龄分桶一样)。词汇表可以用 categorical_column_with_vocabulary_list 作为 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. 1. 0.]
 [0. 1. 0.]
 [0. 0. 1.]]

在更复杂的数据集中,许多列都是分类列(如 strings)。在处理分类数据时,特征列最有价值。尽管在该数据集中只有一列分类列,但我们将使用它来演示在处理其他数据集时,可以使用的几种重要的特征列。

嵌入列

假设我们不是只有几个可能的字符串,而是每个类别有数千(或更多)值。 由于多种原因,随着类别数量的增加,使用 one-hot 编码训练神经网络变得不可行。我们可以使用嵌入列来克服此限制。嵌入列(embedding column)将数据表示为一个低维度密集向量,而非多维的 one-hot 向量,该低维度密集向量可以包含任何数,而不仅仅是 0 或 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.12618947  0.00851152 -0.6605601   0.00534312  0.0283396   0.38664982
  -0.26219028  0.37276345]
 [ 0.12618947  0.00851152 -0.6605601   0.00534312  0.0283396   0.38664982
  -0.26219028  0.37276345]
 [ 0.12618947  0.00851152 -0.6605601   0.00534312  0.0283396   0.38664982
  -0.26219028  0.37276345]
 [ 0.12618947  0.00851152 -0.6605601   0.00534312  0.0283396   0.38664982
  -0.26219028  0.37276345]
 [ 0.26654252  0.6834208  -0.5927453   0.47011724 -0.4667822   0.56023324
   0.195576    0.26464352]]

经过哈希处理的特征列

表示具有大量数值的分类列的另一种方法是使用 categorical_column_with_hash_bucket。该特征列计算输入的一个哈希值,然后选择一个 hash_bucket_size 分桶来编码字符串。使用此列时,您不需要提供词汇表,并且可以选择使 hash_buckets 的数量远远小于实际类别的数量以节省空间。

关键点:该技术的一个重要缺点是可能存在冲突,不同的字符串被映射到同一个范围。实际上,无论如何,经过哈希处理的特征列对某些数据集都有效。

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.]]

组合的特征列

将多种特征组合到一个特征中,称为特征组合(feature crosses),它让模型能够为每种特征组合学习单独的权重。此处,我们将创建一个 age 和 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([[37],
       [42],
       [62],
       [61],
       [61],
       [46],
       [40],
       [57],
       [56],
       [41],
       [39],
       [53],
       [43],
       [57],
       [59],
       [43],
       [37],
       [49],
       [55],
       [47],
       [51],
       [61],
       [53],
       [56],
       [60],
       [66],
       [47],
       [48],
       [63],
       [47],
       [52],
       [70]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [1],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [120],
       [140],
       [138],
       [134],
       [142],
       [110],
       [152],
       [120],
       [110],
       [140],
       [140],
       [130],
       [150],
       [170],
       [122],
       [120],
       [120],
       [128],
       [138],
       [100],
       [130],
       [123],
       [125],
       [125],
       [150],
       [108],
       [130],
       [108],
       [112],
       [128],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[250],
       [295],
       [268],
       [166],
       [234],
       [177],
       [167],
       [274],
       [240],
       [172],
       [321],
       [203],
       [315],
       [276],
       [326],
       [213],
       [215],
       [188],
       [205],
       [257],
       [222],
       [330],
       [282],
       [249],
       [258],
       [226],
       [243],
       [256],
       [269],
       [204],
       [255],
       [322]])>, 'fbs': <tf.Tensor: shape=(32, 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],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[187],
       [162],
       [160],
       [125],
       [145],
       [160],
       [114],
       [ 88],
       [169],
       [158],
       [182],
       [155],
       [162],
       [112],
       [140],
       [165],
       [170],
       [139],
       [130],
       [156],
       [143],
       [169],
       [ 95],
       [144],
       [141],
       [114],
       [152],
       [150],
       [169],
       [143],
       [161],
       [109]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[3.5],
       [0. ],
       [3.6],
       [3.6],
       [2.6],
       [1.4],
       [2. ],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [3.1],
       [1.9],
       [0.6],
       [3.4],
       [0.2],
       [0. ],
       [2. ],
       [2. ],
       [0. ],
       [1.2],
       [0. ],
       [2. ],
       [1.2],
       [2.8],
       [2.6],
       [0. ],
       [0. ],
       [1.8],
       [0.1],
       [0. ],
       [2.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [3],
       [2],
       [2],
       [3],
       [2],
       [2],
       [3],
       [1],
       [1],
       [3],
       [1],
       [2],
       [3],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [3],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [2],
       [1],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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'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: 9.9389 - accuracy: 0.2812WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[50],
       [66],
       [45],
       [62],
       [64],
       [67],
       [54],
       [56],
       [38],
       [63],
       [64],
       [66],
       [68],
       [48],
       [62],
       [64],
       [52],
       [54],
       [43],
       [59],
       [61],
       [67],
       [50],
       [40],
       [60],
       [53],
       [35],
       [49],
       [41],
       [54],
       [58],
       [68]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [1],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [1],
       [2],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [2],
       [2],
       [3],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [112],
       [104],
       [124],
       [128],
       [120],
       [192],
       [130],
       [120],
       [130],
       [125],
       [160],
       [144],
       [124],
       [120],
       [130],
       [118],
       [132],
       [150],
       [110],
       [120],
       [120],
       [120],
       [152],
       [158],
       [130],
       [120],
       [130],
       [126],
       [108],
       [100],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[243],
       [212],
       [208],
       [209],
       [263],
       [237],
       [283],
       [283],
       [231],
       [254],
       [309],
       [228],
       [193],
       [274],
       [281],
       [303],
       [186],
       [288],
       [247],
       [239],
       [260],
       [229],
       [219],
       [223],
       [305],
       [197],
       [198],
       [266],
       [306],
       [267],
       [234],
       [211]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [132],
       [148],
       [163],
       [105],
       [ 71],
       [195],
       [103],
       [182],
       [147],
       [131],
       [138],
       [141],
       [166],
       [103],
       [122],
       [190],
       [159],
       [171],
       [142],
       [140],
       [129],
       [158],
       [181],
       [161],
       [152],
       [130],
       [171],
       [163],
       [167],
       [156],
       [115]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.6],
       [0.1],
       [3. ],
       [0. ],
       [0.2],
       [1. ],
       [0. ],
       [1.6],
       [3.8],
       [1.4],
       [1.8],
       [2.3],
       [3.4],
       [0.5],
       [1.4],
       [2. ],
       [0. ],
       [0. ],
       [1.5],
       [1.2],
       [3.6],
       [2.6],
       [1.6],
       [0. ],
       [0. ],
       [1.2],
       [1.6],
       [0.6],
       [0. ],
       [0. ],
       [0.1],
       [1.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [1],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [56],
       [67],
       [48],
       [44],
       [42],
       [60],
       [41],
       [54],
       [71],
       [42],
       [71],
       [51],
       [68],
       [57],
       [55],
       [57],
       [42],
       [46],
       [57],
       [45],
       [67],
       [55],
       [62],
       [58],
       [58],
       [43],
       [65],
       [60],
       [59],
       [57],
       [60]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [3],
       [3],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [0],
       [4],
       [4],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [130],
       [152],
       [124],
       [130],
       [120],
       [120],
       [130],
       [122],
       [110],
       [140],
       [112],
       [140],
       [144],
       [110],
       [140],
       [120],
       [102],
       [150],
       [154],
       [142],
       [160],
       [130],
       [140],
       [150],
       [100],
       [132],
       [150],
       [150],
       [164],
       [130],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[271],
       [221],
       [277],
       [255],
       [233],
       [209],
       [178],
       [214],
       [286],
       [265],
       [226],
       [149],
       [299],
       [193],
       [201],
       [217],
       [354],
       [265],
       [231],
       [232],
       [309],
       [286],
       [262],
       [394],
       [270],
       [248],
       [341],
       [225],
       [240],
       [176],
       [131],
       [253]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[182],
       [163],
       [172],
       [175],
       [179],
       [173],
       [ 96],
       [168],
       [116],
       [130],
       [178],
       [125],
       [173],
       [141],
       [126],
       [111],
       [163],
       [122],
       [147],
       [164],
       [147],
       [108],
       [155],
       [157],
       [111],
       [122],
       [136],
       [114],
       [171],
       [ 90],
       [115],
       [144]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [2. ],
       [3.2],
       [0. ],
       [0. ],
       [1.6],
       [1.6],
       [3.4],
       [1.5],
       [5.6],
       [0.6],
       [0.6],
       [3.6],
       [0. ],
       [0. ],
       [1.5],
       [0. ],
       [1.2],
       [0.8],
       [1. ],
       [3. ],
       [1. ],
       [0.9],
       [1. ],
       [1.2],
       [1.4]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [3],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [2],
       [1],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 4.9268 - accuracy: 0.4479WARNING: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],
       [39],
       [60],
       [45],
       [52],
       [51],
       [41],
       [67],
       [62],
       [58],
       [46],
       [60],
       [50],
       [59],
       [42],
       [59],
       [54],
       [57],
       [67],
       [45],
       [62],
       [58],
       [54],
       [54],
       [51],
       [65],
       [60],
       [54],
       [69],
       [67],
       [67],
       [53]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [2],
       [3],
       [2],
       [3],
       [2],
       [3],
       [2],
       [0],
       [3],
       [1],
       [2],
       [3],
       [4],
       [1],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [1],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [118],
       [117],
       [128],
       [125],
       [ 94],
       [110],
       [152],
       [128],
       [112],
       [101],
       [140],
       [120],
       [164],
       [120],
       [160],
       [108],
       [150],
       [106],
       [110],
       [130],
       [130],
       [140],
       [110],
       [110],
       [140],
       [102],
       [110],
       [160],
       [100],
       [125],
       [142]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[302],
       [219],
       [230],
       [308],
       [212],
       [227],
       [235],
       [212],
       [208],
       [230],
       [197],
       [185],
       [244],
       [176],
       [240],
       [273],
       [309],
       [126],
       [223],
       [264],
       [263],
       [197],
       [239],
       [239],
       [175],
       [417],
       [318],
       [206],
       [234],
       [299],
       [254],
       [226]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[151],
       [140],
       [160],
       [170],
       [168],
       [154],
       [153],
       [150],
       [140],
       [165],
       [156],
       [155],
       [162],
       [ 90],
       [194],
       [125],
       [156],
       [173],
       [142],
       [132],
       [ 97],
       [131],
       [160],
       [126],
       [123],
       [157],
       [160],
       [108],
       [131],
       [125],
       [163],
       [111]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.4],
       [1.2],
       [1.4],
       [0. ],
       [1. ],
       [0. ],
       [0. ],
       [0.8],
       [0. ],
       [2.5],
       [0. ],
       [3. ],
       [1.1],
       [1. ],
       [0.8],
       [0. ],
       [0. ],
       [0.2],
       [0.3],
       [1.2],
       [1.2],
       [0.6],
       [1.2],
       [2.8],
       [0.6],
       [0.8],
       [0. ],
       [0. ],
       [0.1],
       [0.9],
       [0.2],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'1'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[67],
       [44],
       [59],
       [45],
       [48],
       [57],
       [50],
       [55],
       [51],
       [64],
       [51],
       [63],
       [59],
       [51],
       [63],
       [58],
       [63],
       [71],
       [60],
       [49],
       [44],
       [57],
       [57],
       [44],
       [56],
       [54],
       [74],
       [65],
       [66],
       [57],
       [44],
       [43]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [4],
       [3],
       [4],
       [4],
       [0],
       [3],
       [2],
       [1],
       [4],
       [3],
       [3],
       [1],
       [3],
       [1],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [2],
       [3],
       [3],
       [4],
       [2],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [120],
       [126],
       [115],
       [122],
       [140],
       [129],
       [135],
       [125],
       [120],
       [140],
       [135],
       [134],
       [125],
       [145],
       [170],
       [130],
       [160],
       [140],
       [130],
       [110],
       [130],
       [124],
       [140],
       [130],
       [120],
       [120],
       [155],
       [146],
       [128],
       [120],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[564],
       [169],
       [218],
       [260],
       [222],
       [241],
       [196],
       [250],
       [213],
       [246],
       [308],
       [252],
       [204],
       [245],
       [233],
       [225],
       [330],
       [302],
       [293],
       [269],
       [197],
       [236],
       [261],
       [235],
       [256],
       [188],
       [269],
       [269],
       [278],
       [303],
       [226],
       [211]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [144],
       [134],
       [185],
       [186],
       [123],
       [163],
       [161],
       [125],
       [ 96],
       [142],
       [172],
       [162],
       [166],
       [150],
       [146],
       [132],
       [162],
       [170],
       [163],
       [177],
       [174],
       [141],
       [180],
       [142],
       [113],
       [121],
       [148],
       [152],
       [159],
       [169],
       [161]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.6],
       [2.8],
       [2.2],
       [0. ],
       [0. ],
       [0.2],
       [0. ],
       [1.4],
       [1.4],
       [2.2],
       [1.5],
       [0. ],
       [0.8],
       [2.4],
       [2.3],
       [2.8],
       [1.8],
       [0.4],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.3],
       [0. ],
       [0.6],
       [1.4],
       [0.2],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [2],
       [0],
       [0],
       [2],
       [3],
       [2],
       [2],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'fixed'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [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: 3.7403 - accuracy: 0.5625WARNING: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],
       [44],
       [53],
       [45],
       [51],
       [58],
       [60],
       [52],
       [57],
       [64],
       [64],
       [44],
       [65],
       [62],
       [61],
       [65],
       [62],
       [64],
       [61],
       [54],
       [50],
       [76],
       [58],
       [56],
       [57],
       [59],
       [60],
       [41],
       [65],
       [65],
       [39],
       [42]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [3],
       [2],
       [3],
       [2],
       [4],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [1],
       [4],
       [1],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [0],
       [2],
       [4],
       [3],
       [4],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [108],
       [130],
       [130],
       [120],
       [136],
       [145],
       [120],
       [165],
       [180],
       [145],
       [130],
       [110],
       [130],
       [140],
       [138],
       [150],
       [110],
       [145],
       [120],
       [140],
       [140],
       [125],
       [132],
       [130],
       [140],
       [130],
       [112],
       [120],
       [160],
       [ 94],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[289],
       [141],
       [246],
       [234],
       [295],
       [319],
       [282],
       [325],
       [289],
       [325],
       [212],
       [219],
       [248],
       [231],
       [207],
       [282],
       [244],
       [211],
       [307],
       [258],
       [233],
       [197],
       [300],
       [184],
       [131],
       [221],
       [206],
       [268],
       [177],
       [360],
       [199],
       [180]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [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([[2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [1],
       [2],
       [2],
       [1],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[145],
       [175],
       [173],
       [175],
       [157],
       [152],
       [142],
       [172],
       [124],
       [154],
       [132],
       [188],
       [158],
       [146],
       [138],
       [174],
       [154],
       [144],
       [146],
       [147],
       [163],
       [116],
       [171],
       [105],
       [115],
       [164],
       [132],
       [172],
       [140],
       [151],
       [179],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0.6],
       [0. ],
       [0.6],
       [0.6],
       [0. ],
       [2.8],
       [0.2],
       [1. ],
       [0. ],
       [2. ],
       [0. ],
       [0.6],
       [1.8],
       [1.9],
       [1.4],
       [1.4],
       [1.8],
       [1. ],
       [0.4],
       [0.6],
       [1.1],
       [0. ],
       [2.1],
       [1.2],
       [0. ],
       [2.4],
       [0. ],
       [0.4],
       [0.8],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [3],
       [0],
       [0],
       [2],
       [2],
       [0],
       [3],
       [0],
       [2],
       [0],
       [2],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [1],
       [1],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [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([[59]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[178]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[270]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[145]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[4.2]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[3]])>, '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: 3.4274 - accuracy: 0.6062WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [56],
       [54],
       [56],
       [48],
       [58],
       [35],
       [56],
       [58],
       [44],
       [44],
       [57],
       [41],
       [54],
       [58],
       [44],
       [49],
       [68],
       [62],
       [57],
       [34],
       [46],
       [59],
       [56],
       [63],
       [64],
       [52],
       [46],
       [34],
       [61],
       [54],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [2],
       [2],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [160],
       [140],
       [130],
       [140],
       [126],
       [200],
       [128],
       [120],
       [118],
       [150],
       [130],
       [110],
       [120],
       [120],
       [134],
       [180],
       [160],
       [140],
       [118],
       [105],
       [174],
       [120],
       [140],
       [170],
       [108],
       [120],
       [118],
       [150],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[267],
       [236],
       [201],
       [294],
       [245],
       [211],
       [282],
       [288],
       [259],
       [220],
       [242],
       [168],
       [204],
       [214],
       [284],
       [263],
       [271],
       [274],
       [164],
       [241],
       [182],
       [204],
       [249],
       [193],
       [187],
       [227],
       [233],
       [249],
       [210],
       [243],
       [232],
       [228]])>, '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],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 99],
       [178],
       [163],
       [153],
       [180],
       [165],
       [156],
       [133],
       [130],
       [170],
       [149],
       [174],
       [172],
       [158],
       [160],
       [173],
       [162],
       [150],
       [145],
       [123],
       [174],
       [172],
       [143],
       [162],
       [144],
       [155],
       [147],
       [144],
       [192],
       [137],
       [165],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0.8],
       [0. ],
       [1.3],
       [0.2],
       [0. ],
       [0. ],
       [4. ],
       [3. ],
       [0. ],
       [0.3],
       [1.6],
       [1.4],
       [1.6],
       [1.8],
       [0. ],
       [0. ],
       [1.6],
       [6.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4. ],
       [0.6],
       [0.1],
       [0.8],
       [0.7],
       [1. ],
       [1.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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=(17, 1), dtype=int64, numpy=
array([[63],
       [50],
       [45],
       [42],
       [35],
       [52],
       [43],
       [59],
       [66],
       [41],
       [41],
       [60],
       [57],
       [40],
       [48],
       [59],
       [58]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [1],
       [4],
       [1],
       [4],
       [1],
       [2],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[150],
       [144],
       [110],
       [148],
       [138],
       [152],
       [120],
       [170],
       [160],
       [112],
       [105],
       [150],
       [110],
       [140],
       [130],
       [150],
       [132]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[407],
       [200],
       [264],
       [244],
       [183],
       [298],
       [177],
       [288],
       [246],
       [250],
       [198],
       [258],
       [335],
       [199],
       [275],
       [212],
       [224]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[154],
       [126],
       [132],
       [178],
       [182],
       [178],
       [120],
       [159],
       [120],
       [179],
       [168],
       [157],
       [143],
       [178],
       [139],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[4. ],
       [0.9],
       [1.2],
       [0.8],
       [1.4],
       [1.2],
       [2.5],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.6],
       [3. ],
       [1.4],
       [0.2],
       [1.6],
       [3.2]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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: 3.4274 - accuracy: 0.6062 - val_loss: 2.5840 - val_accuracy: 0.7347
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([[74],
       [57],
       [51],
       [66],
       [59],
       [44],
       [54],
       [53],
       [39],
       [66],
       [48],
       [66],
       [57],
       [40],
       [67],
       [64],
       [62],
       [63],
       [64],
       [60],
       [62],
       [60],
       [53],
       [58],
       [43],
       [47],
       [52],
       [42],
       [65],
       [45],
       [42],
       [56]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [1],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [1],
       [3],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [128],
       [ 94],
       [120],
       [170],
       [130],
       [110],
       [142],
       [ 94],
       [146],
       [122],
       [112],
       [130],
       [110],
       [120],
       [110],
       [128],
       [108],
       [145],
       [125],
       [140],
       [117],
       [130],
       [112],
       [130],
       [138],
       [118],
       [120],
       [155],
       [104],
       [130],
       [132]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[269],
       [303],
       [227],
       [302],
       [326],
       [233],
       [206],
       [226],
       [199],
       [278],
       [222],
       [212],
       [131],
       [167],
       [237],
       [211],
       [208],
       [269],
       [212],
       [258],
       [394],
       [230],
       [246],
       [230],
       [315],
       [257],
       [186],
       [209],
       [269],
       [208],
       [180],
       [184]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[121],
       [159],
       [154],
       [151],
       [140],
       [179],
       [108],
       [111],
       [179],
       [152],
       [186],
       [132],
       [115],
       [114],
       [ 71],
       [144],
       [140],
       [169],
       [132],
       [141],
       [157],
       [160],
       [173],
       [165],
       [162],
       [156],
       [190],
       [173],
       [148],
       [148],
       [150],
       [105]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.2],
       [0. ],
       [0. ],
       [0.4],
       [3.4],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.1],
       [1.2],
       [2. ],
       [1. ],
       [1.8],
       [0. ],
       [1.8],
       [2. ],
       [2.8],
       [1.2],
       [1.4],
       [0. ],
       [2.5],
       [1.9],
       [0. ],
       [0. ],
       [0. ],
       [0.8],
       [3. ],
       [0. ],
       [2.1]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [2],
       [3],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [2],
       [3],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 2.3903 - 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([[42],
       [52],
       [67],
       [63],
       [65],
       [57],
       [56],
       [47],
       [59],
       [58],
       [55],
       [63],
       [59],
       [64],
       [55],
       [50],
       [67],
       [67],
       [54],
       [49],
       [50],
       [54],
       [47],
       [50],
       [57],
       [61],
       [61],
       [54],
       [54],
       [66],
       [44],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [3],
       [4],
       [1],
       [4],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [4],
       [3],
       [3],
       [4],
       [4],
       [2],
       [4],
       [1],
       [4],
       [4],
       [1],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [152],
       [130],
       [138],
       [150],
       [125],
       [108],
       [140],
       [125],
       [160],
       [130],
       [164],
       [120],
       [140],
       [120],
       [125],
       [160],
       [108],
       [130],
       [129],
       [108],
       [112],
       [150],
       [154],
       [130],
       [134],
       [140],
       [122],
       [150],
       [120],
       [150]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[240],
       [325],
       [277],
       [254],
       [282],
       [276],
       [249],
       [243],
       [221],
       [300],
       [289],
       [330],
       [176],
       [246],
       [217],
       [244],
       [254],
       [286],
       [309],
       [269],
       [196],
       [267],
       [204],
       [243],
       [232],
       [330],
       [234],
       [239],
       [286],
       [226],
       [226],
       [225]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[194],
       [172],
       [172],
       [147],
       [174],
       [112],
       [144],
       [152],
       [164],
       [171],
       [145],
       [132],
       [ 90],
       [ 96],
       [111],
       [162],
       [163],
       [108],
       [156],
       [163],
       [163],
       [167],
       [143],
       [128],
       [164],
       [169],
       [145],
       [160],
       [116],
       [114],
       [169],
       [114]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0.2],
       [0. ],
       [1.4],
       [1.4],
       [0.6],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.8],
       [1.8],
       [1. ],
       [2.2],
       [5.6],
       [1.1],
       [0.2],
       [1.5],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.1],
       [2.6],
       [0. ],
       [0. ],
       [2.6],
       [1.2],
       [3.2],
       [2.6],
       [0. ],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [3],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [2],
       [1],
       [3],
       [2],
       [1],
       [0],
       [0],
       [2],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'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([[52],
       [57],
       [67],
       [44],
       [44],
       [57],
       [59],
       [62],
       [61],
       [50],
       [60],
       [58],
       [45],
       [55],
       [57],
       [55],
       [76],
       [60],
       [53],
       [54],
       [51],
       [67],
       [57],
       [56],
       [48],
       [58],
       [41],
       [48],
       [64],
       [61],
       [44],
       [64]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [0],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [152],
       [106],
       [108],
       [120],
       [150],
       [164],
       [140],
       [120],
       [120],
       [130],
       [130],
       [142],
       [135],
       [110],
       [128],
       [140],
       [140],
       [140],
       [120],
       [140],
       [115],
       [124],
       [130],
       [124],
       [150],
       [112],
       [130],
       [130],
       [138],
       [140],
       [180]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[255],
       [274],
       [223],
       [141],
       [169],
       [126],
       [176],
       [268],
       [260],
       [219],
       [253],
       [197],
       [309],
       [250],
       [201],
       [205],
       [197],
       [185],
       [203],
       [188],
       [299],
       [564],
       [261],
       [283],
       [255],
       [270],
       [268],
       [256],
       [303],
       [166],
       [235],
       [325]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [1],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[161],
       [ 88],
       [142],
       [175],
       [144],
       [173],
       [ 90],
       [160],
       [140],
       [158],
       [144],
       [131],
       [147],
       [161],
       [126],
       [130],
       [116],
       [155],
       [155],
       [113],
       [173],
       [160],
       [141],
       [103],
       [175],
       [111],
       [172],
       [150],
       [122],
       [125],
       [180],
       [154]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.2],
       [0.3],
       [0.6],
       [2.8],
       [0.2],
       [1. ],
       [3.6],
       [3.6],
       [1.6],
       [1.4],
       [0.6],
       [0. ],
       [1.4],
       [1.5],
       [2. ],
       [1.1],
       [3. ],
       [3.1],
       [1.4],
       [1.6],
       [1.6],
       [0.3],
       [1.6],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [2. ],
       [3.6],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [3],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [1],
       [0],
       [1],
       [0],
       [3],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'1'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [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'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 2.5869 - accuracy: 0.6771WARNING: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],
       [60],
       [39],
       [42],
       [51],
       [59],
       [60],
       [57],
       [37],
       [60],
       [62],
       [53],
       [58],
       [51],
       [65],
       [38],
       [44],
       [43],
       [61],
       [51],
       [59],
       [61],
       [37],
       [58],
       [60],
       [71],
       [60],
       [58],
       [70],
       [54],
       [57],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [2],
       [3],
       [4],
       [3],
       [0],
       [3],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3],
       [1],
       [4],
       [4],
       [4],
       [1],
       [1],
       [4],
       [3],
       [4],
       [4],
       [3],
       [1],
       [4],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [145],
       [140],
       [120],
       [125],
       [138],
       [120],
       [140],
       [130],
       [102],
       [150],
       [123],
       [136],
       [140],
       [160],
       [120],
       [110],
       [132],
       [145],
       [125],
       [134],
       [140],
       [120],
       [100],
       [130],
       [110],
       [150],
       [170],
       [130],
       [110],
       [120],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[172],
       [282],
       [321],
       [295],
       [245],
       [271],
       [178],
       [241],
       [250],
       [318],
       [244],
       [282],
       [319],
       [308],
       [360],
       [231],
       [197],
       [341],
       [307],
       [213],
       [204],
       [207],
       [215],
       [248],
       [206],
       [265],
       [240],
       [225],
       [322],
       [239],
       [354],
       [248]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [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],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[158],
       [142],
       [182],
       [162],
       [166],
       [182],
       [ 96],
       [123],
       [187],
       [160],
       [154],
       [ 95],
       [152],
       [142],
       [151],
       [182],
       [177],
       [136],
       [146],
       [125],
       [162],
       [138],
       [170],
       [122],
       [132],
       [130],
       [171],
       [146],
       [109],
       [126],
       [163],
       [158]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [2.8],
       [0. ],
       [0. ],
       [2.4],
       [0. ],
       [0. ],
       [0.2],
       [3.5],
       [0. ],
       [1.4],
       [2. ],
       [0. ],
       [1.5],
       [0.8],
       [3.8],
       [0. ],
       [3. ],
       [1. ],
       [1.4],
       [0.8],
       [1.9],
       [0. ],
       [1. ],
       [2.4],
       [0. ],
       [0.9],
       [2.8],
       [2.4],
       [2.8],
       [0.6],
       [0.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [3],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [2],
       [1],
       [0],
       [2],
       [3],
       [1],
       [0],
       [2]])>, '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'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[58],
       [52],
       [51],
       [59],
       [44],
       [62],
       [43],
       [49],
       [71],
       [42],
       [49],
       [67],
       [64],
       [39],
       [41],
       [66],
       [42],
       [43],
       [54],
       [71],
       [41],
       [43],
       [62],
       [65],
       [46],
       [60],
       [60],
       [62],
       [56],
       [53],
       [63],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [2],
       [3],
       [4],
       [4],
       [2],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [2],
       [2],
       [3],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[100],
       [125],
       [100],
       [126],
       [130],
       [124],
       [110],
       [120],
       [160],
       [102],
       [130],
       [152],
       [128],
       [118],
       [110],
       [160],
       [140],
       [122],
       [120],
       [112],
       [130],
       [150],
       [130],
       [140],
       [150],
       [140],
       [158],
       [120],
       [120],
       [130],
       [145],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[234],
       [212],
       [222],
       [218],
       [219],
       [209],
       [211],
       [188],
       [302],
       [265],
       [266],
       [212],
       [263],
       [219],
       [235],
       [228],
       [226],
       [213],
       [258],
       [149],
       [214],
       [247],
       [231],
       [417],
       [231],
       [293],
       [305],
       [281],
       [240],
       [197],
       [233],
       [263]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[156],
       [168],
       [143],
       [134],
       [188],
       [163],
       [161],
       [139],
       [162],
       [122],
       [171],
       [150],
       [105],
       [140],
       [153],
       [138],
       [178],
       [165],
       [147],
       [125],
       [168],
       [171],
       [146],
       [157],
       [147],
       [170],
       [161],
       [103],
       [169],
       [152],
       [150],
       [ 97]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.1],
       [1. ],
       [1.2],
       [2.2],
       [0. ],
       [0. ],
       [0. ],
       [2. ],
       [0.4],
       [0.6],
       [0.6],
       [0.8],
       [0.2],
       [1.2],
       [0. ],
       [2.3],
       [0. ],
       [0.2],
       [0.4],
       [1.6],
       [2. ],
       [1.5],
       [1.8],
       [0.8],
       [3.6],
       [1.2],
       [0. ],
       [1.4],
       [0. ],
       [1.2],
       [2.3],
       [1.2]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [3],
       [3],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 1.9435 - accuracy: 0.7063WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [68],
       [50],
       [68],
       [46],
       [65],
       [64],
       [55],
       [59],
       [45],
       [40],
       [67],
       [46],
       [48],
       [63],
       [68],
       [35],
       [59],
       [51],
       [41],
       [56],
       [54],
       [57],
       [45],
       [69],
       [57],
       [54],
       [45],
       [57],
       [45],
       [67],
       [51]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [0],
       [3],
       [4],
       [2],
       [4],
       [3],
       [2],
       [1],
       [1],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [4],
       [1],
       [3],
       [2],
       [2],
       [2],
       [2],
       [4],
       [1],
       [4],
       [2],
       [2],
       [0],
       [2],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [144],
       [140],
       [144],
       [101],
       [120],
       [125],
       [130],
       [160],
       [110],
       [152],
       [120],
       [142],
       [124],
       [135],
       [120],
       [120],
       [178],
       [110],
       [126],
       [130],
       [132],
       [130],
       [115],
       [160],
       [165],
       [192],
       [128],
       [130],
       [130],
       [100],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[239],
       [193],
       [233],
       [193],
       [197],
       [177],
       [309],
       [262],
       [273],
       [264],
       [223],
       [229],
       [177],
       [274],
       [252],
       [211],
       [198],
       [270],
       [175],
       [306],
       [221],
       [288],
       [236],
       [260],
       [234],
       [289],
       [283],
       [308],
       [131],
       [234],
       [299],
       [295]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[142],
       [141],
       [163],
       [141],
       [156],
       [140],
       [131],
       [155],
       [125],
       [132],
       [181],
       [129],
       [160],
       [166],
       [172],
       [115],
       [130],
       [145],
       [123],
       [163],
       [163],
       [159],
       [174],
       [185],
       [131],
       [124],
       [195],
       [170],
       [115],
       [175],
       [125],
       [157]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.2],
       [3.4],
       [0.6],
       [3.4],
       [0. ],
       [0.4],
       [1.8],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [2.6],
       [1.4],
       [0.5],
       [0. ],
       [1.5],
       [1.6],
       [4.2],
       [0.6],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.1],
       [1. ],
       [0. ],
       [0. ],
       [1.2],
       [0.6],
       [0.9],
       [0.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [1],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [3],
       [1],
       [0],
       [1],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [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([[56]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[3]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[130]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[256]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[142]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.6]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, '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.7237 - accuracy: 0.7047WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [56],
       [54],
       [56],
       [48],
       [58],
       [35],
       [56],
       [58],
       [44],
       [44],
       [57],
       [41],
       [54],
       [58],
       [44],
       [49],
       [68],
       [62],
       [57],
       [34],
       [46],
       [59],
       [56],
       [63],
       [64],
       [52],
       [46],
       [34],
       [61],
       [54],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [2],
       [2],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [160],
       [140],
       [130],
       [140],
       [126],
       [200],
       [128],
       [120],
       [118],
       [150],
       [130],
       [110],
       [120],
       [120],
       [134],
       [180],
       [160],
       [140],
       [118],
       [105],
       [174],
       [120],
       [140],
       [170],
       [108],
       [120],
       [118],
       [150],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[267],
       [236],
       [201],
       [294],
       [245],
       [211],
       [282],
       [288],
       [259],
       [220],
       [242],
       [168],
       [204],
       [214],
       [284],
       [263],
       [271],
       [274],
       [164],
       [241],
       [182],
       [204],
       [249],
       [193],
       [187],
       [227],
       [233],
       [249],
       [210],
       [243],
       [232],
       [228]])>, '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],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 99],
       [178],
       [163],
       [153],
       [180],
       [165],
       [156],
       [133],
       [130],
       [170],
       [149],
       [174],
       [172],
       [158],
       [160],
       [173],
       [162],
       [150],
       [145],
       [123],
       [174],
       [172],
       [143],
       [162],
       [144],
       [155],
       [147],
       [144],
       [192],
       [137],
       [165],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0.8],
       [0. ],
       [1.3],
       [0.2],
       [0. ],
       [0. ],
       [4. ],
       [3. ],
       [0. ],
       [0.3],
       [1.6],
       [1.4],
       [1.6],
       [1.8],
       [0. ],
       [0. ],
       [1.6],
       [6.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4. ],
       [0.6],
       [0.1],
       [0.8],
       [0.7],
       [1. ],
       [1.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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=(17, 1), dtype=int64, numpy=
array([[63],
       [50],
       [45],
       [42],
       [35],
       [52],
       [43],
       [59],
       [66],
       [41],
       [41],
       [60],
       [57],
       [40],
       [48],
       [59],
       [58]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [1],
       [4],
       [1],
       [4],
       [1],
       [2],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[150],
       [144],
       [110],
       [148],
       [138],
       [152],
       [120],
       [170],
       [160],
       [112],
       [105],
       [150],
       [110],
       [140],
       [130],
       [150],
       [132]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[407],
       [200],
       [264],
       [244],
       [183],
       [298],
       [177],
       [288],
       [246],
       [250],
       [198],
       [258],
       [335],
       [199],
       [275],
       [212],
       [224]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[154],
       [126],
       [132],
       [178],
       [182],
       [178],
       [120],
       [159],
       [120],
       [179],
       [168],
       [157],
       [143],
       [178],
       [139],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[4. ],
       [0.9],
       [1.2],
       [0.8],
       [1.4],
       [1.2],
       [2.5],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.6],
       [3. ],
       [1.4],
       [0.2],
       [1.6],
       [3.2]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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.7237 - accuracy: 0.7047 - val_loss: 1.9319 - val_accuracy: 0.2653
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([[43],
       [45],
       [66],
       [44],
       [67],
       [61],
       [55],
       [62],
       [50],
       [38],
       [45],
       [59],
       [57],
       [45],
       [56],
       [55],
       [60],
       [47],
       [54],
       [67],
       [53],
       [65],
       [57],
       [55],
       [35],
       [58],
       [41],
       [57],
       [42],
       [66],
       [52],
       [63]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [3],
       [3],
       [4],
       [4],
       [2],
       [2],
       [3],
       [1],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [130],
       [146],
       [108],
       [106],
       [140],
       [135],
       [120],
       [140],
       [120],
       [142],
       [164],
       [124],
       [115],
       [130],
       [140],
       [125],
       [112],
       [122],
       [160],
       [130],
       [140],
       [110],
       [130],
       [120],
       [170],
       [110],
       [150],
       [102],
       [112],
       [128],
       [135]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[315],
       [234],
       [278],
       [141],
       [223],
       [207],
       [250],
       [281],
       [233],
       [231],
       [309],
       [176],
       [261],
       [260],
       [283],
       [217],
       [258],
       [204],
       [286],
       [286],
       [246],
       [417],
       [201],
       [262],
       [198],
       [225],
       [172],
       [276],
       [265],
       [212],
       [255],
       [252]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[162],
       [175],
       [152],
       [175],
       [142],
       [138],
       [161],
       [103],
       [163],
       [182],
       [147],
       [ 90],
       [141],
       [185],
       [103],
       [111],
       [141],
       [143],
       [116],
       [108],
       [173],
       [157],
       [126],
       [155],
       [130],
       [146],
       [158],
       [112],
       [122],
       [132],
       [161],
       [172]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.9],
       [0.6],
       [0. ],
       [0.6],
       [0.3],
       [1.9],
       [1.4],
       [1.4],
       [0.6],
       [3.8],
       [0. ],
       [1. ],
       [0.3],
       [0. ],
       [1.6],
       [5.6],
       [2.8],
       [0.1],
       [3.2],
       [1.5],
       [0. ],
       [0.8],
       [1.5],
       [0. ],
       [1.6],
       [2.8],
       [0. ],
       [0.6],
       [0.6],
       [0.1],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [3],
       [3],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [2],
       [1],
       [0],
       [1],
       [1],
       [0],
       [3],
       [2],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [3],
       [3],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 1.8753 - accuracy: 0.3125WARNING: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],
       [60],
       [57],
       [64],
       [49],
       [52],
       [71],
       [41],
       [65],
       [67],
       [62],
       [48],
       [68],
       [48],
       [48],
       [65],
       [67],
       [54],
       [59],
       [60],
       [64],
       [64],
       [59],
       [37],
       [45],
       [60],
       [42],
       [49],
       [59],
       [61],
       [59],
       [50]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [0],
       [1],
       [3],
       [4],
       [4],
       [2],
       [1],
       [3],
       [3],
       [4],
       [0],
       [4],
       [3],
       [4],
       [4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3],
       [1],
       [3],
       [3],
       [4],
       [1],
       [1],
       [0],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [158],
       [140],
       [110],
       [120],
       [125],
       [112],
       [126],
       [138],
       [152],
       [130],
       [124],
       [144],
       [130],
       [124],
       [150],
       [100],
       [192],
       [126],
       [130],
       [145],
       [125],
       [138],
       [120],
       [110],
       [120],
       [120],
       [130],
       [160],
       [134],
       [164],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[325],
       [305],
       [241],
       [211],
       [188],
       [212],
       [149],
       [306],
       [282],
       [277],
       [231],
       [274],
       [193],
       [256],
       [255],
       [225],
       [299],
       [283],
       [218],
       [206],
       [212],
       [309],
       [271],
       [215],
       [264],
       [178],
       [240],
       [269],
       [273],
       [234],
       [176],
       [219]])>, 'fbs': <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],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[172],
       [161],
       [123],
       [144],
       [139],
       [168],
       [125],
       [163],
       [174],
       [172],
       [146],
       [166],
       [141],
       [150],
       [175],
       [114],
       [125],
       [195],
       [134],
       [132],
       [132],
       [131],
       [182],
       [170],
       [132],
       [ 96],
       [194],
       [163],
       [125],
       [145],
       [ 90],
       [158]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.2],
       [0. ],
       [0.2],
       [1.8],
       [2. ],
       [1. ],
       [1.6],
       [0. ],
       [1.4],
       [0. ],
       [1.8],
       [0.5],
       [3.4],
       [0. ],
       [0. ],
       [1. ],
       [0.9],
       [0. ],
       [2.2],
       [2.4],
       [2. ],
       [1.8],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [2.6],
       [1. ],
       [1.6]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [0],
       [1],
       [1],
       [3],
       [0],
       [2],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'1'],
       [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([[61],
       [63],
       [54],
       [58],
       [51],
       [54],
       [58],
       [43],
       [63],
       [51],
       [57],
       [55],
       [53],
       [57],
       [54],
       [60],
       [58],
       [59],
       [57],
       [44],
       [48],
       [46],
       [52],
       [41],
       [45],
       [51],
       [44],
       [51],
       [50],
       [62],
       [62],
       [42]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [1],
       [3],
       [2],
       [4],
       [4],
       [1],
       [2],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [130],
       [140],
       [100],
       [110],
       [108],
       [150],
       [122],
       [130],
       [120],
       [152],
       [160],
       [142],
       [150],
       [110],
       [145],
       [125],
       [170],
       [165],
       [110],
       [122],
       [150],
       [118],
       [112],
       [128],
       [140],
       [120],
       [125],
       [120],
       [124],
       [140],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[166],
       [254],
       [239],
       [234],
       [175],
       [267],
       [270],
       [213],
       [330],
       [295],
       [274],
       [289],
       [226],
       [126],
       [239],
       [282],
       [300],
       [326],
       [289],
       [197],
       [222],
       [231],
       [186],
       [268],
       [308],
       [299],
       [169],
       [213],
       [244],
       [209],
       [394],
       [180]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[125],
       [147],
       [160],
       [156],
       [123],
       [167],
       [111],
       [165],
       [132],
       [157],
       [ 88],
       [145],
       [111],
       [173],
       [126],
       [142],
       [171],
       [140],
       [124],
       [177],
       [186],
       [147],
       [190],
       [172],
       [170],
       [173],
       [144],
       [125],
       [162],
       [163],
       [157],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[3.6],
       [1.4],
       [1.2],
       [0.1],
       [0.6],
       [0. ],
       [0.8],
       [0.2],
       [1.8],
       [0.6],
       [1.2],
       [0.8],
       [0. ],
       [0.2],
       [2.8],
       [2.8],
       [0. ],
       [3.4],
       [1. ],
       [0. ],
       [0. ],
       [3.6],
       [0. ],
       [0. ],
       [0. ],
       [1.6],
       [2.8],
       [1.4],
       [1.1],
       [0. ],
       [1.2],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [2],
       [2],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [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'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 1.6824 - accuracy: 0.3229WARNING: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],
       [46],
       [65],
       [68],
       [59],
       [61],
       [66],
       [71],
       [46],
       [64],
       [51],
       [42],
       [43],
       [62],
       [63],
       [67],
       [40],
       [54],
       [69],
       [56],
       [57],
       [53],
       [64],
       [66],
       [67],
       [59],
       [68],
       [66],
       [44],
       [57],
       [47],
       [76]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [3],
       [3],
       [1],
       [4],
       [1],
       [2],
       [2],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [2],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[112],
       [142],
       [160],
       [120],
       [178],
       [120],
       [150],
       [160],
       [101],
       [130],
       [ 94],
       [120],
       [132],
       [140],
       [108],
       [115],
       [152],
       [120],
       [160],
       [130],
       [120],
       [130],
       [120],
       [160],
       [125],
       [140],
       [144],
       [120],
       [130],
       [154],
       [108],
       [140]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[230],
       [177],
       [360],
       [211],
       [270],
       [260],
       [226],
       [302],
       [197],
       [303],
       [227],
       [209],
       [341],
       [268],
       [269],
       [564],
       [223],
       [188],
       [234],
       [221],
       [354],
       [197],
       [246],
       [228],
       [254],
       [221],
       [193],
       [302],
       [219],
       [232],
       [243],
       [197]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [1]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[165],
       [160],
       [151],
       [115],
       [145],
       [140],
       [114],
       [162],
       [156],
       [122],
       [154],
       [173],
       [136],
       [160],
       [169],
       [160],
       [181],
       [113],
       [131],
       [163],
       [163],
       [152],
       [ 96],
       [138],
       [163],
       [164],
       [141],
       [151],
       [188],
       [164],
       [152],
       [116]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.5],
       [1.4],
       [0.8],
       [1.5],
       [4.2],
       [3.6],
       [2.6],
       [0.4],
       [0. ],
       [2. ],
       [0. ],
       [0. ],
       [3. ],
       [3.6],
       [1.8],
       [1.6],
       [0. ],
       [1.4],
       [0.1],
       [0. ],
       [0.6],
       [1.2],
       [2.2],
       [2.3],
       [0.2],
       [0. ],
       [3.4],
       [0.4],
       [0. ],
       [0. ],
       [0. ],
       [1.1]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [1],
       [2],
       [3],
       [2],
       [3],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [3],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [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([[67],
       [61],
       [45],
       [53],
       [65],
       [56],
       [47],
       [71],
       [63],
       [61],
       [51],
       [58],
       [54],
       [60],
       [56],
       [56],
       [42],
       [41],
       [50],
       [60],
       [62],
       [60],
       [67],
       [39],
       [64],
       [60],
       [58],
       [54],
       [51],
       [74],
       [60],
       [57]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [1],
       [4],
       [3],
       [2],
       [2],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [2],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[152],
       [145],
       [104],
       [123],
       [120],
       [130],
       [138],
       [110],
       [145],
       [130],
       [100],
       [136],
       [132],
       [140],
       [132],
       [125],
       [120],
       [130],
       [129],
       [130],
       [150],
       [140],
       [120],
       [118],
       [128],
       [102],
       [100],
       [120],
       [140],
       [120],
       [117],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[212],
       [307],
       [208],
       [282],
       [177],
       [256],
       [257],
       [265],
       [233],
       [330],
       [222],
       [319],
       [288],
       [293],
       [184],
       [249],
       [295],
       [214],
       [196],
       [253],
       [244],
       [185],
       [237],
       [219],
       [263],
       [318],
       [248],
       [258],
       [308],
       [269],
       [230],
       [236]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [146],
       [148],
       [ 95],
       [140],
       [142],
       [156],
       [130],
       [150],
       [169],
       [143],
       [152],
       [159],
       [170],
       [105],
       [144],
       [162],
       [168],
       [163],
       [144],
       [154],
       [155],
       [ 71],
       [140],
       [105],
       [160],
       [122],
       [147],
       [142],
       [121],
       [160],
       [174]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [1. ],
       [3. ],
       [2. ],
       [0.4],
       [0.6],
       [0. ],
       [0. ],
       [2.3],
       [0. ],
       [1.2],
       [0. ],
       [0. ],
       [1.2],
       [2.1],
       [1.2],
       [0. ],
       [2. ],
       [0. ],
       [1.4],
       [1.4],
       [3. ],
       [1. ],
       [1.2],
       [0.2],
       [0. ],
       [1. ],
       [0.4],
       [1.5],
       [0.2],
       [1.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [2],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [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'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 1.2473 - accuracy: 0.4688WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[70],
       [57],
       [56],
       [57],
       [40],
       [59],
       [50],
       [44],
       [43],
       [42],
       [65],
       [51],
       [44],
       [44],
       [53],
       [54],
       [59],
       [43],
       [62],
       [65],
       [55],
       [58],
       [67],
       [57],
       [49],
       [37],
       [54],
       [39],
       [64],
       [41],
       [60],
       [62]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [0],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [4],
       [4],
       [1],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [2],
       [3],
       [2],
       [3],
       [4],
       [2],
       [1],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [130],
       [120],
       [130],
       [110],
       [110],
       [150],
       [130],
       [110],
       [140],
       [155],
       [125],
       [120],
       [140],
       [140],
       [110],
       [134],
       [150],
       [130],
       [110],
       [128],
       [130],
       [120],
       [128],
       [130],
       [130],
       [108],
       [140],
       [180],
       [110],
       [150],
       [128]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[322],
       [131],
       [240],
       [131],
       [167],
       [239],
       [243],
       [233],
       [211],
       [226],
       [269],
       [245],
       [226],
       [235],
       [203],
       [206],
       [204],
       [247],
       [263],
       [248],
       [205],
       [197],
       [229],
       [303],
       [266],
       [250],
       [309],
       [321],
       [325],
       [235],
       [240],
       [208]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [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],
       [0],
       [0],
       [1],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[109],
       [115],
       [169],
       [115],
       [114],
       [142],
       [128],
       [179],
       [161],
       [178],
       [148],
       [166],
       [169],
       [180],
       [155],
       [108],
       [162],
       [171],
       [ 97],
       [158],
       [130],
       [131],
       [129],
       [159],
       [171],
       [187],
       [156],
       [182],
       [154],
       [153],
       [171],
       [140]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.4],
       [1.2],
       [0. ],
       [1.2],
       [2. ],
       [1.2],
       [2.6],
       [0.4],
       [0. ],
       [0. ],
       [0.8],
       [2.4],
       [0. ],
       [0. ],
       [3.1],
       [0. ],
       [0.8],
       [1.5],
       [1.2],
       [0.6],
       [2. ],
       [0.6],
       [2.6],
       [0. ],
       [0.6],
       [3.5],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.9],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [3],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [1],
       [2],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, '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'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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([[39]])>, 'sex': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'cp': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[3]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[94]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[199]])>, '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([[179]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 1.1343 - accuracy: 0.5233WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [56],
       [54],
       [56],
       [48],
       [58],
       [35],
       [56],
       [58],
       [44],
       [44],
       [57],
       [41],
       [54],
       [58],
       [44],
       [49],
       [68],
       [62],
       [57],
       [34],
       [46],
       [59],
       [56],
       [63],
       [64],
       [52],
       [46],
       [34],
       [61],
       [54],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [2],
       [2],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [160],
       [140],
       [130],
       [140],
       [126],
       [200],
       [128],
       [120],
       [118],
       [150],
       [130],
       [110],
       [120],
       [120],
       [134],
       [180],
       [160],
       [140],
       [118],
       [105],
       [174],
       [120],
       [140],
       [170],
       [108],
       [120],
       [118],
       [150],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[267],
       [236],
       [201],
       [294],
       [245],
       [211],
       [282],
       [288],
       [259],
       [220],
       [242],
       [168],
       [204],
       [214],
       [284],
       [263],
       [271],
       [274],
       [164],
       [241],
       [182],
       [204],
       [249],
       [193],
       [187],
       [227],
       [233],
       [249],
       [210],
       [243],
       [232],
       [228]])>, '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],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 99],
       [178],
       [163],
       [153],
       [180],
       [165],
       [156],
       [133],
       [130],
       [170],
       [149],
       [174],
       [172],
       [158],
       [160],
       [173],
       [162],
       [150],
       [145],
       [123],
       [174],
       [172],
       [143],
       [162],
       [144],
       [155],
       [147],
       [144],
       [192],
       [137],
       [165],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0.8],
       [0. ],
       [1.3],
       [0.2],
       [0. ],
       [0. ],
       [4. ],
       [3. ],
       [0. ],
       [0.3],
       [1.6],
       [1.4],
       [1.6],
       [1.8],
       [0. ],
       [0. ],
       [1.6],
       [6.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4. ],
       [0.6],
       [0.1],
       [0.8],
       [0.7],
       [1. ],
       [1.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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=(17, 1), dtype=int64, numpy=
array([[63],
       [50],
       [45],
       [42],
       [35],
       [52],
       [43],
       [59],
       [66],
       [41],
       [41],
       [60],
       [57],
       [40],
       [48],
       [59],
       [58]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [1],
       [4],
       [1],
       [4],
       [1],
       [2],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[150],
       [144],
       [110],
       [148],
       [138],
       [152],
       [120],
       [170],
       [160],
       [112],
       [105],
       [150],
       [110],
       [140],
       [130],
       [150],
       [132]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[407],
       [200],
       [264],
       [244],
       [183],
       [298],
       [177],
       [288],
       [246],
       [250],
       [198],
       [258],
       [335],
       [199],
       [275],
       [212],
       [224]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[154],
       [126],
       [132],
       [178],
       [182],
       [178],
       [120],
       [159],
       [120],
       [179],
       [168],
       [157],
       [143],
       [178],
       [139],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[4. ],
       [0.9],
       [1.2],
       [0.8],
       [1.4],
       [1.2],
       [2.5],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.6],
       [3. ],
       [1.4],
       [0.2],
       [1.6],
       [3.2]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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.1343 - accuracy: 0.5233 - val_loss: 1.4262 - val_accuracy: 0.7347
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([[62],
       [54],
       [58],
       [44],
       [46],
       [44],
       [46],
       [67],
       [41],
       [43],
       [64],
       [41],
       [49],
       [57],
       [62],
       [62],
       [62],
       [48],
       [60],
       [65],
       [74],
       [61],
       [47],
       [55],
       [62],
       [51],
       [57],
       [55],
       [55],
       [48],
       [39],
       [54]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3],
       [3],
       [3],
       [4],
       [4],
       [2],
       [2],
       [2],
       [4],
       [3],
       [2],
       [4],
       [4],
       [3],
       [2],
       [4],
       [3],
       [2],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[140],
       [108],
       [100],
       [110],
       [101],
       [140],
       [142],
       [115],
       [130],
       [132],
       [128],
       [126],
       [130],
       [124],
       [124],
       [130],
       [128],
       [124],
       [145],
       [155],
       [120],
       [140],
       [138],
       [135],
       [130],
       [120],
       [128],
       [128],
       [140],
       [124],
       [ 94],
       [110]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[268],
       [267],
       [248],
       [197],
       [197],
       [235],
       [177],
       [564],
       [214],
       [341],
       [263],
       [306],
       [266],
       [261],
       [209],
       [263],
       [208],
       [274],
       [282],
       [269],
       [269],
       [207],
       [257],
       [250],
       [231],
       [295],
       [303],
       [205],
       [217],
       [255],
       [199],
       [239]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [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([[2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [167],
       [122],
       [177],
       [156],
       [180],
       [160],
       [160],
       [168],
       [136],
       [105],
       [163],
       [171],
       [141],
       [163],
       [ 97],
       [140],
       [166],
       [142],
       [148],
       [121],
       [138],
       [156],
       [161],
       [146],
       [157],
       [159],
       [130],
       [111],
       [175],
       [179],
       [126]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[3.6],
       [0. ],
       [1. ],
       [0. ],
       [0. ],
       [0. ],
       [1.4],
       [1.6],
       [2. ],
       [3. ],
       [0.2],
       [0. ],
       [0.6],
       [0.3],
       [0. ],
       [1.2],
       [0. ],
       [0.5],
       [2.8],
       [0.8],
       [0.2],
       [1.9],
       [0. ],
       [1.4],
       [1.8],
       [0.6],
       [0. ],
       [2. ],
       [5.6],
       [0. ],
       [0. ],
       [2.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [2],
       [1],
       [1],
       [1],
       [3],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [2],
       [0],
       [1],
       [1],
       [0],
       [0],
       [3],
       [0],
       [1],
       [1],
       [0],
       [2],
       [0],
       [1]])>, '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'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/7 [===>..........................] - ETA: 0s - loss: 1.2998 - 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([[42],
       [42],
       [59],
       [56],
       [66],
       [51],
       [67],
       [57],
       [56],
       [56],
       [54],
       [51],
       [54],
       [63],
       [57],
       [59],
       [40],
       [60],
       [64],
       [64],
       [61],
       [66],
       [40],
       [52],
       [58],
       [57],
       [69],
       [58],
       [42],
       [58],
       [67],
       [49]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [3],
       [1],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4],
       [3],
       [2],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [1],
       [4],
       [2],
       [4],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [130],
       [178],
       [130],
       [120],
       [140],
       [120],
       [150],
       [125],
       [120],
       [122],
       [ 94],
       [132],
       [135],
       [154],
       [138],
       [152],
       [130],
       [120],
       [145],
       [120],
       [150],
       [110],
       [120],
       [150],
       [150],
       [160],
       [125],
       [120],
       [100],
       [160],
       [120]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[240],
       [180],
       [270],
       [283],
       [302],
       [299],
       [237],
       [126],
       [249],
       [240],
       [286],
       [227],
       [288],
       [252],
       [232],
       [271],
       [223],
       [253],
       [246],
       [212],
       [260],
       [226],
       [167],
       [325],
       [270],
       [276],
       [234],
       [300],
       [295],
       [234],
       [286],
       [188]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [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],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[194],
       [150],
       [145],
       [103],
       [151],
       [173],
       [ 71],
       [173],
       [144],
       [169],
       [116],
       [154],
       [159],
       [172],
       [164],
       [182],
       [181],
       [144],
       [ 96],
       [132],
       [140],
       [114],
       [114],
       [172],
       [111],
       [112],
       [131],
       [171],
       [162],
       [156],
       [108],
       [139]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0.8],
       [0. ],
       [4.2],
       [1.6],
       [0.4],
       [1.6],
       [1. ],
       [0.2],
       [1.2],
       [0. ],
       [3.2],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [1.4],
       [2.2],
       [2. ],
       [3.6],
       [2.6],
       [2. ],
       [0.2],
       [0.8],
       [0.6],
       [0.1],
       [0. ],
       [0. ],
       [0.1],
       [1.5],
       [2. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [1],
       [3],
       [3],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [3],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [2],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [2],
       [0],
       [1],
       [3],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [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([[45],
       [51],
       [67],
       [39],
       [56],
       [48],
       [65],
       [50],
       [37],
       [60],
       [68],
       [66],
       [44],
       [65],
       [54],
       [53],
       [59],
       [47],
       [41],
       [76],
       [70],
       [58],
       [64],
       [57],
       [64],
       [43],
       [60],
       [54],
       [59],
       [68],
       [52],
       [58]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [3],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [0],
       [3],
       [3],
       [4],
       [2],
       [3],
       [4],
       [4],
       [2],
       [3],
       [4],
       [2],
       [4],
       [4],
       [1],
       [3],
       [4],
       [4],
       [4],
       [4],
       [1],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[128],
       [110],
       [120],
       [118],
       [132],
       [122],
       [140],
       [129],
       [120],
       [117],
       [144],
       [146],
       [108],
       [120],
       [108],
       [130],
       [110],
       [112],
       [110],
       [140],
       [130],
       [136],
       [130],
       [110],
       [110],
       [130],
       [140],
       [110],
       [170],
       [144],
       [118],
       [112]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[308],
       [175],
       [229],
       [219],
       [184],
       [222],
       [417],
       [196],
       [215],
       [230],
       [193],
       [278],
       [141],
       [177],
       [309],
       [246],
       [239],
       [204],
       [235],
       [197],
       [322],
       [319],
       [303],
       [201],
       [211],
       [315],
       [293],
       [206],
       [326],
       [193],
       [186],
       [230]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[170],
       [123],
       [129],
       [140],
       [105],
       [186],
       [157],
       [163],
       [170],
       [160],
       [141],
       [152],
       [175],
       [140],
       [156],
       [173],
       [142],
       [143],
       [153],
       [116],
       [109],
       [152],
       [122],
       [126],
       [144],
       [162],
       [170],
       [108],
       [140],
       [141],
       [190],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0.6],
       [2.6],
       [1.2],
       [2.1],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [1.4],
       [3.4],
       [0. ],
       [0.6],
       [0.4],
       [0. ],
       [0. ],
       [1.2],
       [0.1],
       [0. ],
       [1.1],
       [2.4],
       [0. ],
       [2. ],
       [1.5],
       [1.8],
       [1.9],
       [1.2],
       [0. ],
       [3.4],
       [3.4],
       [0. ],
       [2.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [3],
       [2],
       [2],
       [0],
       [0],
       [1],
       [2],
       [1],
       [0],
       [2],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [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'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 1.5803 - 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([[63],
       [45],
       [38],
       [71],
       [60],
       [61],
       [65],
       [48],
       [52],
       [54],
       [50],
       [46],
       [45],
       [67],
       [61],
       [58],
       [57],
       [62],
       [41],
       [53],
       [45],
       [50],
       [43],
       [62],
       [59],
       [52],
       [42],
       [66],
       [44],
       [63],
       [56],
       [63]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [4],
       [1],
       [4],
       [3],
       [1],
       [1],
       [4],
       [4],
       [4],
       [2],
       [3],
       [1],
       [3],
       [4],
       [4],
       [0],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [3],
       [4],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[145],
       [104],
       [120],
       [112],
       [120],
       [134],
       [138],
       [130],
       [128],
       [120],
       [120],
       [150],
       [110],
       [152],
       [138],
       [130],
       [140],
       [140],
       [110],
       [142],
       [142],
       [140],
       [110],
       [150],
       [160],
       [125],
       [102],
       [112],
       [130],
       [130],
       [130],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[233],
       [208],
       [231],
       [149],
       [178],
       [234],
       [282],
       [256],
       [255],
       [188],
       [244],
       [231],
       [264],
       [212],
       [166],
       [197],
       [241],
       [394],
       [172],
       [226],
       [309],
       [233],
       [211],
       [244],
       [273],
       [212],
       [265],
       [212],
       [233],
       [254],
       [256],
       [330]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [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],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[150],
       [148],
       [182],
       [125],
       [ 96],
       [145],
       [174],
       [150],
       [161],
       [113],
       [162],
       [147],
       [132],
       [150],
       [125],
       [131],
       [123],
       [157],
       [158],
       [111],
       [147],
       [163],
       [161],
       [154],
       [125],
       [168],
       [122],
       [132],
       [179],
       [147],
       [142],
       [132]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[2.3],
       [3. ],
       [3.8],
       [1.6],
       [0. ],
       [2.6],
       [1.4],
       [0. ],
       [0. ],
       [1.4],
       [1.1],
       [3.6],
       [1.2],
       [0.8],
       [3.6],
       [0.6],
       [0.2],
       [1.2],
       [0. ],
       [0. ],
       [0. ],
       [0.6],
       [0. ],
       [1.4],
       [0. ],
       [1. ],
       [0.6],
       [0.1],
       [0.4],
       [1.4],
       [0.6],
       [1.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[3],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [0],
       [1],
       [1],
       [3]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [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'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[45],
       [50],
       [45],
       [53],
       [61],
       [60],
       [60],
       [44],
       [42],
       [64],
       [60],
       [67],
       [47],
       [65],
       [50],
       [51],
       [67],
       [57],
       [54],
       [53],
       [42],
       [49],
       [44],
       [41],
       [60],
       [64],
       [39],
       [60],
       [71],
       [68],
       [71],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [2],
       [3],
       [4],
       [1],
       [3],
       [2],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [2],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[115],
       [150],
       [130],
       [130],
       [145],
       [150],
       [102],
       [130],
       [120],
       [125],
       [158],
       [152],
       [108],
       [150],
       [120],
       [125],
       [106],
       [130],
       [140],
       [140],
       [140],
       [130],
       [120],
       [112],
       [125],
       [180],
       [140],
       [140],
       [160],
       [120],
       [110],
       [160]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[260],
       [243],
       [234],
       [197],
       [307],
       [240],
       [318],
       [219],
       [209],
       [309],
       [305],
       [277],
       [243],
       [225],
       [219],
       [245],
       [223],
       [131],
       [239],
       [203],
       [226],
       [269],
       [169],
       [268],
       [258],
       [325],
       [321],
       [185],
       [302],
       [211],
       [265],
       [360]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[185],
       [128],
       [175],
       [152],
       [146],
       [171],
       [160],
       [188],
       [173],
       [131],
       [161],
       [172],
       [152],
       [114],
       [158],
       [166],
       [142],
       [115],
       [160],
       [155],
       [178],
       [163],
       [144],
       [172],
       [141],
       [154],
       [182],
       [155],
       [162],
       [115],
       [130],
       [151]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [2.6],
       [0.6],
       [1.2],
       [1. ],
       [0.9],
       [0. ],
       [0. ],
       [0. ],
       [1.8],
       [0. ],
       [0. ],
       [0. ],
       [1. ],
       [1.6],
       [2.4],
       [0.3],
       [1.2],
       [1.2],
       [3.1],
       [0. ],
       [0. ],
       [2.8],
       [0. ],
       [2.8],
       [0. ],
       [0. ],
       [3. ],
       [0.4],
       [1.5],
       [0. ],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [3],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [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'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [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.
5/7 [====================>.........] - ETA: 0s - loss: 1.4112 - accuracy: 0.7312WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [57],
       [43],
       [67],
       [57],
       [56],
       [63],
       [62],
       [51],
       [57],
       [55],
       [51],
       [43],
       [44],
       [57],
       [66],
       [59],
       [59],
       [35],
       [58],
       [53],
       [54],
       [65],
       [54],
       [67],
       [57],
       [59],
       [37],
       [59],
       [61],
       [60],
       [55]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [4],
       [4],
       [2],
       [2],
       [4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [4],
       [1],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [2],
       [4],
       [4],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[164],
       [130],
       [150],
       [100],
       [130],
       [130],
       [108],
       [120],
       [140],
       [152],
       [160],
       [100],
       [122],
       [120],
       [165],
       [160],
       [134],
       [164],
       [120],
       [170],
       [123],
       [192],
       [110],
       [120],
       [125],
       [120],
       [126],
       [130],
       [140],
       [130],
       [130],
       [130]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[176],
       [131],
       [247],
       [299],
       [236],
       [221],
       [269],
       [281],
       [308],
       [274],
       [289],
       [222],
       [213],
       [226],
       [289],
       [228],
       [204],
       [176],
       [198],
       [225],
       [282],
       [283],
       [248],
       [258],
       [254],
       [354],
       [218],
       [250],
       [221],
       [330],
       [206],
       [262]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 90],
       [115],
       [171],
       [125],
       [174],
       [163],
       [169],
       [103],
       [142],
       [ 88],
       [145],
       [143],
       [165],
       [169],
       [124],
       [138],
       [162],
       [ 90],
       [130],
       [146],
       [ 95],
       [195],
       [158],
       [147],
       [163],
       [163],
       [134],
       [187],
       [164],
       [169],
       [132],
       [155]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1. ],
       [1.2],
       [1.5],
       [0.9],
       [0. ],
       [0. ],
       [1.8],
       [1.4],
       [1.5],
       [1.2],
       [0.8],
       [1.2],
       [0.2],
       [0. ],
       [1. ],
       [2.3],
       [0.8],
       [1. ],
       [1.6],
       [2.8],
       [2. ],
       [0. ],
       [0.6],
       [0.4],
       [0.2],
       [0.6],
       [2.2],
       [3.5],
       [0. ],
       [0. ],
       [2.4],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [0],
       [2],
       [1],
       [0],
       [2],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [3],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2],
       [0],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'1'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(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([[1]])>, 'trestbps': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[125]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[213]])>, 'fbs': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'restecg': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[2]])>, 'thalach': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[125]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[1.4]])>, '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.3253 - accuracy: 0.7254WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [56],
       [54],
       [56],
       [48],
       [58],
       [35],
       [56],
       [58],
       [44],
       [44],
       [57],
       [41],
       [54],
       [58],
       [44],
       [49],
       [68],
       [62],
       [57],
       [34],
       [46],
       [59],
       [56],
       [63],
       [64],
       [52],
       [46],
       [34],
       [61],
       [54],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [2],
       [2],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [160],
       [140],
       [130],
       [140],
       [126],
       [200],
       [128],
       [120],
       [118],
       [150],
       [130],
       [110],
       [120],
       [120],
       [134],
       [180],
       [160],
       [140],
       [118],
       [105],
       [174],
       [120],
       [140],
       [170],
       [108],
       [120],
       [118],
       [150],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[267],
       [236],
       [201],
       [294],
       [245],
       [211],
       [282],
       [288],
       [259],
       [220],
       [242],
       [168],
       [204],
       [214],
       [284],
       [263],
       [271],
       [274],
       [164],
       [241],
       [182],
       [204],
       [249],
       [193],
       [187],
       [227],
       [233],
       [249],
       [210],
       [243],
       [232],
       [228]])>, '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],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 99],
       [178],
       [163],
       [153],
       [180],
       [165],
       [156],
       [133],
       [130],
       [170],
       [149],
       [174],
       [172],
       [158],
       [160],
       [173],
       [162],
       [150],
       [145],
       [123],
       [174],
       [172],
       [143],
       [162],
       [144],
       [155],
       [147],
       [144],
       [192],
       [137],
       [165],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0.8],
       [0. ],
       [1.3],
       [0.2],
       [0. ],
       [0. ],
       [4. ],
       [3. ],
       [0. ],
       [0.3],
       [1.6],
       [1.4],
       [1.6],
       [1.8],
       [0. ],
       [0. ],
       [1.6],
       [6.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4. ],
       [0.6],
       [0.1],
       [0.8],
       [0.7],
       [1. ],
       [1.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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=(17, 1), dtype=int64, numpy=
array([[63],
       [50],
       [45],
       [42],
       [35],
       [52],
       [43],
       [59],
       [66],
       [41],
       [41],
       [60],
       [57],
       [40],
       [48],
       [59],
       [58]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [1],
       [4],
       [1],
       [4],
       [1],
       [2],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[150],
       [144],
       [110],
       [148],
       [138],
       [152],
       [120],
       [170],
       [160],
       [112],
       [105],
       [150],
       [110],
       [140],
       [130],
       [150],
       [132]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[407],
       [200],
       [264],
       [244],
       [183],
       [298],
       [177],
       [288],
       [246],
       [250],
       [198],
       [258],
       [335],
       [199],
       [275],
       [212],
       [224]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[154],
       [126],
       [132],
       [178],
       [182],
       [178],
       [120],
       [159],
       [120],
       [179],
       [168],
       [157],
       [143],
       [178],
       [139],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[4. ],
       [0.9],
       [1.2],
       [0.8],
       [1.4],
       [1.2],
       [2.5],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.6],
       [3. ],
       [1.4],
       [0.2],
       [1.6],
       [3.2]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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.3253 - accuracy: 0.7254 - val_loss: 0.4549 - val_accuracy: 0.7755
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([[65],
       [54],
       [59],
       [35],
       [58],
       [51],
       [65],
       [59],
       [56],
       [60],
       [56],
       [53],
       [40],
       [45],
       [67],
       [51],
       [50],
       [54],
       [67],
       [67],
       [44],
       [51],
       [67],
       [50],
       [57],
       [54],
       [66],
       [62],
       [64],
       [76],
       [61],
       [47]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [4],
       [1],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [4],
       [4],
       [2],
       [3],
       [4],
       [4],
       [2],
       [1],
       [4],
       [4],
       [4],
       [4],
       [1],
       [3],
       [4],
       [3],
       [1],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [140],
       [160],
       [120],
       [130],
       [100],
       [110],
       [170],
       [132],
       [130],
       [120],
       [123],
       [152],
       [130],
       [120],
       [140],
       [120],
       [120],
       [160],
       [100],
       [130],
       [125],
       [120],
       [150],
       [165],
       [110],
       [150],
       [130],
       [145],
       [140],
       [134],
       [112]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[282],
       [239],
       [273],
       [198],
       [197],
       [222],
       [248],
       [326],
       [184],
       [206],
       [240],
       [282],
       [223],
       [234],
       [237],
       [299],
       [244],
       [258],
       [286],
       [299],
       [219],
       [213],
       [229],
       [243],
       [289],
       [239],
       [226],
       [231],
       [212],
       [197],
       [234],
       [204]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[174],
       [160],
       [125],
       [130],
       [131],
       [143],
       [158],
       [140],
       [105],
       [132],
       [169],
       [ 95],
       [181],
       [175],
       [ 71],
       [173],
       [162],
       [147],
       [108],
       [125],
       [188],
       [125],
       [129],
       [128],
       [124],
       [126],
       [114],
       [146],
       [132],
       [116],
       [145],
       [143]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.4],
       [1.2],
       [0. ],
       [1.6],
       [0.6],
       [1.2],
       [0.6],
       [3.4],
       [2.1],
       [2.4],
       [0. ],
       [2. ],
       [0. ],
       [0.6],
       [1. ],
       [1.6],
       [1.1],
       [0.4],
       [1.5],
       [0.9],
       [0. ],
       [1.4],
       [2.6],
       [2.6],
       [1. ],
       [2.8],
       [2.6],
       [1.8],
       [2. ],
       [1.1],
       [2.6],
       [0.1]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [3],
       [2],
       [2],
       [3],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [3],
       [2],
       [2],
       [2],
       [2],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [1],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [2],
       [0],
       [1],
       [2],
       [0],
       [3],
       [1],
       [0],
       [3],
       [2],
       [0],
       [2],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'fixed'],
       [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'normal'],
       [b'reversible'],
       [b'reversible'],
       [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.5099 - 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([[49],
       [67],
       [46],
       [60],
       [54],
       [62],
       [53],
       [44],
       [57],
       [48],
       [54],
       [64],
       [60],
       [60],
       [50],
       [49],
       [57],
       [46],
       [39],
       [58],
       [45],
       [45],
       [43],
       [44],
       [59],
       [58],
       [52],
       [56],
       [53],
       [67],
       [54],
       [65]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [2],
       [1],
       [2],
       [2],
       [4],
       [3],
       [4],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [2],
       [3],
       [3],
       [3],
       [4],
       [2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [115],
       [101],
       [150],
       [108],
       [128],
       [140],
       [108],
       [128],
       [122],
       [120],
       [180],
       [145],
       [130],
       [120],
       [130],
       [150],
       [142],
       [140],
       [100],
       [128],
       [104],
       [130],
       [110],
       [126],
       [125],
       [128],
       [130],
       [130],
       [152],
       [108],
       [160]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[269],
       [564],
       [197],
       [240],
       [309],
       [208],
       [203],
       [141],
       [303],
       [222],
       [188],
       [325],
       [282],
       [253],
       [219],
       [266],
       [126],
       [177],
       [321],
       [234],
       [308],
       [208],
       [315],
       [197],
       [218],
       [300],
       [255],
       [283],
       [197],
       [212],
       [267],
       [360]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[163],
       [160],
       [156],
       [171],
       [156],
       [140],
       [155],
       [175],
       [159],
       [186],
       [113],
       [154],
       [142],
       [144],
       [158],
       [171],
       [173],
       [160],
       [182],
       [156],
       [170],
       [148],
       [162],
       [177],
       [134],
       [171],
       [161],
       [103],
       [152],
       [150],
       [167],
       [151]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [1.6],
       [0. ],
       [0.9],
       [0. ],
       [0. ],
       [3.1],
       [0.6],
       [0. ],
       [0. ],
       [1.4],
       [0. ],
       [2.8],
       [1.4],
       [1.6],
       [0.6],
       [0.2],
       [1.4],
       [0. ],
       [0.1],
       [0. ],
       [3. ],
       [1.9],
       [0. ],
       [2.2],
       [0. ],
       [0. ],
       [1.6],
       [1.2],
       [0.8],
       [0. ],
       [0.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [1],
       [1],
       [1],
       [3],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [3],
       [3],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [2],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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([[60],
       [52],
       [56],
       [45],
       [42],
       [60],
       [59],
       [57],
       [39],
       [57],
       [67],
       [65],
       [39],
       [64],
       [66],
       [51],
       [53],
       [41],
       [44],
       [49],
       [54],
       [37],
       [61],
       [65],
       [65],
       [64],
       [46],
       [60],
       [63],
       [41],
       [51],
       [64]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [4],
       [4],
       [3],
       [4],
       [0],
       [4],
       [2],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [3],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [4],
       [2],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[117],
       [120],
       [130],
       [115],
       [102],
       [120],
       [164],
       [140],
       [118],
       [124],
       [125],
       [150],
       [ 94],
       [130],
       [112],
       [120],
       [130],
       [130],
       [120],
       [120],
       [110],
       [120],
       [120],
       [140],
       [120],
       [120],
       [150],
       [140],
       [108],
       [110],
       [110],
       [125]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[230],
       [325],
       [256],
       [260],
       [265],
       [178],
       [176],
       [241],
       [219],
       [261],
       [254],
       [225],
       [199],
       [303],
       [212],
       [295],
       [246],
       [214],
       [226],
       [188],
       [206],
       [215],
       [260],
       [417],
       [177],
       [246],
       [231],
       [293],
       [269],
       [235],
       [175],
       [309]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[160],
       [172],
       [142],
       [185],
       [122],
       [ 96],
       [ 90],
       [123],
       [140],
       [141],
       [163],
       [114],
       [179],
       [122],
       [132],
       [157],
       [173],
       [168],
       [169],
       [139],
       [108],
       [170],
       [140],
       [157],
       [140],
       [ 96],
       [147],
       [170],
       [169],
       [153],
       [123],
       [131]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.4],
       [0.2],
       [0.6],
       [0. ],
       [0.6],
       [0. ],
       [1. ],
       [0.2],
       [1.2],
       [0.3],
       [0.2],
       [1. ],
       [0. ],
       [2. ],
       [0.1],
       [0.6],
       [0. ],
       [2. ],
       [0. ],
       [2. ],
       [0. ],
       [0. ],
       [3.6],
       [0.8],
       [0.4],
       [2.2],
       [3.6],
       [1.2],
       [1.8],
       [0. ],
       [0.6],
       [1.8]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [3],
       [0],
       [2],
       [1],
       [0],
       [3],
       [0],
       [0],
       [3],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
3/7 [===========>..................] - ETA: 0s - loss: 0.5243 - accuracy: 0.7708WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [67],
       [41],
       [59],
       [48],
       [52],
       [48],
       [57],
       [63],
       [55],
       [59],
       [55],
       [58],
       [62],
       [40],
       [71],
       [45],
       [71],
       [69],
       [37],
       [60],
       [58],
       [58],
       [55],
       [43],
       [57],
       [54],
       [47],
       [38],
       [61],
       [47],
       [54]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [3],
       [2],
       [1],
       [4],
       [1],
       [3],
       [0],
       [3],
       [2],
       [1],
       [4],
       [2],
       [4],
       [4],
       [4],
       [1],
       [2],
       [1],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [1],
       [4],
       [3],
       [2]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[138],
       [152],
       [126],
       [134],
       [130],
       [118],
       [124],
       [130],
       [135],
       [135],
       [178],
       [160],
       [136],
       [124],
       [110],
       [112],
       [110],
       [160],
       [160],
       [130],
       [102],
       [100],
       [112],
       [128],
       [150],
       [120],
       [132],
       [138],
       [120],
       [140],
       [108],
       [192]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[271],
       [277],
       [306],
       [204],
       [256],
       [186],
       [255],
       [131],
       [252],
       [250],
       [270],
       [289],
       [319],
       [209],
       [167],
       [149],
       [264],
       [302],
       [234],
       [250],
       [318],
       [248],
       [230],
       [205],
       [247],
       [354],
       [288],
       [257],
       [231],
       [207],
       [243],
       [283]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [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],
       [2],
       [2],
       [0],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [1],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[182],
       [172],
       [163],
       [162],
       [150],
       [190],
       [175],
       [115],
       [172],
       [161],
       [145],
       [145],
       [152],
       [163],
       [114],
       [125],
       [132],
       [162],
       [131],
       [187],
       [160],
       [122],
       [165],
       [130],
       [171],
       [163],
       [159],
       [156],
       [182],
       [138],
       [152],
       [195]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0. ],
       [0.8],
       [0. ],
       [0. ],
       [0. ],
       [1.2],
       [0. ],
       [1.4],
       [4.2],
       [0.8],
       [0. ],
       [0. ],
       [2. ],
       [1.6],
       [1.2],
       [0.4],
       [0.1],
       [3.5],
       [0. ],
       [1. ],
       [2.5],
       [2. ],
       [1.5],
       [0.6],
       [0. ],
       [0. ],
       [3.8],
       [1.9],
       [0. ],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [3],
       [1],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [2],
       [2],
       [0],
       [2],
       [1],
       [0],
       [0],
       [0],
       [1],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[59],
       [61],
       [64],
       [61],
       [68],
       [41],
       [65],
       [60],
       [67],
       [62],
       [43],
       [43],
       [56],
       [68],
       [57],
       [59],
       [55],
       [51],
       [59],
       [57],
       [56],
       [52],
       [57],
       [66],
       [57],
       [62],
       [62],
       [53],
       [45],
       [60],
       [58],
       [51]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [1],
       [4],
       [4],
       [3],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [0],
       [2],
       [0],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [3],
       [4],
       [3]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[110],
       [138],
       [110],
       [145],
       [144],
       [112],
       [155],
       [158],
       [106],
       [140],
       [122],
       [132],
       [130],
       [144],
       [130],
       [164],
       [140],
       [125],
       [140],
       [150],
       [125],
       [125],
       [154],
       [160],
       [110],
       [150],
       [130],
       [142],
       [142],
       [140],
       [150],
       [ 94]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[239],
       [166],
       [211],
       [307],
       [193],
       [268],
       [269],
       [305],
       [223],
       [268],
       [213],
       [341],
       [221],
       [193],
       [236],
       [176],
       [217],
       [245],
       [221],
       [276],
       [249],
       [212],
       [232],
       [228],
       [201],
       [244],
       [263],
       [226],
       [309],
       [185],
       [270],
       [227]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[142],
       [125],
       [144],
       [146],
       [141],
       [172],
       [148],
       [161],
       [142],
       [160],
       [165],
       [136],
       [163],
       [141],
       [174],
       [ 90],
       [111],
       [166],
       [164],
       [112],
       [144],
       [168],
       [164],
       [138],
       [126],
       [154],
       [ 97],
       [111],
       [147],
       [155],
       [111],
       [154]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.2],
       [3.6],
       [1.8],
       [1. ],
       [3.4],
       [0. ],
       [0.8],
       [0. ],
       [0.3],
       [3.6],
       [0.2],
       [3. ],
       [0. ],
       [3.4],
       [0. ],
       [1. ],
       [5.6],
       [2.4],
       [0. ],
       [0.6],
       [1.2],
       [1. ],
       [0. ],
       [2.3],
       [1.5],
       [1.4],
       [1.2],
       [0. ],
       [0. ],
       [3. ],
       [0.8],
       [0. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [3],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [3],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [0],
       [0],
       [0],
       [1],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [3],
       [0],
       [0],
       [1]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [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'normal'],
       [b'normal'],
       [b'1'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
5/7 [====================>.........] - ETA: 0s - loss: 0.5994 - accuracy: 0.6812WARNING: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],
       [57],
       [44],
       [57],
       [50],
       [44],
       [42],
       [41],
       [42],
       [64],
       [63],
       [61],
       [51],
       [66],
       [74],
       [66],
       [68],
       [48],
       [62],
       [58],
       [54],
       [62],
       [50],
       [60],
       [70],
       [42],
       [42],
       [71],
       [44],
       [55],
       [42],
       [63]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [3],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [4],
       [2],
       [2],
       [1]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[130],
       [152],
       [140],
       [130],
       [140],
       [130],
       [120],
       [110],
       [130],
       [128],
       [130],
       [130],
       [140],
       [120],
       [120],
       [146],
       [120],
       [124],
       [120],
       [170],
       [122],
       [140],
       [129],
       [125],
       [130],
       [140],
       [120],
       [110],
       [120],
       [130],
       [120],
       [145]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[254],
       [274],
       [235],
       [131],
       [233],
       [233],
       [240],
       [172],
       [180],
       [263],
       [330],
       [330],
       [308],
       [302],
       [269],
       [278],
       [211],
       [274],
       [281],
       [225],
       [286],
       [394],
       [196],
       [258],
       [322],
       [226],
       [209],
       [265],
       [169],
       [262],
       [295],
       [233]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[147],
       [ 88],
       [180],
       [115],
       [163],
       [179],
       [194],
       [158],
       [150],
       [105],
       [132],
       [169],
       [142],
       [151],
       [121],
       [152],
       [115],
       [166],
       [103],
       [146],
       [116],
       [157],
       [163],
       [141],
       [109],
       [178],
       [173],
       [130],
       [144],
       [155],
       [162],
       [150]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.4],
       [1.2],
       [0. ],
       [1.2],
       [0.6],
       [0.4],
       [0.8],
       [0. ],
       [0. ],
       [0.2],
       [1.8],
       [0. ],
       [1.5],
       [0.4],
       [0.2],
       [0. ],
       [1.5],
       [0.5],
       [1.4],
       [2.8],
       [3.2],
       [1.2],
       [0. ],
       [2.8],
       [2.4],
       [0. ],
       [0. ],
       [0. ],
       [2.8],
       [0. ],
       [0. ],
       [2.3]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [3],
       [1],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [1],
       [3]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [3],
       [0],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [2],
       [2],
       [0],
       [0],
       [1],
       [3],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'fixed']], dtype=object)>}
Consider rewriting this model with the Functional API.
WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[43]])>, '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([[110]])>, 'chol': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[211]])>, '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([[161]])>, 'exang': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'oldpeak': <tf.Tensor: shape=(1, 1), dtype=float64, numpy=array([[0.]])>, 'slope': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[1]])>, 'ca': <tf.Tensor: shape=(1, 1), dtype=int64, numpy=array([[0]])>, 'thal': <tf.Tensor: shape=(1, 1), dtype=string, numpy=array([[b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
7/7 [==============================] - ETA: 0s - loss: 0.5885 - accuracy: 0.6891WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'dict'> input: {'age': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[62],
       [56],
       [54],
       [56],
       [48],
       [58],
       [35],
       [56],
       [58],
       [44],
       [44],
       [57],
       [41],
       [54],
       [58],
       [44],
       [49],
       [68],
       [62],
       [57],
       [34],
       [46],
       [59],
       [56],
       [63],
       [64],
       [52],
       [46],
       [34],
       [61],
       [54],
       [66]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[4],
       [2],
       [3],
       [2],
       [2],
       [3],
       [4],
       [4],
       [4],
       [2],
       [3],
       [3],
       [2],
       [3],
       [2],
       [2],
       [2],
       [3],
       [4],
       [4],
       [1],
       [2],
       [4],
       [1],
       [4],
       [1],
       [4],
       [4],
       [2],
       [3],
       [3],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [120],
       [160],
       [140],
       [130],
       [140],
       [126],
       [200],
       [128],
       [120],
       [118],
       [150],
       [130],
       [110],
       [120],
       [120],
       [134],
       [180],
       [160],
       [140],
       [118],
       [105],
       [174],
       [120],
       [140],
       [170],
       [108],
       [120],
       [118],
       [150],
       [150],
       [178]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[267],
       [236],
       [201],
       [294],
       [245],
       [211],
       [282],
       [288],
       [259],
       [220],
       [242],
       [168],
       [204],
       [214],
       [284],
       [263],
       [271],
       [274],
       [164],
       [241],
       [182],
       [204],
       [249],
       [193],
       [187],
       [227],
       [233],
       [249],
       [210],
       [243],
       [232],
       [228]])>, '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],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[ 99],
       [178],
       [163],
       [153],
       [180],
       [165],
       [156],
       [133],
       [130],
       [170],
       [149],
       [174],
       [172],
       [158],
       [160],
       [173],
       [162],
       [150],
       [145],
       [123],
       [174],
       [172],
       [143],
       [162],
       [144],
       [155],
       [147],
       [144],
       [192],
       [137],
       [165],
       [165]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[1.8],
       [0.8],
       [0. ],
       [1.3],
       [0.2],
       [0. ],
       [0. ],
       [4. ],
       [3. ],
       [0. ],
       [0.3],
       [1.6],
       [1.4],
       [1.6],
       [1.8],
       [0. ],
       [0. ],
       [1.6],
       [6.2],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4. ],
       [0.6],
       [0.1],
       [0.8],
       [0.7],
       [1. ],
       [1.6],
       [1. ]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [3],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [2],
       [3],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [1],
       [2],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [3],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [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'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [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=(17, 1), dtype=int64, numpy=
array([[63],
       [50],
       [45],
       [42],
       [35],
       [52],
       [43],
       [59],
       [66],
       [41],
       [41],
       [60],
       [57],
       [40],
       [48],
       [59],
       [58]])>, 'sex': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1]])>, 'cp': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[4],
       [4],
       [3],
       [1],
       [4],
       [1],
       [4],
       [1],
       [2],
       [3],
       [2],
       [4],
       [4],
       [1],
       [3],
       [3],
       [3]])>, 'trestbps': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[150],
       [144],
       [110],
       [148],
       [138],
       [152],
       [120],
       [170],
       [160],
       [112],
       [105],
       [150],
       [110],
       [140],
       [130],
       [150],
       [132]])>, 'chol': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[407],
       [200],
       [264],
       [244],
       [183],
       [298],
       [177],
       [288],
       [246],
       [250],
       [198],
       [258],
       [335],
       [199],
       [275],
       [212],
       [224]])>, 'fbs': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0]])>, 'restecg': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [2]])>, 'thalach': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[154],
       [126],
       [132],
       [178],
       [182],
       [178],
       [120],
       [159],
       [120],
       [179],
       [168],
       [157],
       [143],
       [178],
       [139],
       [157],
       [173]])>, 'exang': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(17, 1), dtype=float64, numpy=
array([[4. ],
       [0.9],
       [1.2],
       [0.8],
       [1.4],
       [1.2],
       [2.5],
       [0.2],
       [0. ],
       [0. ],
       [0. ],
       [2.6],
       [3. ],
       [1.4],
       [0.2],
       [1.6],
       [3.2]])>, 'slope': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1]])>, 'ca': <tf.Tensor: shape=(17, 1), dtype=int64, numpy=
array([[3],
       [0],
       [0],
       [2],
       [0],
       [0],
       [0],
       [0],
       [3],
       [0],
       [1],
       [2],
       [1],
       [0],
       [0],
       [0],
       [2]])>, 'thal': <tf.Tensor: shape=(17, 1), dtype=string, numpy=
array([[b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [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.5885 - accuracy: 0.6891 - val_loss: 0.5749 - val_accuracy: 0.7347

<tensorflow.python.keras.callbacks.History at 0x7f4af00d69e8>
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([[41],
       [46],
       [49],
       [62],
       [54],
       [52],
       [46],
       [51],
       [54],
       [52],
       [51],
       [63],
       [57],
       [61],
       [52],
       [58],
       [53],
       [58],
       [45],
       [57],
       [56],
       [58],
       [77],
       [51],
       [68],
       [69],
       [52],
       [59],
       [47],
       [35],
       [57],
       [59]])>, 'sex': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [0],
       [1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[2],
       [4],
       [3],
       [4],
       [3],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [2],
       [3],
       [4],
       [2],
       [3],
       [4],
       [3],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4],
       [3],
       [3],
       [3],
       [4],
       [3],
       [2],
       [1],
       [4]])>, 'trestbps': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[120],
       [138],
       [118],
       [138],
       [135],
       [112],
       [140],
       [130],
       [125],
       [172],
       [130],
       [140],
       [128],
       [148],
       [128],
       [105],
       [138],
       [120],
       [112],
       [132],
       [134],
       [114],
       [125],
       [140],
       [118],
       [140],
       [136],
       [140],
       [130],
       [122],
       [130],
       [135]])>, 'chol': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[157],
       [243],
       [149],
       [294],
       [304],
       [230],
       [311],
       [305],
       [273],
       [199],
       [256],
       [195],
       [229],
       [203],
       [205],
       [240],
       [234],
       [340],
       [160],
       [207],
       [409],
       [318],
       [304],
       [261],
       [277],
       [254],
       [196],
       [177],
       [253],
       [192],
       [236],
       [234]])>, 'fbs': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [0],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [1],
       [2],
       [2],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'thalach': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[182],
       [152],
       [126],
       [106],
       [170],
       [160],
       [120],
       [142],
       [152],
       [162],
       [149],
       [179],
       [150],
       [161],
       [184],
       [154],
       [160],
       [172],
       [138],
       [168],
       [150],
       [140],
       [162],
       [186],
       [151],
       [146],
       [169],
       [162],
       [179],
       [174],
       [174],
       [161]])>, 'exang': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0]])>, 'oldpeak': <tf.Tensor: shape=(32, 1), dtype=float64, numpy=
array([[0. ],
       [0. ],
       [0.8],
       [1.9],
       [0. ],
       [0. ],
       [1.8],
       [1.2],
       [0.5],
       [0.5],
       [0.5],
       [0. ],
       [0.4],
       [0. ],
       [0. ],
       [0.6],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [1.9],
       [4.4],
       [0. ],
       [0. ],
       [1. ],
       [2. ],
       [0.1],
       [0. ],
       [0. ],
       [0. ],
       [0. ],
       [0.5]])>, 'slope': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[1],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [3],
       [1],
       [1],
       [1],
       [2],
       [2],
       [1],
       [1],
       [1],
       [1],
       [2]])>, 'ca': <tf.Tensor: shape=(32, 1), dtype=int64, numpy=
array([[0],
       [0],
       [3],
       [3],
       [0],
       [1],
       [2],
       [0],
       [1],
       [0],
       [0],
       [2],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [3],
       [3],
       [0],
       [1],
       [3],
       [0],
       [1],
       [0],
       [0],
       [1],
       [0]])>, 'thal': <tf.Tensor: shape=(32, 1), dtype=string, numpy=
array([[b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'fixed'],
       [b'normal'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'2'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
1/2 [==============>...............] - ETA: 0s - loss: 0.6686 - 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=(29, 1), dtype=int64, numpy=
array([[70],
       [39],
       [55],
       [65],
       [70],
       [69],
       [55],
       [47],
       [41],
       [51],
       [44],
       [58],
       [64],
       [43],
       [48],
       [63],
       [58],
       [55],
       [64],
       [58],
       [53],
       [29],
       [57],
       [52],
       [70],
       [50],
       [42],
       [45],
       [54]])>, 'sex': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [1],
       [0],
       [1],
       [1],
       [1],
       [0],
       [0],
       [1],
       [1],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1]])>, 'cp': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[3],
       [3],
       [2],
       [4],
       [2],
       [1],
       [4],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [4],
       [2],
       [4],
       [4],
       [4],
       [3],
       [1],
       [4],
       [2],
       [4],
       [2],
       [4],
       [4],
       [4],
       [4],
       [4]])>, 'trestbps': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[160],
       [138],
       [132],
       [135],
       [156],
       [140],
       [180],
       [110],
       [135],
       [140],
       [112],
       [128],
       [140],
       [115],
       [110],
       [124],
       [146],
       [132],
       [140],
       [150],
       [130],
       [130],
       [140],
       [134],
       [145],
       [110],
       [136],
       [138],
       [124]])>, 'chol': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[269],
       [220],
       [342],
       [254],
       [245],
       [239],
       [327],
       [275],
       [203],
       [298],
       [290],
       [216],
       [313],
       [303],
       [229],
       [197],
       [218],
       [353],
       [335],
       [283],
       [264],
       [204],
       [192],
       [201],
       [174],
       [254],
       [315],
       [236],
       [266]])>, 'fbs': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0]])>, 'restecg': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[0],
       [0],
       [0],
       [2],
       [2],
       [0],
       [1],
       [2],
       [0],
       [0],
       [2],
       [2],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [2],
       [2],
       [2],
       [0],
       [0],
       [0],
       [2],
       [0],
       [2],
       [2]])>, 'thalach': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[112],
       [152],
       [166],
       [127],
       [143],
       [151],
       [117],
       [118],
       [132],
       [122],
       [153],
       [131],
       [133],
       [181],
       [168],
       [136],
       [105],
       [132],
       [158],
       [162],
       [143],
       [202],
       [148],
       [158],
       [125],
       [159],
       [125],
       [152],
       [109]])>, 'exang': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [1],
       [1],
       [1]])>, 'oldpeak': <tf.Tensor: shape=(29, 1), dtype=float64, numpy=
array([[2.9],
       [0. ],
       [1.2],
       [2.8],
       [0. ],
       [1.8],
       [3.4],
       [1. ],
       [0. ],
       [4.2],
       [0. ],
       [2.2],
       [0.2],
       [1.2],
       [1. ],
       [0. ],
       [2. ],
       [1.2],
       [0. ],
       [1. ],
       [0.4],
       [0. ],
       [0.4],
       [0.8],
       [2.6],
       [0. ],
       [1.8],
       [0.2],
       [2.2]])>, 'slope': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[2],
       [2],
       [1],
       [2],
       [1],
       [1],
       [2],
       [2],
       [2],
       [2],
       [1],
       [2],
       [1],
       [2],
       [3],
       [2],
       [2],
       [2],
       [1],
       [1],
       [2],
       [1],
       [2],
       [1],
       [3],
       [1],
       [2],
       [2],
       [2]])>, 'ca': <tf.Tensor: shape=(29, 1), dtype=int64, numpy=
array([[1],
       [0],
       [0],
       [1],
       [0],
       [2],
       [0],
       [1],
       [0],
       [3],
       [1],
       [3],
       [0],
       [0],
       [0],
       [0],
       [1],
       [1],
       [0],
       [0],
       [0],
       [0],
       [0],
       [1],
       [0],
       [0],
       [0],
       [0],
       [1]])>, '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'normal'],
       [b'fixed'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'reversible'],
       [b'reversible'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible'],
       [b'normal'],
       [b'fixed'],
       [b'normal'],
       [b'reversible']], dtype=object)>}
Consider rewriting this model with the Functional API.
2/2 [==============================] - 0s 12ms/step - loss: 0.6198 - accuracy: 0.7213
Accuracy 0.7213114500045776

关键点:通常使用更大更复杂的数据集进行深度学习,您将看到最佳结果。使用像这样的小数据集时,我们建议使用决策树或随机森林作为强有力的基准。本教程的目的不是训练一个准确的模型,而是演示处理结构化数据的机制,这样,在将来使用自己的数据集时,您有可以使用的代码作为起点。

下一步

了解有关分类结构化数据的更多信息的最佳方法是亲自尝试。我们建议寻找另一个可以使用的数据集,并使用和上面相似的代码,训练一个模型,对其分类。要提高准确率,请仔细考虑模型中包含哪些特征,以及如何表示这些特征。