1<!DOCTYPE html> 2<html lang="en"> 3 <head> 4 <meta charset="utf-8" /> 5 <meta 6 name="viewport" 7 content="width=device-width, initial-scale=1, shrink-to-fit=yes" 8 /> 9 <meta name="description" content="Keras documentation" /> 10 <meta name="author" content="Keras Team" /> 11 12 <title>Keras: Deep Learning for humans</title> 13 <link rel="icon" type="image/png" href="./img/k-keras-social.png" /> 14 15 <link rel="preconnect" href="https://fonts.googleapis.com" /> 16 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> 17 18 <!-- Fonts --> 19 <link 20 href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&display=swap" 21 rel="stylesheet" 22 /> 23 <link 24 href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap" 25 rel="stylesheet" 26 /> 27 28 <!-- Prism CSS import --> 29 <link 30 rel="stylesheet" 31 href="css/prism.min.css" 32 /> 33 34 <!-- GLIDE CSS import --> 35 <link 36 rel="stylesheet" 37 href="css/glide.core.min.css" 38 /> 39 40 <!-- Custom styles for this template --> 41 <link href="css/landing.css?v=3" rel="stylesheet"> 42 43 <!-- Google Tag Manager --> 44
44<script> 45 (function (w, d, s, l, i) { 46 w[l] = w[l] || []; 47 w[l].push({ 48 "gtm.start": new Date().getTime(), 49 event: "gtm.js", 50 }); 51 var f = d.getElementsByTagName(s)[0], 52 j = d.createElement(s), 53 dl = l != "dataLayer" ? "&l=" + l : ""; 54 j.async = true; 55 j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl; 56 f.parentNode.insertBefore(j, f); 57 })(window, document, "script", "dataLayer", "GTM-5DNGF4N"); 58 </script>
58 59
59<script> 60 (function (i, s, o, g, r, a, m) { 61 i["GoogleAnalyticsObject"] = r; 62 (i[r] = 63 i[r] || 64 function () { 65 (i[r].q = i[r].q || []).push(arguments); 66 }), 67 (i[r].l = 1 * new Date()); 68 (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); 69 a.async = 1; 70 a.src = g; 71 m.parentNode.insertBefore(a, m); 72 })( 73 window, 74 document, 75 "script", 76 "https://www.google-analytics.com/analytics.js", 77 "ga" 78 ); 79 ga("create", "UA-175165319-128", "auto"); 80 ga("send", "pageview"); 81 </script>
81 82 <!-- End Google Tag Manager --> 83 </head> 84 85 <body> 86 87 <!-- Google Tag Manager (noscript) -->
vendor: 87 bytes, lines 87-90
87 88 <noscript 89 ><iframe 90 src="https://www.googletagmanager.com/ns.html?id=
90GTM-5DNGF4N
vendor: 126 bytes, lines 90-96
90" 91 height="0" 92 width="0" 93 style="display: none; visibility: hidden" 94 ></iframe 95 ></noscript> 96
96<!-- End Google Tag Manager (noscript) --> 97 98 <nav class="nav__container"> 99 <div class="nav__wrapper"> 100 <div class="nav__controls--mobile"> 101 <button class="nav__menu--button"><i class="icon--menu"></i></button> 102 <button class="nav__menu--close"><i class="icon--close"></i></button> 103 <a href="/"> 104 <img class="nav__logo nav__logo--mobile" src="./img/k-logo.png" alt="keras.io logo" /> 105 </a> 106 <button class="nav__search--mobile"> 107 <i class="icon__search--mobile"></i> 108 </button> 109 </div> 110 <form class="nav__search nav__search-form--mobile"> 111 <input 112 class="nav__search--input" 113 type="search" 114 placeholder="SEARCH" 115 aria-label="Search" 116 /> 117 <button class="nav__search--button" type="submit"> 118 <i class="icon--search"></i> 119 </button> 120 </form> 121 <div class="k-nav nav__mobile-menu" id="nav-menu"> 122 <div class="nav flex-column nav-pills" role="tablist" aria-orientation="vertical"> 123 <a class="nav-link" href="/about/" role="tab" aria-selected="">About Keras</a> 124 <a class="nav-link" href="/getting_started/" role="tab" aria-selected="">Getting started</a> 125 <a class="nav-link" href="/guides/" role="tab" aria-selected="">Developer guides</a> 126 <a class="nav-link" href="/examples/" role="tab" aria-selected="">Code examples</a> 127 <a class="nav-link" href="/api/" role="tab" aria-selected="">Keras 3 API documentation</a> 128 <a class="nav-link" href="/2.18/api/" role="tab" aria-selected="">Keras 2 API documentation</a> 129 <a class="nav-link" href="/keras_hub/" role="tab" aria-selected="">KerasHub: Pretrained Models</a> 130 <a class="nav-link" href="/keras_rs/" role="tab" aria-selected="">Keras RS</a> 131 <a class="nav-link" href="/keras_tuner/" role="tab" aria-selected="">KerasTuner: Hyperparam Tuning</a> 132 </div> 133 </div> 134 <a href="/"> 135 <img class="nav__logo nav__logo--desktop" src="./img/logo.png" alt="keras.io logo"/> 136 </a> 137 <div class="nav__menu"> 138 <ul class="nav__item--container"> 139 <li class="nav__item"> 140 <a class="nav__link" href="/getting_started/">GET STARTED</a> 141 </li> 142 <li class="nav__item"> 143 <a class="nav__link" href="/guides/">GUIDES</a> 144 </li> 145 <li class="nav__item"> 146 <a class="nav__link" href="/api/">API</a> 147 </li> 148 <li class="nav__item"> 149 <a class="nav__link" href="/examples/">EXAMPLES</a> 150 </li> 151 <li class="nav__item"><a class="nav__link" href="/keras_hub/">KERAS HUB</a></li> 152 <li class="nav__item"><a class="nav__link" href="/keras_rs/">KERAS RS</a></li> 153 <li class="nav__item"><a class="nav__link" href="/keras_tuner/">KERAS TUNER</a></li> 154 </ul> 155 156 <form class="nav__search"> 157 <input 158 class="nav__search--input" 159 type="search" 160 placeholder="SEARCH" 161 aria-label="Search" 162 /> 163 <button class="nav__search--button" type="submit"> 164 <i class="icon--search"></i> 165 </button> 166 </form> 167 </div> 168 </div> 169 </nav> 170 171 <div class="page__container"> 172 <div class="hero"> 173 <div class="hero__content--wrapper"> 174 <div class="hero__content"> 175 <a class="button__round" href="/keras_3/">KERAS 3.0 RELEASED</a> 176 <h1 class="hero__title text--white">A superpower for ML developers</h1> 177 178 <p class="hero__description text--white"> 179 Keras is a deep learning API designed for human beings, not 180 machines. Keras focuses on debugging speed, code elegance & 181 conciseness, maintainability, and deployability. When you choose 182 Keras, your codebase is smaller, more readable, easier to iterate 183 on. 184 </p> 185 186 <div class="hero__buttons"> 187 <a class="button__square button__square--white" href="/api/">API DOCS</a> 188 <a class="button__square button__square--white" href="/guides/">GUIDES</a> 189 <a class="button__square button__square--white" href="/examples/">EXAMPLES</a> 190 </div> 191 </div> 192 <img class="hero__image" src="./img/k-graphic.png" alt="K graphic"/> 193 </div> 194 </div> 195 196 <div class="stack--container"> 197 <div class="explore stacked__item"> 198 <div class="explore__wrapper"> 199 <div class="explore__column"> 200 <div class="code__container"> 201 <button class="code__copy--button"> 202 <i class="icon--copy"></i> 203 <div class="code__copy--tooltip">Copied</div> 204 </button> 205 <pre><code class="language-python">inputs = keras.Input(shape=(32, 32, 3)) 206x = layers.Conv2D(32, 3, activation="relu")(inputs) 207x = layers.Conv2D(64, 3, activation="relu")(x) 208residual = x = layers.MaxPooling2D(3)(x) 209 210x = layers.Conv2D(64, 3, padding="same")(x) 211x = layers.Activation("relu")(x) 212x = layers.Conv2D(64, 3, padding="same")(x) 213x = layers.Activation("relu")(x) 214x = x + residual 215 216x = layers.Conv2D(64, 3, activation="relu")(x) 217x = layers.GlobalAveragePooling2D()(x) 218outputs = layers.Dense(10, activation="softmax")(x) 219 220model = keras.Model(inputs, outputs, name="mini_resnet") 221keras.utils.plot_model(model, "mini_resnet.png") 222model.fit(dataset, epochs=10)</code></pre> 223 <div class="code__container--quickstart"> 224 <a class="button__square--colab" href="https://colab.research.google.com/github/mattdangerw/keras-io/blob/new-landing-and-theme/quickstarts/keras_quickstart.ipynb" 225 target="_blank">Run quickstart <i class="icon--colab"></i 226 ></a> 227 </div> 228 </div> 229 230 <div class="code__container"> 231 <button class="code__copy--button"> 232 <i class="icon--copy"></i> 233 <div class="code__copy--tooltip">Copied</div> 234 </button> 235 <pre><code class="language-python">causal_lm = keras_hub.models.CausalLM.from_preset( 236 "gemma2_instruct_2b_en", 237 dtype="float16", 238) 239prompt = """<start_of_turn>user 240Write python code to print the first 100 primes. 241<end_of_turn> 242<start_of_turn>model 243""" 244text_output = causal_lm.generate(prompt, max_length=512) 245 246text_to_image = keras_hub.models.TextToImage.from_preset( 247 "stable_diffusion_3_medium", 248 dtype="float16", 249) 250prompt = "Astronaut in a jungle, detailed" 251image_output = text_to_image.generate(prompt)</code></pre> 252 <div class="code__container--quickstart"> 253 <a class="button__square--colab" href="https://colab.research.google.com/github/mattdangerw/keras-io/blob/new-landing-and-theme/quickstarts/keras_hub_quickstart.ipynb" 254 target="_blank">Run quickstart <i class="icon--colab"></i 255 ></a> 256 </div> 257 </div> 258 </div> 259 260 <div class="explore__content"> 261 <div class="explore__image--container"> 262 <img src="./img/logo-row.png" alt="Backend logos"/> 263 </div> 264 <h2 class="text--red"> 265 Welcome to multi-framework machine learning 266 </h2> 267 <p class="explore__description"> 268 With its multi-backend approach, Keras gives you the freedom to 269 work with JAX, TensorFlow, and PyTorch. Build models that can move 270 seamlessly across these frameworks and leverage the strengths of 271 each ecosystem. 272 </p> 273 <a 274 class="button__square button__square--white button__square--shadow" 275 href="/getting_started/" 276 > 277 GET STARTED 278 </a> 279 </div> 280 </div> 281 </div> 282 283 <div class="guide stacked__item"> 284 <div class="guide__container"> 285 <div class="guide__header"> 286 <h2 class="guide__title text--red">Developer Guides</h2> 287 <a 288 class="guide__button button__square button__square--transparent text--red guide__button--desktop" 289 href="/guides/" 290 >VIEW ALL 291 </a> 292 </div> 293 294 <div class="guide__code--container"> 295 <div class="guide__wrapper"> 296 <div class="code__container guide__code"> 297 <button class="code__copy--button"> 298 <i class="icon--copy"></i> 299 <div class="code__copy--tooltip">Copied</div> 300 </button> 301 <pre><code class="language-python">inputs = keras.Input(shape=(28, 28, 1))
302x = inputs 303x = layers.Conv2D(16, 3, activation="relu")(x) 304x = layers.Conv2D(32, 3, activation="relu")(x) 305x = layers.MaxPooling2D(3)(x) 306x = layers.Conv2D(32, 3, activation="relu")(x) 307x = layers.Conv2D(16, 3, activation="relu")(x) 308x = layers.GlobalMaxPooling2D()(x) 309x = layers.Dropout(0.5) 310outputs = layers.Dense(10) 311 312model = keras.Model(inputs, outputs) 313model.summary()</code></pre> 314 </div> 315 316 <div class="guide__content"> 317 <div> 318 <h3>The Functional API</h3> 319 <p> 320 Starting from the beginning and learn how to build models using the functional building pattern. 321 </p> 322 </div> 323 324 <a 325 class="guide__content--button button__square button__square--red" 326 href="/guides/functional_api/" 327 > 328 VIEW GUIDE 329 </a> 330 </div> 331 </div> 332 333 <div class="guide__wrapper"> 334 <div class="code__container guide__code"> 335 <button class="code__copy--button"> 336 <i class="icon--copy"></i> 337 <div class="code__copy--tooltip">Copied</div> 338 </button> 339 <pre><code class="language-python">model.compile( 340 optimizer="rmsprop", 341 loss="categorical_crossentropy", 342 metrics=["accuracy"], 343) 344 345history = model.fit( 346 x_train, 347 y_train, 348 batch_size=64, 349 epochs=2, 350 validation_data=(x_val, y_val), 351)</code></pre> 352 </div> 353 354 <div class="guide__content"> 355 <div> 356 <h3>Training & evaluation with the built-in methods</h3> 357 <p> 358 Train and evaluate your model using model.fit(...). 359 </p> 360 </div> 361 362 <a 363 class="guide__content--button button__square button__square--red" 364 href="/guides/training_with_built_in_methods/" 365 > 366 VIEW GUIDE 367 </a> 368 </div> 369 </div> 370 371 <div class="guide__wrapper"> 372 <div class="code__container guide__code"> 373 <button class="code__copy--button"> 374 <i class="icon--copy"></i> 375 <div class="code__copy--tooltip">Copied</div> 376 </button> 377 <pre><code class="language-python">class MLPBlock(keras.layers.Layer): 378 def __init__(self): 379 super().__init__() 380 self.dense_1 = layers.Dense(32) 381 self.dense_2 = layers.Dense(32) 382 self.dense_3 = layers.Dense(1) 383 384 def call(self, inputs): 385 x = self.dense_1(inputs) 386 x = keras.activations.relu(x) 387 x = self.dense_2(x) 388 x = keras.activations.relu(x) 389 return self.dense_3(x)</code></pre> 390 </div> 391 392 <div class="guide__content"> 393 <div> 394 <h3>Making new layers and models via subclassing</h3> 395 <p> 396 Learn how to customize your model via subclassing Keras layers. 397 </p> 398 </div> 399 400 <a 401 class="guide__content--button button__square button__square--red" 402 href="/guides/making_new_layers_and_models_via_subclassing/" 403 > 404 VIEW GUIDE 405 </a> 406 </div> 407 </div> 408 409 <a 410 class="guide__button button__square button__square--transparent text--red guide__button--mobile" 411 href="/guides/" 412 >VIEW ALL 413 </a> 414 </div> 415 </div> 416 </div> 417 </div> 418 419 <div class="models"> 420 <div class="models__wrapper"> 421 <div class="models__content--container"> 422 <h2 class="models__title text--white">KerasHub</h2> 423 424 <p class="models__description"> 425 The KerasHub library provides Keras 3 implementations of popular model architectures, paired with a collection of pretrained checkpoints available on Kaggle Models. Models can be used for both training and inference, on any of the TensorFlow, JAX, and PyTorch backends. 426 </p> 427 </div> 428 429 <div class="models__button--contanier"> 430 <div class="models__button-wrapper models__button-wrapper--desktop"> 431 <a class="button__square button__square--transparent text--white" href="/keras_hub/"> 432 SEE ALL 433 </a> 434 </div> 435 436 <div class="models__card"> 437 <div class="models__card--contanier"> 438 <h4 class="models__card--title">GEMMA</h4> 439 <p class="models__card--description"> 440 Googleâs family of lightweight language models built from the same research and technology used to create Gemini. 441 </p> 442 <a class="button__square button__square--white" href="/keras_hub/api/models/gemma/">VIEW DOCUMENTATION</a> 443 <a class="button__square button__square--white" href="https://www.kaggle.com/models/google/gemma-2" target="_blank">KAGGLE DETAILS</a> 444 </div> 445 </div> 446 447 <div class="models__card"> 448 <div class="models__card--contanier"> 449 <h4 class="models__card--title">LLAMA</h4> 450 <p class="models__card--description"> 451 Metaâs flagship open text generation models available in a wide range of sizes and precisions. 452 </p> 453 <a class="button__square button__square--white" href="/keras_hub/api/models/llama3/">VIEW DOCUMENTATION</a> 454 <a class="button__square button__square--white" href="https://www.kaggle.com/models/keras/llama3" target="_blank">KAGGLE DETAILS</a> 455 </div> 456 </div> 457 458 <div class="models__card"> 459 <div class="models__card--contanier"> 460 <h4 class="models__card--title">STABLE DIFFUSION</h4> 461 <p class="models__card--description"> 462 Generate image content with this state of the art diffusion model from Stability AI. 463 </p> 464 <a class="button__square button__square--white" href="/keras_hub/api/models/stable_diffusion_3/">VIEW DOCUMENTATION</a> 465 <a class="button__square button__square--white" href="https://www.kaggle.com/models/keras/stablediffusion-3.5" target="_blank">KAGGLE DETAILS</a> 466 </div> 467 </div> 468 469 <div class="models__card"> 470 <div class="models__card--contanier"> 471 <h4 class="models__card--title">MISTRAL</h4> 472 <p class="models__card--description"> 473 A generative language from the French company Mistral AI, making frontier models accessible to all. 474 </p> 475 <a class="button__square button__square--white" href="/keras_hub/api/models/mistral/">VIEW DOCUMENTATION</a> 476 <a class="button__square button__square--white" href="https://www.kaggle.com/models/keras/mistral" target="_blank">KAGGLE DETAILS</a> 477 </div> 478 </div> 479 480 <div class="models__button-wrapper models__button-wrapper--mobile"> 481 <a class="button__square button__square--transparent text--white" href="/keras_hub/"> 482 SEE ALL 483 </a> 484 </div> 485 </div> 486 </div> 487 </div> 488 489 <div class="guide__example"> 490 <div class="guide__example--wrapper"> 491 <div class="guide__header"> 492 <h2 class="guide__title text--red">Code examples</h2> 493 <a 494 class="guide__button button__square button__square--transparent text--red guide__button--desktop" 495 href="/examples/" 496 >VIEW ALL 497 </a> 498 </div> 499 500 <div class="guide__code--container"> 501 <div class="guide__wrapper"> 502 <img class="code__container guide__code" src="./img/vision.png" alt="eye"/> 503 504 <div class="guide__content"> 505 <div> 506 <h3>Computer vision</h3> 507 <p> 508 Take a look at our examples for doing image classification, object detection, video processing, and more. 509 </p> 510 </div> 511 512 <a 513 class="guide__content--button button__square button__square--red" 514 href="/examples/vision/" 515 > 516 SEE EXAMPLE 517 </a> 518 </div> 519 </div> 520 521 <div class="guide__wrapper"> 522 <img class="code__container guide__code" src="./img/nlp.png" alt="text" /> 523 524 <div class="guide__content"> 525 <div> 526 <h3>Natural Language Processing</h3> 527 <p> 528 We also have many guides for doing NLP including text classification, machine translation, and language modeling. 529 </p> 530 </div> 531 532 <a 533 class="guide__content--button button__square button__square--red" 534 href="/examples/nlp/" 535 > 536 SEE EXAMPLE 537 </a> 538 </div> 539 </div> 540 541 <div class="guide__wrapper"> 542 <img class="code__container guide__code" src="./img/generative.png" alt="flower" /> 543 544 <div class="guide__content"> 545 <div> 546 <h3>Generative Deep Learning</h3> 547 <p> 548 Get started with generative deep learning with our wealth of guides involving state-of-the-art diffusion models, GANs, and transformer models. 549 </p> 550 </div> 551 552 <a 553 class="guide__content--button button__square button__square--red" 554 href="/examples/generative/" 555 > 556 SEE EXAMPLE 557 </a> 558 </div> 559 </div> 560 </div> 561 <a 562 class="guide__button button__square button__square--transparent text--red guide__button--mobile" 563 href="/examples/" 564 >VIEW ALL 565 </a> 566 </div> 567 </div> 568 569 <div class="research"> 570 <div class="research__content--contanier"> 571 <h2 class="text--red">Trusted for research and production</h2> 572 <p class="research__description"> 573 Keras is used by CERN, NASA, NIH, and many more scientific 574 organizations around the world (and yes, Keras is used at the Large 575 Hadron Collider). Keras is used by Waymo to power self-driving 576 vehicles. Keras partners with Kaggle and HuggingFace to meet ML 577 developers in the tools they use daily. 578 </p> 579 </div> 580 <div class="glide"> 581 <div data-glide-el="track" class="glide__track"> 582 <ul class="glide__slides"> 583 <li class="glide__slide"> 584 <img class="research__image" src="./img/youtube-logo.png" alt="youtube logo" /> 585 </li> 586 <li class="glide__slide"> 587 <img class="research__image" src="./img/google-logo.png" alt="google logo" /> 588 </li> 589 <li class="glide__slide"> 590 <img class="research__image" src="./img/waymo-logo.png" alt="waymo logo" /> 591 </li> 592 <li class="glide__slide"> 593 <img class="research__image" src="./img/amazon-logo.png" alt="amazon logo" /> 594 </li> 595 <li class="glide__slide"> 596 <img class="research__image" src="./img/spotify-logo.png" alt="spotify logo" /> 597 </li> 598 <li class="glide__slide"> 599 <img class="research__image" src="./img/uber-logo.png" alt="uber logo" /> 600 </li> 601 <li class="glide__slide"> 602 <img class="research__image" src="./img/netflix-logo.png" alt="netflix logo" /> 603 </li> 604 </ul> 605 </div> 606 </div> 607 </div> 608 609 <div class="contacts"> 610 <div class="contacts__wrapper"> 611 <div class="contacts__contanier"> 612 <h2 class="contacts__title text--white">Stay in touch</h2> 613 614 <p class="contacts__description"> 615 Sign up to our mailing list for regular updates and discussions about the Keras ecosystem. Listen in at our community meetings, and follow us on social media! 616 </p> 617 618 <div class="contacts__button-contanier"> 619 <a class="button__square button__square--white" href="https://groups.google.com/g/keras-users?pli=1" target="_blank"> 620 JOIN GOOGLE GROUP 621 </a> 622 <a class="button__square button__square--white" href="https://calendar.google.com/calendar/u/0/r/eventedit/copy/NGIybm44M3BucGd0aWVua3Q5ODhsM2RldG9fMjAyNTAyMDdUMTkwMDAwWiBjXzg1YWE3YzQ1Yjk1YzJlYmI5MmNlY2YzYmU0NzJjMGYyYmU1M2MxZTMyNjdkMzNhNGQ2NTFkMDMxMTBmYjA1NTNAZw/YWxleC5hYmJvdHRAYnluZC5jb20?scp=ALL" target="_blank"> 623 JOIN COMMUNITY MEETING 624 </a> 625 <a class="button__square button__square--white" href="https://discord.com/invite/google-dev-community" target="_blank">DISCORD</a> 626 <a class="button__square button__square--white" href="https://discuss.ai.google.dev/c/keras/22" target="_blank">GOOGLE AI FORUM</a> 627 </div> 628 </div> 629 630 <div class="contacts__border"></div> 631 632 <div class="contacts__contanier"> 633 <h2 class="contacts__title text--white">Contributions welcome!</h2> 634 635 <p class="contacts__description">
636 We welcome your code, ideas, and feedback as we continue to grow. Visit our roadmap, contribution guide or GitHub for more information. 637 </p> 638 639 <div class="contacts__button-contanier"> 640 <a class="button__square button__square--white" href="https://github.com/keras-team/keras/issues/19519" target="_blank">VIEW ROADMAP</a> 641 <a class="button__square button__square--white" href="https://github.com/keras-team/keras/issues/18442" target="_blank"> 642 CONTRIBUTION GUIDE 643 </a> 644 <a class="button__square button__square--white" href="https://github.com/keras-team" target="_blank">GITHUB</a> 645 </div> 646 </div> 647 </div> 648 </div> 649 </div> 650 651 <footer> 652 <div class="footer__container"> 653 <a href="https://policies.google.com/terms">Terms</a> 654 <div>|</div> 655 <a href="https://policies.google.com/privacy">Privacy</a> 656 </div> 657 </footer> 658 659
659<script src="./js/index.js"></script>
659 660 661
661<script src="./js/glide.min.js"></script>
661 662 663
663<script> 664 function adjustNavMargin() { 665 const banner = document.querySelector('.survey__banner'); 666 const nav = document.querySelector('.nav__container'); 667 668 if (banner && nav) { 669 const bannerHeight = banner.offsetHeight; 670 nav.style.marginTop = bannerHeight + 'px'; 671 } 672 } 673 674 document.addEventListener('DOMContentLoaded', adjustNavMargin); 675 window.addEventListener('resize', adjustNavMargin); 676 </script>
676 677 678
678<script> 679 const carousels = document.querySelector(".glide"); 680 let perView = 3; 681 let glide; 682 683 if (window.innerWidth > 1199) { 684 perView = 7; 685 } 686 687 if (carousels) { 688 glide = new Glide(".glide", { 689 type: "carousel", 690 perView, 691 focusAt: "center", 692 gap: 0, 693 autoplay: 1, 694 animationDuration: 3000, 695 animationTimingFunc: 'linear', 696 hoverpause: true, 697 }) 698 699 glide.mount(); 700 701 window.addEventListener('resize', (event) => { 702 if (window.innerWidth > 1199) { 703 perView = 7; 704 } else { 705 perView = 3; 706 } 707 708 glide.update({ perView }); 709 }); 710 } 711 </script>
711 712 713 <!-- Prism Script --> 714
714<script src="./js/prism.min.js"></script>
714 715
715<script src="./js/prism-python.min.js"></script>
715 716 </body> 717</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.