CINXE.COM

How to apply a hierarchical mask in Tensorflow2.0 (tf.keras) - General Discussion - Build with Google AI

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>How to apply a hierarchical mask in Tensorflow2.0 (tf.keras) - General Discussion - Build with Google AI</title> <meta name="description" content="I am trying to build a hierarchical sequence model for time series classification (refer to the paper: hierarchical attention networks for document classification). But I’m very confused about how to mask the hierarchica&amp;hellip;"> <meta name="generator" content="Discourse 3.4.0.beta3-dev - https://github.com/discourse/discourse version 607dd2cbd8810ed0639af431b63bd6267266f11b"> <link rel="icon" type="image/png" href="https://canada1.discourse-cdn.com/googleaitrial/optimized/2X/8/8bfe64fc593eb7baba8df149ebba4457c16ca1f9_2_32x32.png"> <link rel="apple-touch-icon" type="image/png" href="https://canada1.discourse-cdn.com/googleaitrial/optimized/2X/8/8bfe64fc593eb7baba8df149ebba4457c16ca1f9_2_180x180.png"> <meta name="theme-color" media="all" content="#1f1f1f"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover"> <link rel="canonical" href="https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222" /> <link rel="search" type="application/opensearchdescription+xml" href="https://discuss.ai.google.dev/opensearch.xml" title="Build with Google AI Search"> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/color_definitions_google-ai-for-developers_8_2_6949f4844f3b129ac3c89a6bc35f45c7838cf058.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" class="light-scheme"/> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/automation_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="automation" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/checklist_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="checklist" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-ai_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-ai" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-akismet_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-akismet" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-cakeday_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-cakeday" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-data-explorer_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-data-explorer" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-details_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-details" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-lazy-videos_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-lazy-videos" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-local-dates_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-local-dates" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-narrative-bot_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-narrative-bot" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-policy_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-policy" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-presence_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-presence" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-reactions_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-reactions" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-solved_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-solved" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-templates_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-templates" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-topic-voting_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-topic-voting" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/footnote_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="footnote" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/hosted-site_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="hosted-site" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/poll_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="poll" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/spoiler-alert_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="spoiler-alert" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-ai_desktop_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-ai_desktop" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-reactions_desktop_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-reactions_desktop" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-topic-voting_desktop_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="discourse-topic-voting_desktop" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/poll_desktop_32399882dc87f6a9c7805926d8a5e70f3350a52d.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="poll_desktop" /> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_4_055598a9ec1e54c86a09ba6fed981fc184a5224f.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="4" data-theme-name="discourse header search"/> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_3_699a2726aedd1a7a78631e2b660187df486171f8.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="3" data-theme-name="discourse-material-icons"/> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_9_2ed8a4ab4219393bb8f768699f21b379c4c56789.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="9" data-theme-name="global notice custom css"/> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_8_d28e3f0411225b83b6b3f1e41ebdf7ec5cb366c2.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="8" data-theme-name="temp nav fixes"/> <link href="https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_2_1e6e2dac3d659f127e25cb7cc1323fd468da6792.css?__ws=discuss.ai.google.dev" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="2" data-theme-name="google ai"/> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..400,0..1,0&amp;family=Roboto+Mono:ital,wght@0,100..700;1,100..700&amp;family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&amp;display=swap" rel="stylesheet"> <link rel="alternate nofollow" type="application/rss+xml" title="RSS feed of &#39;How to apply a hierarchical mask in Tensorflow2.0 (tf.keras)&#39;" href="https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222.rss" /> <meta property="og:site_name" content="Build with Google AI" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:image" content="https://canada1.discourse-cdn.com/googleaitrial/original/2X/8/8bfe64fc593eb7baba8df149ebba4457c16ca1f9.png" /> <meta property="og:image" content="https://canada1.discourse-cdn.com/googleaitrial/original/2X/8/8bfe64fc593eb7baba8df149ebba4457c16ca1f9.png" /> <meta property="og:url" content="https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222" /> <meta name="twitter:url" content="https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222" /> <meta property="og:title" content="How to apply a hierarchical mask in Tensorflow2.0 (tf.keras)" /> <meta name="twitter:title" content="How to apply a hierarchical mask in Tensorflow2.0 (tf.keras)" /> <meta property="og:description" content="I am trying to build a hierarchical sequence model for time series classification (refer to the paper: hierarchical attention networks for document classification). But I’m very confused about how to mask the hierarchical sequences. My data is a hierarchical time series. Specifically, each sample is composed of multiple sub-sequences and each sub-sequence is a multiple multivariate time series (just like word–&gt; sentence --&gt;document in NLP). So I need to pad and mask it twice. This is critical a..." /> <meta name="twitter:description" content="I am trying to build a hierarchical sequence model for time series classification (refer to the paper: hierarchical attention networks for document classification). But I’m very confused about how to mask the hierarchical sequences. My data is a hierarchical time series. Specifically, each sample is composed of multiple sub-sequences and each sub-sequence is a multiple multivariate time series (just like word–&gt; sentence --&gt;document in NLP). So I need to pad and mask it twice. This is critical a..." /> <meta property="og:article:section" content="TensorFlow" /> <meta property="og:article:section:color" content="f66f00" /> <meta property="og:article:section" content="General Discussion" /> <meta property="og:article:section:color" content="f2a346" /> <meta property="og:article:tag" content="timeseries" /> <meta property="og:article:tag" content="models" /> <meta property="og:article:tag" content="help_request" /> <meta property="article:published_time" content="2021-07-02T02:21:04+00:00" /> <meta property="og:ignore_canonical" content="true" /> </head> <body class="crawler browser-update"> <header> <a href="/"> Build with Google AI </a> </header> <div id="main-outlet" class="wrap" role="main"> <div id="topic-title"> <h1> <a href="/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222">How to apply a hierarchical mask in Tensorflow2.0 (tf.keras)</a> </h1> <div class="topic-category" itemscope itemtype="http://schema.org/BreadcrumbList"> <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a href="/c/tensorflow/general-discussion-6/37" class="badge-wrapper bullet" itemprop="item"> <span class='badge-category-bg' style='background-color: #f66f00'></span> <span class='badge-category clear-badge'> <span class='category-name' itemprop='name'>TensorFlow</span> </span> </a> <meta itemprop="position" content="1" /> </span> <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a href="/c/tensorflow/general-discussion-6/37" class="badge-wrapper bullet" itemprop="item"> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name' itemprop='name'>General Discussion</span> </span> </a> <meta itemprop="position" content="2" /> </span> </div> <div class="topic-category"> <div class='discourse-tags list-tags'> <a href='https://discuss.ai.google.dev/tag/timeseries' class='discourse-tag' rel="tag">timeseries</a>, <a href='https://discuss.ai.google.dev/tag/models' class='discourse-tag' rel="tag">models</a>, <a href='https://discuss.ai.google.dev/tag/help_request' class='discourse-tag' rel="tag">help_request</a> </div> </div> </div> <div itemscope itemtype='http://schema.org/DiscussionForumPosting'> <meta itemprop='headline' content='How to apply a hierarchical mask in Tensorflow2.0 (tf.keras)'> <link itemprop='url' href='https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222'> <meta itemprop='datePublished' content='2021-07-02T02:21:04Z'> <meta itemprop='articleSection' content='General Discussion'> <meta itemprop='keywords' content='timeseries, models, help_request'> <div itemprop='publisher' itemscope itemtype="http://schema.org/Organization"> <meta itemprop='name' content='Build with Google AI'> <div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject"> <meta itemprop='url' content='https://canada1.discourse-cdn.com/googleaitrial/original/1X/9c9b743566b5ef0d0701ebba72bf83038f42ea0b.png'> </div> </div> <div id='post_1' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discuss.ai.google.dev/u/Wwwwei'><span itemprop='name'>Wwwwei</span></a> </span> <link itemprop="mainEntityOfPage" href="https://discuss.ai.google.dev/t/how-to-apply-a-hierarchical-mask-in-tensorflow2-0-tf-keras/30222"> <span class="crawler-post-infos"> <time datetime='2021-07-02T02:21:04Z' class='post-time'> July 2, 2021, 2:21am </time> <meta itemprop='dateModified' content='2023-11-15T17:43:49Z'> <span itemprop='position'>1</span> </span> </div> <div class='post' itemprop='text'> <p>I am trying to build a hierarchical sequence model for time series classification (refer to the paper: hierarchical attention networks for document classification). But I’m very confused about how to mask the hierarchical sequences.</p> <p>My data is a hierarchical time series. Specifically, each sample is composed of multiple sub-sequences and each sub-sequence is a multiple multivariate time series (just like word–&gt; sentence --&gt;document in NLP). So I need to pad and mask it twice. This is critical as a document will often not have the same number of sentences (or all sentences the same number of words). Finally, I get data as follows:</p> <pre><code class="lang-auto">array([[[[0.21799476, 0.26063576], [0.2170655 , 0.53772384], [0.18505535, 0.30702454], [0.22714901, 0.17020395], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ]], [[0.2160176 , 0.23789616], [0.2675753 , 0.21807681], [0.26932836, 0.21914595], [0.26932836, 0.21914595], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ]]], [[[0.03941338, 0.3380829 ], [0.04766269, 0.3031088 ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ]], [[0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ], [0. , 0. ]]]], dtype=float32) </code></pre> <p>Then I build a hierarchical model as follows:</p> <pre><code class="lang-auto">inputs = Input(shape=(maxlen_event, maxlen_seq, 2)) x = TimeDistributed( Sequential([ Masking(), LSTM(units=8, return_sequences=False) ]) )(inputs) x = LSTM(units=32, return_sequences=False)(x) x = Dense(16, activation='relu')(x) output = Dense(16, activation='sigmoid')(x) </code></pre> <p>As my data is padded in on both dimensions, I don’t know how to mask it correctly. I have two questions about it:<br> Q1: In TimeDistributed, do I use the masking layer correctly to mask the first padding?<br> Q2: How to mask the second padding?</p> <p>Thank you.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_3' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discuss.ai.google.dev/u/aniruthraj'><span itemprop='name'>aniruthraj</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2024-11-26T18:38:36Z' class='post-time'> November 26, 2024, 6:38pm </time> <meta itemprop='dateModified' content='2024-11-26T18:38:36Z'> <span itemprop='position'>3</span> </span> </div> <div class='post' itemprop='text'> <p>Hi <a class="mention" href="/u/wwwwei">@Wwwwei</a>,</p> <p>Apologies for the delay in response.</p> <aside class="quote no-group" data-username="Wwwwei" data-post="1" data-topic="30222"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://yyz1.discourse-cdn.com/googleaitrial/user_avatar/discuss.ai.google.dev/wwwwei/48/7873_2.png" class="avatar"> Wwwwei:</div> <blockquote> <p>Q1: In TimeDistributed, do I use the masking layer correctly to mask the first padding?</p> </blockquote> </aside> <p>Yes, you are using the Masking layer correctly within the TimeDistributed wrapper where this step masks out padding in the time steps (maxlen_seq).</p> <aside class="quote no-group" data-username="Wwwwei" data-post="1" data-topic="30222"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://yyz1.discourse-cdn.com/googleaitrial/user_avatar/discuss.ai.google.dev/wwwwei/48/7873_2.png" class="avatar"> Wwwwei:</div> <blockquote> <p>Q2: How to mask the second padding?</p> </blockquote> </aside> <p>As far as I’m aware, I suggest to apply another <code>Masking</code> layer before the <code>TimeDistributed</code> layer, which would mask the padded events in the <code>maxlen_event</code> dimension.</p> <pre><code class="lang-auto">inputs = Input(shape=(maxlen_event, maxlen_seq, 2)) # Mask events (padding across the first dimension) masked_inputs = Masking()(inputs) # Now apply TimeDistributed to process each event separately x = TimeDistributed( Sequential([ Masking(), LSTM(units=8, return_sequences=False) ]) )(masked_inputs) </code></pre> <p>Thank You.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_4' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" href='https://discuss.ai.google.dev/u/Hana_Lovely'><span itemprop='name'>Hana_Lovely</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2024-11-26T19:26:54Z' class='post-time'> November 26, 2024, 7:26pm </time> <meta itemprop='dateModified' content='2024-11-26T19:26:54Z'> <span itemprop='position'>4</span> </span> </div> <div class='post' itemprop='text'> <p><strong>good morning to all developer in here</strong></p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> </div> <div id="related-topics" class="more-topics__list " role="complementary" aria-labelledby="related-topics-title"> <h3 id="related-topics-title" class="more-topics__list-title"> Related topics </h3> <div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'> <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'> <table class='topic-list'> <thead> <tr> <th>Topic</th> <th></th> <th class="replies">Replies</th> <th class="views">Views</th> <th>Activity</th> </tr> </thead> <tbody> <tr class="topic-list-item" id="topic-list-item-30516"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='1'> <span class="link-top-line"> <a itemprop='url' href='https://discuss.ai.google.dev/t/time-series-data-sequence-classification/30516' class='title raw-link raw-topic-link'>Time Series Data: Sequence Classification</a> </span> <div class="link-bottom-line"> <a href='/c/tensorflow/general-discussion-6/37' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name'>General Discussion</span> </span> </a> <div class="discourse-tags"> <a href='https://discuss.ai.google.dev/tag/timeseries' class='discourse-tag'>timeseries</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/classification' class='discourse-tag'>classification</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>61</span> </td> <td> June 5, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-31349"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='2'> <span class="link-top-line"> <a itemprop='url' href='https://discuss.ai.google.dev/t/using-masking-layer-and-variable-length-sequence-input/31349' class='title raw-link raw-topic-link'>Using masking layer and variable length sequence input</a> </span> <div class="link-bottom-line"> <a href='/c/tensorflow/general-discussion-6/37' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name'>General Discussion</span> </span> </a> <div class="discourse-tags"> <a href='https://discuss.ai.google.dev/tag/api' class='discourse-tag'>api</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/keras' class='discourse-tag'>keras</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/tfdata' class='discourse-tag'>tfdata</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>586</span> </td> <td> March 23, 2023 </td> </tr> <tr class="topic-list-item" id="topic-list-item-27954"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='3'> <span class="link-top-line"> <a itemprop='url' href='https://discuss.ai.google.dev/t/can-anybody-tell-me-how-to-use-mask-argument-in-lstm-cell/27954' class='title raw-link raw-topic-link'>Can anybody tell me how to use mask argument in LSTM cell</a> </span> <div class="link-bottom-line"> <a href='/c/tensorflow/general-discussion-6/37' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name'>General Discussion</span> </span> </a> <div class="discourse-tags"> <a href='https://discuss.ai.google.dev/tag/help_request' class='discourse-tag'>help_request</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>246</span> </td> <td> July 24, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-30486"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='4'> <span class="link-top-line"> <a itemprop='url' href='https://discuss.ai.google.dev/t/how-does-the-bidirectional-layer-handle-the-masked-timesteps-when-merging-the-outputs-of-the-forward-and-backward-lstms/30486' class='title raw-link raw-topic-link'>How does the Bidirectional layer handle the masked timesteps when merging the outputs of the forward and backward LSTMs?</a> </span> <div class="link-bottom-line"> <a href='/c/tensorflow/general-discussion-6/37' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name'>General Discussion</span> </span> </a> <div class="discourse-tags"> <a href='https://discuss.ai.google.dev/tag/api' class='discourse-tag'>api</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/keras' class='discourse-tag'>keras</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/help_request' class='discourse-tag'>help_request</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>2</span> </td> <td class="views"> <span class='views' title='views'>1120</span> </td> <td> March 25, 2022 </td> </tr> <tr class="topic-list-item" id="topic-list-item-31733"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='5'> <span class="link-top-line"> <a itemprop='url' href='https://discuss.ai.google.dev/t/generating-embeddings-from-nested-sequences/31733' class='title raw-link raw-topic-link'>Generating Embeddings from Nested Sequences</a> </span> <div class="link-bottom-line"> <a href='/c/tensorflow/general-discussion-6/37' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #f2a346'></span> <span class='badge-category clear-badge'> <span class='category-name'>General Discussion</span> </span> </a> <div class="discourse-tags"> <a href='https://discuss.ai.google.dev/tag/keras' class='discourse-tag'>keras</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/education' class='discourse-tag'>education</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/help_request' class='discourse-tag'>help_request</a> ,&nbsp; <a href='https://discuss.ai.google.dev/tag/lstm' class='discourse-tag'>lstm</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>792</span> </td> <td> December 29, 2023 </td> </tr> </tbody> </table> </div> </div> </div> <footer class="container wrap"> <nav class='crawler-nav'> <ul> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/' itemprop="url">Home </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/categories' itemprop="url">Categories </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/guidelines' itemprop="url">Guidelines </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='https://policies.google.com/terms' itemprop="url">Terms of Service </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='https://policies.google.com/privacy' itemprop="url">Privacy Policy </a> </span> </li> </ul> </nav> <p class='powered-by-link'>Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled</p> </footer> <div class="buorg"><div>Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.</div></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10