Close Menu
    Facebook LinkedIn YouTube WhatsApp X (Twitter) Pinterest
    Trending
    • London’s DEScycle secures over €10 million in grant funding to scale critical metals recovery platform
    • How to Edit, Merge, and Split PDFs With Free Online Tools
    • Florida crackdown targets illegal machines in Sarasota
    • Audiophile-Oriented Noble Audio Debuts More Affordable Osprey Earbuds
    • New radio bursts detected from binary stars
    • Remarkable, Catalysr and Indigenous pre-accelerators score NSW government support for diverse founders
    • Whoop Promo Codes May 2026: 20% Off | June 2026
    • Hawthorne bankruptcy dispute targets Illinois racing funds
    Facebook LinkedIn WhatsApp
    Times FeaturedTimes Featured
    Tuesday, June 2
    • Home
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    • More
      • AI
      • Robotics
      • Industries
      • Global
    Times FeaturedTimes Featured
    Home»Artificial Intelligence»Automating Deep Learning: A Gentle Introduction to AutoKeras and Keras Tuner
    Artificial Intelligence

    Automating Deep Learning: A Gentle Introduction to AutoKeras and Keras Tuner

    Editor Times FeaturedBy Editor Times FeaturedJuly 17, 2025No Comments4 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email WhatsApp Copy Link


    Deep studying has revolutionized machine studying. However designing the precise neural community — layers, neurons, activation capabilities, optimizers — can really feel like an countless experiment. Wouldn’t or not it’s good if somebody did the heavy lifting for you?

    That’s precisely what AutoML for deep studying goals to unravel.

    On this article, I’ll introduce you to 2 highly effective but approachable instruments for automating deep studying: AutoKeras and Keras Tuner. We’ll deep dive into these libraries and do some hands-on mannequin constructing.

    Why automate deep studying?

    Deep studying mannequin design and hyperparameter tuning are resource-intensive. It’s straightforward to:

    • Overfit by utilizing too many parameters.
    • Waste time testing architectures manually.
    • Miss better-performing configurations.

    AutoML instruments take away a lot of the guesswork by automating structure search and tuning.

    How do these libraries work?

    AutoKeras

    AutoKeras leverages Neural Structure Search (NAS) strategies behind the scenes. It makes use of a trial-and-error strategy powered by Keras Tuner beneath the hood to check completely different configurations. As soon as a very good candidate is discovered, it trains it to convergence and evaluates.

    Keras Tuner

    Keras Tuner is targeted on hyperparameter optimization. You outline the search house (e.g., variety of layers, variety of items, studying charges), and it makes use of optimization algorithms (random search, Bayesian optimization, Hyperband) to search out the very best configuration.

    Putting in required libraries

    Putting in these libraries is sort of straightforward; we simply want to make use of pip. We will run the command under within the Jupyter pocket book to put in each libraries.

    pip set up autokeras
    pip set up keras-tuner

    AutoKeras: Finish-to-end automated deep studying

    AutoKeras is a high-level library constructed on high of TensorFlow and Keras. It automates:

    • Neural structure search (NAS)
    • Hyperparameter tuning
    • Mannequin coaching

    With just some traces of code, you possibly can prepare deep studying fashions for photos, textual content, tabular, and time-series information.

    Creating the mannequin

    For this text, we’ll work on picture classification. We’ll load the MNIST dataset utilizing Tensorflow Datasets. This dataset is freely accessible on Tensorflow, you possibly can test it out here, after which we’ll use the ImageClassifier of Autokeras.

    import autokeras as ak
    from tensorflow.keras.datasets import mnist
    
    (x_train, y_train), (x_test, y_test) = mnist.load_data()
    
    clf = ak.ImageClassifier(max_trials=3)  # Attempt 3 completely different fashions
    clf.match(x_train, y_train, epochs=10)
    
    accuracy = clf.consider(x_test, y_test)
    print("Check accuracy:", accuracy)

    We will see within the output screenshot that it took 42 minutes for trial 2, and it’ll proceed until 3 trials after which present us the very best mannequin with parameters.

    Keras Tuner: Versatile hyperparameter optimization

    Keras Tuner, developed by the TensorFlow workforce, is a hyperparameter optimization library. In contrast to AutoKeras, it doesn’t design architectures from scratch — as an alternative, it tunes the hyperparameters of the structure you outline.

    Creating the mannequin

    In contrast to Auto Keras, right here we must create your complete mannequin. We’ll use the identical Mnist Picture Dataset and create a CNN picture classifier mannequin.

    import tensorflow as tf
    import keras_tuner as kt
    
    (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
    x_train, x_test = x_train / 255.0, x_test / 255.0
    
    def build_model(hp):
        mannequin = tf.keras.Sequential()
        mannequin.add(tf.keras.layers.Flatten())
        mannequin.add(tf.keras.layers.Dense(hp.Int('items', 32, 512, step=32), activation='relu'))
        mannequin.add(tf.keras.layers.Dense(10, activation='softmax'))
        mannequin.compile(optimizer='adam',
                      loss='sparse_categorical_crossentropy',
                      metrics=['accuracy'])
        return mannequin
    
    tuner = kt.Hyperband(build_model, goal='val_accuracy', max_epochs=10)
    tuner.search(x_train, y_train, epochs=10, validation_split=0.2)
    Keras Tuner Output

    So, within the output, we are able to clearly see that trial 21 accomplished in 22 seconds with a validation accuracy of ~97.29% and the mannequin additionally retains the very best accuracy which is ~97.93%.

    To search out out the very best mannequin, we are able to run the instructions given under.

    fashions = tuner.get_best_models(num_models=2)
    best_model = fashions[0]
    best_model.abstract()
    Best Model

    We will additionally discover out the High 10 trials that Keras Tuner carried out utilizing the command under.

    tuner.results_summary()
    Best Trials

    Actual life use-case

    A superb instance of how we are able to use each these libraries is A telecom firm that desires to foretell buyer churn utilizing structured buyer information. Their information science workforce makes use of AutoKeras to rapidly prepare a mannequin on tabular options with out writing advanced structure code. Later, they use Keras Tuner to fine-tune a customized neural community that features area data options. This hybrid strategy saves weeks of experimentation and improves mannequin efficiency.

    Conclusion

    Each AutoKeras and Keras Tuner make deep studying extra accessible and environment friendly.

    Use AutoKeras while you desire a fast, end-to-end mannequin with out worrying about structure. Use Keras Tuner when you have already got a good suggestion of your structure however need to squeeze out the very best efficiency by hyperparameter tuning.

    Automating elements of deep studying frees you as much as deal with understanding your information and decoding outcomes, which is the place the true worth lies.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Editor Times Featured
    • Website

    Related Posts

    Escaping the Valley of Choice in BI

    June 2, 2026

    Ensuring Data Integrity with Cryptographic Hashing and the Ethereum Blockchain

    June 1, 2026

    RAG Is Not Machine Learning, and the ML Toolkit Solves the Wrong Problem

    June 1, 2026

    How to Combine Claude Code and Codex for Maximum Coding Power

    June 1, 2026

    It’s the Lessons We Learned Along the Way. Or, Is It?

    June 1, 2026

    Proxy-Pointer RAG: Eliminating Wasteful Entity & Relations Extraction in Knowledge Graphs

    May 31, 2026

    Comments are closed.

    Editors Picks

    London’s DEScycle secures over €10 million in grant funding to scale critical metals recovery platform

    June 2, 2026

    How to Edit, Merge, and Split PDFs With Free Online Tools

    June 2, 2026

    Florida crackdown targets illegal machines in Sarasota

    June 2, 2026

    Audiophile-Oriented Noble Audio Debuts More Affordable Osprey Earbuds

    June 2, 2026
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    About Us
    About Us

    Welcome to Times Featured, an AI-driven entrepreneurship growth engine that is transforming the future of work, bridging the digital divide and encouraging younger community inclusion in the 4th Industrial Revolution, and nurturing new market leaders.

    Empowering the growth of profiles, leaders, entrepreneurs businesses, and startups on international landscape.

    Asia-Middle East-Europe-North America-Australia-Africa

    Facebook LinkedIn WhatsApp
    Featured Picks

    Robots-Blog | Open Source Humanoid Robot pib Released in New Version

    November 18, 2025

    Robots-Blog | Kunst oder KI: Wer ist der Künstler?

    November 18, 2025

    AI could boost UK economy by 10% in 5 years, says Microsoft boss

    September 17, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    Copyright © 2024 Timesfeatured.com IP Limited. All Rights.
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us

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