<>
/* Styles inlined from /site-assets/css/.css */
/* override theme */
table img {
max-width: 100%;
}
/* .devsite-terminal virtualenv prompt */
.tfo-terminal-venv::before {
content: "(venv) $ " !important;
}
/* .devsite-terminal root prompt */
.tfo-terminal-root::before {
content: "# " !important;
}
/* Used in links for type annotations in function/method signatures */
.tfo-signature-link a,
.tfo-signature-link a:visited,
.tfo-signature-link a:hover,
.tfo-signature-link a:focus,
.tfo-signature-link a:hover *,
.tfo-signature-link a:focus * {
text-decoration: none !important;
}
.tfo-signature-link a,
.tfo-signature-link a:visited {
border-bottom: 1px dotted #1a73e8;
}
.tfo-signature-link a:focus {
border-bottom-: solid;
}
/* .devsite-terminal Windows prompt */
.tfo-terminal-windows::before {
content: "C:\\> " !important;
}
/* .devsite-terminal Windows prompt w/ virtualenv */
.tfo-terminal-windows-venv::before {
content: "(venv) C:\\> " !important;
}
.tfo-diff-green-one-level + * {
background: rgba(175245162.6) !important;
}
.tfo-diff-green + * > * {
background: rgba(175245162.6) !important;
}
.tfo-diff-green-list + ul > li:first-of-type {
background: rgba(175245162.6) !important;
}
.tfo-diff-red-one-level + * {
background: rgba(255230230.6) !important;
text-decoration: line-through !important;
}
.tfo-diff-red + * > * {
background: rgba(255230230.6) !important;
text-decoration: line-through !important;
}
.tfo-diff-red-list + ul > li:first-of-type {
background: rgba(255230230.6) !important;
text-decoration: line-through !important;
}
devsite-code .tfo-notebook-code-cell-output {
max-height: 300px;
overflow: auto;
background: rgba(2552472371); /* orange bg to distinguish from input code cells */
}
devsite-code .tfo-notebook-code-cell-output + .devsite-code-buttons-container button {
background: rgba(255247237.7); /* orange bg to distinguish from input code cells */
}
devsite-code[dark-code] .tfo-notebook-code-cell-output {
background: rgba(64781031); /* medium slate */
}
devsite-code[dark-code] .tfo-notebook-code-cell-output + .devsite-code-buttons-container button {
background: rgba(6478103.7); /* medium slate */
}
/* override default table s for notebook buttons */
.devsite-table-wrapper .tfo-notebook-buttons {
display: block;
width: auto;
}
.tfo-notebook-buttons td {
display: inline-block;
padding: 0 16px 16px 0;
}
/* from DevSite's buttons.scss */
.tfo-notebook-buttons a,
.tfo-notebook-buttons :link,
.tfo-notebook-buttons :visited {
-moz-appearance: none;
-webkit-appearance: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
align-self: var(--devsite-button-align-self);
background: var(--devsite-button-backgroundvar(--devsite-background-1));
border: var(--devsite-button-border0);
border-radius: var(--devsite-button-border-radius2px);
box-sizing: border-box;
color: var(--devsite-button-color);
cursor: pointer;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font: var(--devsite-button-font500 14px/36px var(--devsite-primary-font-family));
height: var(--devsite-button-height36px);
letter-spacing: var(--devsite-button-letter-spacing0);
line-height: var(--devsite-button-line-height36px);
margin: var(--devsite-button-margin0);
margin-inline-end: var(--devsite-button-margin-x-end);
max-width: var(--devsite-button-max-widthnone);
min-width: 36px;
outline: 0;
overflow: hidden;
padding: var(--devsite-button-with-icon-padding0 16px);
text-align: center;
text-decoration: none;
text-overflow: ellipsis;
text-transform: var(--devsite-button-text-transformuppercase);
transition:
background-color .2s,
border .2s;
vertical-align: middle;
white-space: nowrap;
width: var(--devsite-button-widthauto);
}
.tfo-notebook-buttons a:hover,
.tfo-notebook-buttons a:focus {
background: var(--devsite-button-background-hover);
border: var(--devsite-button-border-hover0);
color: var(--devsite-button-color-hovervar(--devsite-button-color));
text-decoration: var(--devsite-button-text-decoration-hovernone);
}
.tfo-notebook-buttons a:active {
background: var(--devsite-button-background-active);
border: var(--devsite-button-border-active0);
transform: var(--devsite-button-transform-activenone);
}
.tfo-notebook-buttons tr {
background: 0;
border: 0;
}
/* on rendered notebook page,
remove link to webpage since we're already here */
.tfo-notebook-buttons:not(.tfo-api) td:first-child {
display: none;
}
.tfo-notebook-buttons td > a > img {
margin: 0 8px 0 -4px;
height: 20px;
}
[appearance='dark'] .tfo-notebook-buttons td > a > img {
filter: invert(1);
}
@media (prefers-color-scheme: dark) {
[appearance='device'] .tfo-notebook-buttons td > a > img {
filter: invert(1);
}
}
/* landing pages */
.tfo-landing-row-item-inset-white {
background-color: #fff;
padding: 32px;
}
.tfo-landing-row-item-inset-white ol,
.tfo-landing-row-item-inset-white ul {
padding-left: 20px;
}
/* colab callout button */
.colab-callout-row devsite-code {
border-radius: 8px 8px 0 0;
box-shadow: none;
}
.colab-callout-footer {
background: #e3e4e7;
border-radius: 0 0 8px 8px;
color: #37474f;
padding: 20px;
}
.colab-callout-row devsite-code[dark-code] + .colab-callout-footer {
background: #3f4f66;
}
.colab-callout-footer > .button {
margin-top: 4px;
color: #ff5c00;
}
.colab-callout-footer > a > span {
vertical-align: middle;
color: #37474f;
padding-left: 10px;
font-size: 14px;
}
.colab-callout-row devsite-code[dark-code] + .colab-callout-footer > a > span {
color: #fff;
}
a.colab-button {
background: rgba(255255255.75);
border: solid 1px rgba(000.08);
border-bottom-color: rgba(000.15);
border-radius: 4px;
color: #aaa;
display: inline-block;
font-size: 11px !important;
font-weight: 300;
line-height: 16px;
padding: 4px 8px;
text-decoration: none;
text-transform: uppercase;
}
a.colab-button:hover {
background: white;
border-color: rgba(000.2);
color: #666;
}
a.colab-button span {
background: url(/images/colab_logo_button.svg) no-repeat 1px 1px / 20px;
border-radius: 4px;
display: inline-block;
padding-left: 24px;
text-decoration: none;
}
@media screen and (max-width: 600px) {
.tfo-notebook-buttons td {
display: block;
}
}
/* guide and tutorials landing page cards and sections */
.tfo-landing-page-card {
padding: 16px;
box-shadow: 0 0 36px rgba(0,0,0,0.1);
border-radius: 10px;
}
/* Page section headings */
.tfo-landing-page-heading h2h2.tfo-landing-page-heading {
font-family: "Google Sans"sans-serif;
color: #425066;
font-size: 30px;
font-weight: 700;
line-height: 40px;
}
/* Item title headings */
.tfo-landing-page-heading h3h3.tfo-landing-page-heading,
.tfo-landing-page-card h3h3.tfo-landing-page-card {
font-family: "Google Sans"sans-serif;
color: #425066;
font-size: 20px;
font-weight: 500;
line-height: 26px;
}
/* List of tutorials notebooks for subsites */
.tfo-landing-page-resources-ul {
padding-left: 15px
}
.tfo-landing-page-resources-ul > li {
margin: 6px 0;
}
/* Temporary fix to hide product description in header on landing pages */
devsite-header .devsite-product-description {
display: none;
}
>
Stay organized with collections
Save and categorize content based on your preferences.
Install TensorFlow
Install the package or build from source. GPU support for CUDA®-enabled cards.
Keras
Keras is a high-level API that's easier for ML beginnersas well as researchers.
TensorFlow basics
Learn about the fundamental classes and features that make TensorFlow work.
The
tf.data API enables you to build complex input pipelines from simplereusable pieces.
Save a model
Save a TensorFlow model using checkpoints or the SavedModel format.
Accelerators
Distribute training across multiple GPUsmultiple machines or TPUs.
Best practices and optimization techniques for optimal TensorFlow performance.
Except as otherwise notedthe content of this page is licensed under the Creative Commons Attribution 4.0 Licenseand code samples are licensed under the Apache 2.0 License. For detailssee the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-03-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-02 UTC."],[],[]]