Close Menu
    Trending
    • Revisiting Benchmarking of Tabular Reinforcement Learning Methods
    • Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025
    • Qantas data breach to impact 6 million airline customers
    • He Went From $471K in Debt to Teaching Others How to Succeed
    • An Introduction to Remote Model Context Protocol Servers
    • Blazing-Fast ML Model Serving with FastAPI + Redis (Boost 10x Speed!) | by Sarayavalasaravikiran | AI Simplified in Plain English | Jul, 2025
    • AI Knowledge Bases vs. Traditional Support: Who Wins in 2025?
    • Why Your Finance Team Needs an AI Strategy, Now
    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

    Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025

    July 2, 2025
    Machine Learning

    Blazing-Fast ML Model Serving with FastAPI + Redis (Boost 10x Speed!) | by Sarayavalasaravikiran | AI Simplified in Plain English | Jul, 2025

    July 2, 2025
    Machine Learning

    From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025

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

    Top Posts

    Revisiting Benchmarking of Tabular Reinforcement Learning Methods

    July 2, 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

    We Need a Fourth Law of Robotics in the Age of AI

    May 7, 2025

    Why Open Source is No Longer Optional — And How to Make it Work for Your Business

    June 19, 2025

    In Memoriam for IEEE Members Who Passed Away in 2024

    February 2, 2025
    Our Picks

    Revisiting Benchmarking of Tabular Reinforcement Learning Methods

    July 2, 2025

    Is Your AI Whispering Secrets? How Scientists Are Teaching Chatbots to Forget Dangerous Tricks | by Andreas Maier | Jul, 2025

    July 2, 2025

    Qantas data breach to impact 6 million airline customers

    July 2, 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.