Close Menu
IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
  • Home
  • News
  • Blog
  • Selfhosting
  • AI
  • Linux
  • Cyber Security
  • Gadgets
  • Gaming

Subscribe to Updates

Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

    What's Hot

    OpenAI adds GPT-4.1 to ChatGPT amid complaints over confusing model lineup

    May 20, 2025

    Texas is pushing a bill to block under-18s from joining social media platforms

    May 20, 2025

    Improving Cash Flow with AI-Driven Financial Forecasting

    May 20, 2025
    Facebook X (Twitter) Instagram
    Facebook Mastodon Bluesky Reddit
    IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
    • Home
    • News
    • Blog
    • Selfhosting
    • AI
    • Linux
    • Cyber Security
    • Gadgets
    • Gaming
    IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
    Home»Artificial Intelligence»Introducing Keras 3 for R
    Artificial Intelligence

    Introducing Keras 3 for R

    AndyBy AndyApril 23, 2025No Comments9 Mins Read
    Introducing Keras 3 for R



    Introducing Keras 3 for R

    We’re thrilled to introduce keras3, the subsequent model of the Keras R
    bundle. keras3 is a ground-up rebuild of {keras}, sustaining the
    beloved options of the unique whereas refining and simplifying the API
    primarily based on precious insights gathered over the previous few years.

    Keras gives a whole toolkit for constructing deep studying fashions in
    R—it’s by no means been simpler to construct, prepare, consider, and deploy deep
    studying fashions.

    Set up

    To put in Keras 3:

    set up.packages("keras3")
    library(keras3)
    install_keras()

    What’s new:

    Documentation

    Nice documentation is important, and we’ve labored exhausting to ensure
    that keras3 has glorious documentation, each now, and sooner or later.

    Keras 3 comes with a full refresh of the web site:
    https://keras.posit.co. There, you’ll discover guides, tutorials,
    reference pages with rendered examples, and a brand new examples gallery. All
    the reference pages and guides are additionally out there by way of R’s built-in assist
    system.

    In a fast-paced ecosystem like deep studying, creating nice
    documentation and wrappers as soon as isn’t sufficient. There additionally have to be
    workflows that make sure the documentation is up-to-date with upstream
    dependencies. To perform this, {keras3} consists of two new maintainer
    options that make sure the R documentation and performance wrappers will keep
    up-to-date:

    • We now take snapshots of the upstream documentation and API floor.
      With every launch, all R documentation is rebased on upstream
      updates. This workflow ensures that each one R documentation (guides,
      examples, vignettes, and reference pages) and R operate signatures
      keep up-to-date with upstream. This snapshot-and-rebase
      performance is carried out in a brand new standalone R bundle,
      {doctether}, which can
      be helpful for R bundle maintainers needing to maintain documentation in
      parity with dependencies.

    • All examples and vignettes can now be evaluated and rendered throughout
      a bundle construct. This ensures that no stale or damaged instance code
      makes it right into a launch. It additionally means all person going through instance code
      now moreover serves as an prolonged suite of snapshot unit and
      integration assessments.

      Evaluating code in vignettes and examples continues to be not permitted
      in keeping with CRAN restrictions. We work across the CRAN restriction
      by including extra bundle construct steps that pre-render
      examples
      and
      vignettes.

    Mixed, these two options will make it considerably simpler for Keras
    in R to keep up function parity and up-to-date documentation with the
    Python API to Keras.

    Multi-backend help

    Quickly after its launch in 2015, Keras featured help for hottest
    deep studying frameworks: TensorFlow, Theano, MXNet, and CNTK. Over
    time, the panorama shifted; Theano, MXNet, and CNTK had been retired, and
    TensorFlow surged in recognition. In 2021, three years in the past, TensorFlow
    turned the premier and solely supported Keras backend. Now, the panorama
    has shifted once more.

    Keras 3 brings the return of multi-backend help. Select a backend by
    calling:

    use_backend("jax") # or "tensorflow", "torch", "numpy"

    The default backend continues to be TensorFlow, which is the only option
    for many customers right this moment; for small-to-medium sized fashions that is nonetheless the
    quickest backend. Nevertheless, every backend has totally different strengths, and
    with the ability to swap simply will allow you to adapt to modifications as your
    undertaking, or the frameworks themselves, evolve.

    Right this moment, switching to the Jax backend can, for some mannequin varieties, carry
    substantial velocity enhancements. Jax can also be the one backend that has
    help for a brand new mannequin parallelism distributed coaching API. Switching
    to Torch could be useful throughout improvement, usually producing easier
    trackbacks whereas debugging.

    Keras 3 additionally permits you to incorporate any pre-existing Torch, Jax, or Flax
    module as a typical Keras layer by utilizing the suitable wrapper,
    letting you construct atop current tasks with Keras. For instance, prepare
    a Torch mannequin utilizing the Keras high-level coaching API (compile() +
    match()), or embrace a Flax module as a element of a bigger Keras
    mannequin. The brand new multi-backend help permits you to use Keras à la carte.

    The ‘Ops’ household

    {keras3} introduces a brand new “Operations” household of operate. The Ops
    household, at present with over
    200
    features
    ,
    gives a complete suite of operations sometimes wanted when
    working on nd-arrays for deep studying. The Operation household
    supersedes and enormously expands on the previous household of backend features
    prefixed with k_ within the {keras} bundle.

    The Ops features allow you to write backend-agnostic code. They supply a
    uniform API, no matter for those who’re working with TensorFlow Tensors,
    Jax Arrays, Torch Tensors, Keras Symbolic Tensors, NumPy arrays, or R
    arrays.

    The Ops features:

    • all begin with prefix op_ (e.g., op_stack())
    • all are pure features (they produce no side-effects)
    • all use constant 1-based indexing, and coerce doubles to integers
      as wanted
    • all are secure to make use of with any backend (tensorflow, jax, torch, numpy)
    • all are secure to make use of in each keen and graph/jit/tracing modes

    The Ops API consists of:

    • Everything of the NumPy API (numpy.*)
    • The TensorFlow NN API (tf.nn.*)
    • Widespread linear algebra features (A subset of scipy.linalg.*)
    • A subfamily of picture transformers
    • A complete set of loss features
    • And extra!

    Ingest tabular knowledge with layer_feature_space()

    keras3 gives a brand new set of features for constructing fashions that ingest
    tabular knowledge: layer_feature_space() and a household of function
    transformer features (prefix, feature_) for constructing keras fashions
    that may work with tabular knowledge, both as inputs to a keras mannequin, or
    as preprocessing steps in a knowledge loading pipeline (e.g., a
    tfdatasets::dataset_map()).

    See the reference
    web page
    and an
    instance utilization in a full end-to-end
    instance

    to be taught extra.

    New Subclassing API

    The subclassing API has been refined and prolonged to extra Keras
    varieties
    .
    Outline subclasses just by calling: Layer(), Loss(), Metric(),
    Callback(), Constraint(), Mannequin(), and LearningRateSchedule().
    Defining {R6} proxy courses is now not vital.

    Moreover the documentation web page for every of the subclassing
    features now incorporates a complete itemizing of all of the out there
    attributes and strategies for that sort. Take a look at
    ?Layer to see what’s
    doable.

    Saving and Export

    Keras 3 brings a brand new mannequin serialization and export API. It’s now a lot
    easier to avoid wasting and restore fashions, and likewise, to export them for
    serving.

    • save_model()/load_model():
      A brand new high-level file format (extension: .keras) for saving and
      restoring a full mannequin.

      The file format is backend-agnostic. This implies that you would be able to convert
      educated fashions between backends, just by saving with one backend,
      after which loading with one other. For instance, prepare a mannequin utilizing Jax,
      after which convert to Tensorflow for export.

    • export_savedmodel():
      Export simply the ahead cross of a mannequin as a compiled artifact for
      inference with TF
      Serving
      or (quickly)
      Posit Join. This
      is the simplest option to deploy a Keras mannequin for environment friendly and
      concurrent inference serving, all with none R or Python runtime
      dependency.

    • Decrease degree entry factors:

      • save_model_weights() / load_model_weights():
        save simply the weights as .h5 information.
      • save_model_config() / load_model_config():
        save simply the mannequin structure as a json file.
    • register_keras_serializable():
      Register customized objects to allow them to be serialized and
      deserialized.

    • serialize_keras_object() / deserialize_keras_object():
      Convert any Keras object to an R record of straightforward varieties that’s secure
      to transform to JSON or rds.

    • See the brand new Serialization and Saving
      vignette

      for extra particulars and examples.

    New random household

    A brand new household of random tensor
    turbines
    .
    Just like the Ops household, these work with all backends. Moreover, all of the
    RNG-using strategies have help for stateless utilization if you cross in a
    seed generator. This allows tracing and compilation by frameworks that
    have particular help for stateless, pure, features, like Jax. See
    ?random_seed_generator()
    for instance utilization.

    Different additions:

    • New form()
      operate, one-stop utility for working with tensor shapes in all
      contexts.

    • New and improved print(mannequin) and plot(mannequin) technique. See some
      examples of output within the Purposeful API
      information

    • All new match() progress bar and stay metrics viewer output,
      together with new dark-mode help within the RStudio IDE.

    • New config
      household
      ,
      a curated set of features for getting and setting Keras world
      configurations.

    • The entire different operate households have expanded with new members:

    Migrating from {keras} to {keras3}

    {keras3} supersedes the {keras} bundle.

    In case you’re writing new code right this moment, you can begin utilizing {keras3} proper
    away.

    In case you have legacy code that makes use of {keras}, you’re inspired to
    replace the code for {keras3}. For a lot of high-level API features, such
    as layer_dense(), match(), and keras_model(), minimal to no modifications
    are required. Nevertheless there’s a lengthy tail of small modifications that you simply
    would possibly must make when updating code that made use of the lower-level
    Keras API. A few of these are documented right here:
    https://keras.io/guides/migrating_to_keras_3/.

    In case you’re operating into points or have questions on updating, don’t
    hesitate to ask on or
    https://github.com/rstudio/keras/discussions.

    The {keras} and {keras3} packages will coexist whereas the group
    transitions. Through the transition, {keras} will proceed to obtain
    patch updates for compatibility with Keras v2, which continues to be
    printed to PyPi beneath the bundle title tf-keras. After tf-keras is
    now not maintained, the {keras} bundle might be archived.

    Abstract

    In abstract, {keras3} is a strong replace to the Keras R bundle,
    incorporating new options whereas preserving the convenience of use and
    performance of the unique. The brand new multi-backend help,
    complete suite of Ops features, refined mannequin serialization API,
    and up to date documentation workflows allow customers to simply take
    benefit of the most recent developments within the deep studying group.

    Whether or not you’re a seasoned Keras person or simply beginning your deep
    studying journey, Keras 3 gives the instruments and adaptability to construct,
    prepare, and deploy fashions with ease and confidence. As we transition from
    Keras 2 to Keras 3, we’re dedicated to supporting the group and
    making certain a clean migration. We invite you to discover the brand new options,
    take a look at the up to date documentation, and be part of the dialog on our
    GitHub discussions web page. Welcome to the subsequent chapter of deep studying in
    R with Keras 3!

    Get pleasure from this weblog? Get notified of recent posts by e mail:

    Posts additionally out there at r-bloggers



    Supply hyperlink

    0 Like this
    Introducing Keras
    Share. Facebook LinkedIn Email Bluesky Reddit WhatsApp Threads Copy Link Twitter
    Previous ArticleDOGE Siphoned NLRB Case Knowledge – Krebs on Safety
    Next Article StrictlyVC heads to Athens, protecting European tech and funding

    Related Posts

    Artificial Intelligence

    Improving Cash Flow with AI-Driven Financial Forecasting

    May 20, 2025
    Artificial Intelligence

    Automating Business Reports with Generative AI

    May 19, 2025
    Artificial Intelligence

    OpenAI Launches an Agentic, Web-Based Coding Tool

    May 19, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    AI Developers Look Beyond Chain-of-Thought Prompting

    May 9, 202515 Views

    6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

    April 21, 202512 Views

    Andy’s Tech

    April 19, 20259 Views
    Stay In Touch
    • Facebook
    • Mastodon
    • Bluesky
    • Reddit

    Subscribe to Updates

    Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

      About Us

      Welcome to IOupdate — your trusted source for the latest in IT news and self-hosting insights. At IOupdate, we are a dedicated team of technology enthusiasts committed to delivering timely and relevant information in the ever-evolving world of information technology. Our passion lies in exploring the realms of self-hosting, open-source solutions, and the broader IT landscape.

      Most Popular

      AI Developers Look Beyond Chain-of-Thought Prompting

      May 9, 202515 Views

      6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

      April 21, 202512 Views

      Subscribe to Updates

        Facebook Mastodon Bluesky Reddit
        • About Us
        • Contact Us
        • Disclaimer
        • Privacy Policy
        • Terms and Conditions
        © 2025 ioupdate. All Right Reserved.

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