CINXE.COM
The Model class
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Keras documentation"> <meta name="author" content="Keras Team"> <link rel="shortcut icon" href="https://keras.io/img/favicon.ico"> <link rel="canonical" href="https://keras.io/2.18/api/models/model/" /> <!-- Social --> <meta property="og:title" content="Keras documentation: The Model class"> <meta property="og:image" content="https://keras.io/img/logo-k-keras-wb.png"> <meta name="twitter:title" content="Keras documentation: The Model class"> <meta name="twitter:image" content="https://keras.io/img/k-keras-social.png"> <meta name="twitter:card" content="summary"> <title>The Model class</title> <!-- Bootstrap core CSS --> <link href="/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom fonts for this template --> <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap" rel="stylesheet"> <!-- Custom styles for this template --> <link href="/css/docs.css" rel="stylesheet"> <link href="/css/monokai.css" rel="stylesheet"> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5DNGF4N'); </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-175165319-128', 'auto'); ga('send', 'pageview'); </script> <!-- End Google Tag Manager --> <script async defer src="https://buttons.github.io/buttons.js"></script> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5DNGF4N" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <div class='k-page'> <div class="k-nav" id="nav-menu"> <a href='/'><img src='/img/logo-small.png' class='logo-small' /></a> <div class="nav flex-column nav-pills" role="tablist" aria-orientation="vertical"> <a class="nav-link" href="/about/" role="tab" aria-selected="">About Keras</a> <a class="nav-link" href="/getting_started/" role="tab" aria-selected="">Getting started</a> <a class="nav-link" href="/guides/" role="tab" aria-selected="">Developer guides</a> <a class="nav-link" href="/api/" role="tab" aria-selected="">Keras 3 API documentation</a> <a class="nav-link active" href="/2.18/api/" role="tab" aria-selected="">Keras 2 API documentation</a> <a class="nav-sublink active" href="/2.18/api/models/">Models API</a> <a class="nav-sublink2 active" href="/2.18/api/models/model/">The Model class</a> <a class="nav-sublink2" href="/2.18/api/models/sequential/">The Sequential class</a> <a class="nav-sublink2" href="/2.18/api/models/model_training_apis/">Model training APIs</a> <a class="nav-sublink2" href="/2.18/api/models/model_saving_apis/">Saving & serialization</a> <a class="nav-sublink" href="/2.18/api/layers/">Layers API</a> <a class="nav-sublink" href="/2.18/api/callbacks/">Callbacks API</a> <a class="nav-sublink" href="/2.18/api/optimizers/">Optimizers</a> <a class="nav-sublink" href="/2.18/api/metrics/">Metrics</a> <a class="nav-sublink" href="/2.18/api/losses/">Losses</a> <a class="nav-sublink" href="/2.18/api/data_loading/">Data loading</a> <a class="nav-sublink" href="/2.18/api/datasets/">Built-in small datasets</a> <a class="nav-sublink" href="/2.18/api/applications/">Keras Applications</a> <a class="nav-sublink" href="/2.18/api/mixed_precision/">Mixed precision</a> <a class="nav-sublink" href="/2.18/api/utils/">Utilities</a> <a class="nav-link" href="/examples/" role="tab" aria-selected="">Code examples</a> <a class="nav-link" href="/keras_tuner/" role="tab" aria-selected="">KerasTuner: Hyperparameter Tuning</a> <a class="nav-link" href="/keras_hub/" role="tab" aria-selected="">KerasHub: Pretrained Models</a> <a class="nav-link" href="/keras_cv/" role="tab" aria-selected="">KerasCV: Computer Vision Workflows</a> <a class="nav-link" href="/keras_nlp/" role="tab" aria-selected="">KerasNLP: Natural Language Workflows</a> </div> </div> <div class='k-main'> <div class='k-main-top'> <script> function displayDropdownMenu() { e = document.getElementById("nav-menu"); if (e.style.display == "block") { e.style.display = "none"; } else { e.style.display = "block"; document.getElementById("dropdown-nav").style.display = "block"; } } function resetMobileUI() { if (window.innerWidth <= 840) { document.getElementById("nav-menu").style.display = "none"; document.getElementById("dropdown-nav").style.display = "block"; } else { document.getElementById("nav-menu").style.display = "block"; document.getElementById("dropdown-nav").style.display = "none"; } var navmenu = document.getElementById("nav-menu"); var menuheight = navmenu.clientHeight; var kmain = document.getElementById("k-main-id"); kmain.style.minHeight = (menuheight + 100) + 'px'; } window.onresize = resetMobileUI; window.addEventListener("load", (event) => { resetMobileUI() }); </script> <div id='dropdown-nav' onclick="displayDropdownMenu();"> <svg viewBox="-20 -20 120 120" width="60" height="60"> <rect width="100" height="20"></rect> <rect y="30" width="100" height="20"></rect> <rect y="60" width="100" height="20"></rect> </svg> </div> <form class="bd-search d-flex align-items-center k-search-form" id="search-form"> <input type="search" class="k-search-input" id="search-input" placeholder="Search Keras documentation..." aria-label="Search Keras documentation..." autocomplete="off"> <button class="k-search-btn"> <svg width="13" height="13" viewBox="0 0 13 13"><title>search</title><path d="m4.8495 7.8226c0.82666 0 1.5262-0.29146 2.0985-0.87438 0.57232-0.58292 0.86378-1.2877 0.87438-2.1144 0.010599-0.82666-0.28086-1.5262-0.87438-2.0985-0.59352-0.57232-1.293-0.86378-2.0985-0.87438-0.8055-0.010599-1.5103 0.28086-2.1144 0.87438-0.60414 0.59352-0.8956 1.293-0.87438 2.0985 0.021197 0.8055 0.31266 1.5103 0.87438 2.1144 0.56172 0.60414 1.2665 0.8956 2.1144 0.87438zm4.4695 0.2115 3.681 3.6819-1.259 1.284-3.6817-3.7 0.0019784-0.69479-0.090043-0.098846c-0.87973 0.76087-1.92 1.1413-3.1207 1.1413-1.3553 0-2.5025-0.46363-3.4417-1.3909s-1.4088-2.0686-1.4088-3.4239c0-1.3553 0.4696-2.4966 1.4088-3.4239 0.9392-0.92727 2.0864-1.3969 3.4417-1.4088 1.3553-0.011889 2.4906 0.45771 3.406 1.4088 0.9154 0.95107 1.379 2.0924 1.3909 3.4239 0 1.2126-0.38043 2.2588-1.1413 3.1385l0.098834 0.090049z"></path></svg> </button> </form> <script> var form = document.getElementById('search-form'); form.onsubmit = function(e) { e.preventDefault(); var query = document.getElementById('search-input').value; window.location.href = '/search.html?query=' + query; return False } </script> </div> <div class='k-main-inner' id='k-main-id'> <div class='k-location-slug'> <span class="k-location-slug-pointer">►</span> <a href='/2.18/api/'>Keras 2 API documentation</a> / <a href='/2.18/api/models/'>Models API</a> / The Model class </div> <div class='k-content'> <h1 id="the-model-class">The Model class</h1> <p><span style="float:right;"><a href="https://github.com/keras-team/tf-keras/tree/v2.18.0/tf_keras/engine/training.py#L70">[source]</a></span></p> <h3 id="model-class"><code>Model</code> class</h3> <div class="codehilite"><pre><span></span><code><span class="n">tf_keras</span><span class="o">.</span><span class="n">Model</span><span class="p">()</span> </code></pre></div> <p>A model grouping layers into an object with training/inference features.</p> <p><strong>Arguments</strong></p> <ul> <li><strong>inputs</strong>: The input(s) of the model: a <a href="/api/layers/core_layers/input#input-function"><code>keras.Input</code></a> object or a combination of <a href="/api/layers/core_layers/input#input-function"><code>keras.Input</code></a> objects in a dict, list or tuple.</li> <li><strong>outputs</strong>: The output(s) of the model: a tensor that originated from <a href="/api/layers/core_layers/input#input-function"><code>keras.Input</code></a> objects or a combination of such tensors in a dict, list or tuple. See Functional API example below.</li> <li><strong>name</strong>: String, the name of the model.</li> </ul> <p>There are two ways to instantiate a <code>Model</code>:</p> <p>1 - With the "Functional API", where you start from <code>Input</code>, you chain layer calls to specify the model's forward pass, and finally you create your model from inputs and outputs:</p> <div class="codehilite"><pre><span></span><code><span class="kn">import</span> <span class="nn">tensorflow</span> <span class="k">as</span> <span class="nn">tf</span> <span class="n">inputs</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">Input</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="mi">3</span><span class="p">,))</span> <span class="n">x</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">relu</span><span class="p">)(</span><span class="n">inputs</span><span class="p">)</span> <span class="n">outputs</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">softmax</span><span class="p">)(</span><span class="n">x</span><span class="p">)</span> <span class="n">model</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">(</span><span class="n">inputs</span><span class="o">=</span><span class="n">inputs</span><span class="p">,</span> <span class="n">outputs</span><span class="o">=</span><span class="n">outputs</span><span class="p">)</span> </code></pre></div> <p>Note: Only dicts, lists, and tuples of input tensors are supported. Nested inputs are not supported (e.g. lists of list or dicts of dict).</p> <p>A new Functional API model can also be created by using the intermediate tensors. This enables you to quickly extract sub-components of the model.</p> <p><strong>Example</strong></p> <div class="codehilite"><pre><span></span><code><span class="n">inputs</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">Input</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span> <span class="n">processed</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">RandomCrop</span><span class="p">(</span><span class="n">width</span><span class="o">=</span><span class="mi">32</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="mi">32</span><span class="p">)(</span><span class="n">inputs</span><span class="p">)</span> <span class="n">conv</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Conv2D</span><span class="p">(</span><span class="n">filters</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">kernel_size</span><span class="o">=</span><span class="mi">3</span><span class="p">)(</span><span class="n">processed</span><span class="p">)</span> <span class="n">pooling</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">GlobalAveragePooling2D</span><span class="p">()(</span><span class="n">conv</span><span class="p">)</span> <span class="n">feature</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">10</span><span class="p">)(</span><span class="n">pooling</span><span class="p">)</span> <span class="n">full_model</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">(</span><span class="n">inputs</span><span class="p">,</span> <span class="n">feature</span><span class="p">)</span> <span class="n">backbone</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">(</span><span class="n">processed</span><span class="p">,</span> <span class="n">conv</span><span class="p">)</span> <span class="n">activations</span> <span class="o">=</span> <span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">(</span><span class="n">conv</span><span class="p">,</span> <span class="n">feature</span><span class="p">)</span> </code></pre></div> <p>Note that the <code>backbone</code> and <code>activations</code> models are not created with <a href="/api/layers/core_layers/input#input-function"><code>keras.Input</code></a> objects, but with the tensors that are originated from <a href="/api/layers/core_layers/input#input-function"><code>keras.Input</code></a> objects. Under the hood, the layers and weights will be shared across these models, so that user can train the <code>full_model</code>, and use <code>backbone</code> or <code>activations</code> to do feature extraction. The inputs and outputs of the model can be nested structures of tensors as well, and the created models are standard Functional API models that support all the existing APIs.</p> <p>2 - By subclassing the <code>Model</code> class: in that case, you should define your layers in <code>__init__()</code> and you should implement the model's forward pass in <code>call()</code>.</p> <div class="codehilite"><pre><span></span><code><span class="kn">import</span> <span class="nn">tensorflow</span> <span class="k">as</span> <span class="nn">tf</span> <span class="k">class</span> <span class="nc">MyModel</span><span class="p">(</span><span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense1</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">relu</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense2</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">softmax</span><span class="p">)</span> <span class="k">def</span> <span class="nf">call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputs</span><span class="p">):</span> <span class="n">x</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense1</span><span class="p">(</span><span class="n">inputs</span><span class="p">)</span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense2</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="n">model</span> <span class="o">=</span> <span class="n">MyModel</span><span class="p">()</span> </code></pre></div> <p>If you subclass <code>Model</code>, you can optionally have a <code>training</code> argument (boolean) in <code>call()</code>, which you can use to specify a different behavior in training and inference:</p> <div class="codehilite"><pre><span></span><code><span class="kn">import</span> <span class="nn">tensorflow</span> <span class="k">as</span> <span class="nn">tf</span> <span class="k">class</span> <span class="nc">MyModel</span><span class="p">(</span><span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense1</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">relu</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense2</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dense</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="n">activation</span><span class="o">=</span><span class="n">tf</span><span class="o">.</span><span class="n">nn</span><span class="o">.</span><span class="n">softmax</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">dropout</span> <span class="o">=</span> <span class="n">tf</span><span class="o">.</span><span class="n">keras</span><span class="o">.</span><span class="n">layers</span><span class="o">.</span><span class="n">Dropout</span><span class="p">(</span><span class="mf">0.5</span><span class="p">)</span> <span class="k">def</span> <span class="nf">call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inputs</span><span class="p">,</span> <span class="n">training</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span> <span class="n">x</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense1</span><span class="p">(</span><span class="n">inputs</span><span class="p">)</span> <span class="k">if</span> <span class="n">training</span><span class="p">:</span> <span class="n">x</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dropout</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">training</span><span class="o">=</span><span class="n">training</span><span class="p">)</span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">dense2</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="n">model</span> <span class="o">=</span> <span class="n">MyModel</span><span class="p">()</span> </code></pre></div> <p>Once the model is created, you can config the model with losses and metrics with <code>model.compile()</code>, train the model with <code>model.fit()</code>, or use the model to do prediction with <code>model.predict()</code>.</p> <hr /> <p><span style="float:right;"><a href="https://github.com/keras-team/tf-keras/tree/v2.18.0/tf_keras/engine/training.py#L3461">[source]</a></span></p> <h3 id="summary-method"><code>summary</code> method</h3> <div class="codehilite"><pre><span></span><code><span class="n">Model</span><span class="o">.</span><span class="n">summary</span><span class="p">(</span> <span class="n">line_length</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">positions</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">print_fn</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">expand_nested</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">show_trainable</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">layer_range</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="p">)</span> </code></pre></div> <p>Prints a string summary of the network.</p> <p><strong>Arguments</strong></p> <ul> <li><strong>line_length</strong>: Total length of printed lines (e.g. set this to adapt the display to different terminal window sizes).</li> <li><strong>positions</strong>: Relative or absolute positions of log elements in each line. If not provided, becomes <code>[0.3, 0.6, 0.70, 1.]</code>. Defaults to <code>None</code>.</li> <li><strong>print_fn</strong>: Print function to use. By default, prints to <code>stdout</code>. If <code>stdout</code> doesn't work in your environment, change to <code>print</code>. It will be called on each line of the summary. You can set it to a custom function in order to capture the string summary.</li> <li><strong>expand_nested</strong>: Whether to expand the nested models. Defaults to <code>False</code>.</li> <li><strong>show_trainable</strong>: Whether to show if a layer is trainable. Defaults to <code>False</code>.</li> <li><strong>layer_range</strong>: a list or tuple of 2 strings, which is the starting layer name and ending layer name (both inclusive) indicating the range of layers to be printed in summary. It also accepts regex patterns instead of exact name. In such case, start predicate will be the first element it matches to <code>layer_range[0]</code> and the end predicate will be the last element it matches to <code>layer_range[1]</code>. By default <code>None</code> which considers all layers of model.</li> </ul> <p><strong>Raises</strong></p> <ul> <li><strong>ValueError</strong>: if <code>summary()</code> is called before the model is built.</li> </ul> <hr /> <p><span style="float:right;"><a href="https://github.com/keras-team/tf-keras/tree/v2.18.0/tf_keras/engine/training.py#L3527">[source]</a></span></p> <h3 id="getlayer-method"><code>get_layer</code> method</h3> <div class="codehilite"><pre><span></span><code><span class="n">Model</span><span class="o">.</span><span class="n">get_layer</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> </code></pre></div> <p>Retrieves a layer based on either its name (unique) or index.</p> <p>If <code>name</code> and <code>index</code> are both provided, <code>index</code> will take precedence. Indices are based on order of horizontal graph traversal (bottom-up).</p> <p><strong>Arguments</strong></p> <ul> <li><strong>name</strong>: String, name of layer.</li> <li><strong>index</strong>: Integer, index of layer.</li> </ul> <p><strong>Returns</strong></p> <p>A layer instance.</p> <hr /> </div> <div class='k-outline'> <div class='k-outline-depth-1'> <a href='#the-model-class'>The Model class</a> </div> <div class='k-outline-depth-3'> <a href='#model-class'><code>Model</code> class</a> </div> <div class='k-outline-depth-3'> <a href='#summary-method'><code>summary</code> method</a> </div> <div class='k-outline-depth-3'> <a href='#getlayer-method'><code>get_layer</code> method</a> </div> </div> </div> </div> </div> </body> <footer style="float: left; width: 100%; padding: 1em; border-top: solid 1px #bbb;"> <a href="https://policies.google.com/terms">Terms</a> | <a href="https://policies.google.com/privacy">Privacy</a> </footer> </html>