Skip to content

import tensorflow as tf from tensorflow.keras import layers, models import matplotlib.pyplot as plt # تحميل بيانات جاهزة (بدل kaggle حتى ما نتعب) (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data() # تجهيز البيانات train_images = train_images / 255.0 test_images = test_images / 255.0 # بناء موديل بسيط model = models.Sequential([ layers.Flatten(input_shape=(28, 28)), layers.Dense(128, activation='relu'), layers.Dense(10) ]) model.compile( optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=['accuracy'] ) # تدريب model.fit(train_images, train_labels, epochs=3) # اختبار test_loss, test_acc = model.evaluate(test_images, test_labels) print("Accuracy:", test_acc) #11

Description

@sharwkhanhsn470-maker
No description provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions