Close Menu
    Trending
    • STOP Building Useless ML Projects – What Actually Works
    • Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025
    • The New Career Crisis: AI Is Breaking the Entry-Level Path for Gen Z
    • Musk’s X appoints ‘king of virality’ in bid to boost growth
    • Why Entrepreneurs Should Stop Obsessing Over Growth
    • Implementing IBCS rules in Power BI
    • What comes next for AI copyright lawsuits?
    • Why PDF Extraction Still Feels LikeHack
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»Neural network low accuracy | by Ted James | Apr, 2025
    Machine Learning

    Neural network low accuracy | by Ted James | Apr, 2025

    Team_AIBS NewsBy Team_AIBS NewsApril 12, 2025No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    The mannequin is getting actually low accuracy. That is my first time writing a neural community so I dont actually know methods to make it higher

    import tensorflow as tf
    import matplotlib.pyplot as plt

    #knowledge set
    knowledge = tf.keras.datasets.cifar10

    (x_train, y_train), (x_test, y_test) = knowledge.load_data()
    plt.imshow(x_train[0], cmap=plt.cm.binary)

    #normalize knowledge
    x_train = tf.keras.utils.normalize(x_train, axis=1)
    x_test = tf.keras.utils.normalize(x_test, axis=1)

    #constructing AI mannequin

    mannequin = tf.keras.fashions.Sequential()
    mannequin.add(tf.keras.layers.Flatten())
    mannequin.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))
    mannequin.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))
    mannequin.add(tf.keras.layers.Dense(10, activation=tf.nn.softmax))

    #compile mannequin
    mannequin.compile(optimizer='adam',
    loss='sparse_categorical_crossentropy',
    metrics=['accuracy'])

    plt.present()
    #practice AI mannequin
    mannequin.match(x_train, y_train, epochs=3)

    I ran your mannequin and obtained 50% accuracy by growing the variety of epochs to about 30.

    • When coaching a mannequin, make certain to let it run till your loss operate plateaus.

    Coin-toss accuracy is 10%, so your mannequin is a lot better than likelihood.

    • At all times make certain to grasp what could be “good” or “dangerous” accuracy in your dataset.

    To enhance the mannequin structure, including convolutional layers will assist loads. Convolutional Neural Networks are the state-of-the-art for picture classificayion and you need to learn up on them if you wish to perceive pc imaginative and prescient.

    mannequin = tf.keras.fashions.Sequential()
    # the subsequent two strains add convolution layers to your code above
    mannequin.add(tf.keras.layers.Conv2D(6, 3, strides=(1, 1), padding="legitimate"))
    mannequin.add(tf.keras.layers.Conv2D(10, 5))
    mannequin.add(tf.keras.layers.Flatten())

    Operating this for 12 epochs will get to 78% accuracy on my native machine and it has not completed studying.

    • Use convolutional NNs when dealing with photos.

    Answered By — philosofool

    Reply Checked By — Candace Johnson (FixIt Volunteer)

    This Reply collected from stackoverflow, is licensed beneath cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleChatGPT action dolls: What are the concerns?
    Next Article Sesame  Speech Model:  How This Viral AI Model Generates Human-Like Speech
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025

    July 1, 2025
    Machine Learning

    Why PDF Extraction Still Feels LikeHack

    July 1, 2025
    Machine Learning

    🚗 Predicting Car Purchase Amounts with Neural Networks in Keras (with Code & Dataset) | by Smruti Ranjan Nayak | Jul, 2025

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    ChatGPT ile Temel Bileşenler Analizi: Basit Bir Uygulama | by Mehmet Songur | Mar, 2025

    March 16, 2025

    She Quit Her Job. Now She Makes $1 Million Selling Smoothies.

    June 9, 2025

    IEEE’s role in combatting climate change at COP29

    March 14, 2025
    Our Picks

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025

    Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025

    July 1, 2025

    The New Career Crisis: AI Is Breaking the Entry-Level Path for Gen Z

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.