如题 小弟在跑下面程式的时候 精准度都一直是0
不知道是哪里出了问题 还请各位神人指点
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras import metrics
df = pd.read_csv("./diabetes.csv")
np.random.seed(10)
dataset = df.values
np.random.shuffle(dataset)
X = dataset[:, 0:8]
Y = dataset[:, 8]
model = Sequential()
model.add(Dense(10,input_shape=(8, ),activation="relu"))
model.add(Dense(8,activation="relu"))
model.add(Dense(1,activation="sigmoid"))
model.compile(loss="binary_crossentropy",optimizer="sgd",metrics=['binary_accuracy'])
model.fit(X,Y,epochs=100,batch_size=10)
loss, acc = model.evaluate(X,Y)
print("Accuracy is {:.2f}".format(acc))