السلام عليكم
ده الكود
import pandas as pd
import sqlite3
from sklearn.model_selection import train_test_split
import tensorflow as tf
import keras
connect = sqlite3.connect("Data-Heart-Disease/heart.db")
heart = pd.read_sql("SELECT * FROM heart" , connect)
x = heart.drop(['target'] , axis=1)
y = heart['target']
x_traing , x_test , y_traing , y_test = train_test_split(x , y ,test_size=0.25,random_state=44,shuffle=True)
kearsmodle = keras.models.Sequential([
keras.layers.Dense(8, activation='tanh'),
keras.layers.Dense(128,activation='tanh'),
keras.layers.Dense(64,activation='tanh'),
keras.layers.Dense(1,activation='sigmoid'),
])
myoptimizer = tf.keras.optimizers.experimental.AdanW(
learning_rate=0.001,
weight_decay=0.004,
beta_1=0.9,
beta_2=0.999,
epsilon=1e-07,
amsgrad=False,
clipnorm=None,
clipvalue=None,
global_clipnorm=None,
use_ema=False,
ema_momentum=0.99,
ema_overwirte_frequency=None,
jil_complite=True,
name="AdamW",
)
kearsmodle.compile(optimizer=myoptimizer,loss='binary_crossentropy',metrics=['accuracy'])
#Trinag
trinag_modle = kearsmodle.fit(x_traing,y_traing,
validation_data=(x_test,y_test),
epochs=100,
batch_size=1000,
verbose=1,
callbacks=tf.kears.callbacks.EarlyStopping(
patience=10,
monitor='val_accuracy',
restore_best_weights=True,
))
print(trinag_modle)
انا لم بشغل الكود ده بيظهر الاخطاء ده
from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader
SystemError: initialization of _pywrap_checkpoint_reader raised unreported exception
انا مش فهم اي الخطاء ده