From 48c46a2e9466870dc3918b71abe6f7a6aa447024 Mon Sep 17 00:00:00 2001 From: Hsien-Ching Chung Date: Wed, 22 Apr 2026 11:13:05 +0800 Subject: [PATCH] Strange description in "2. Split" subsection # Strange description in "2. Split" subsection **Position:** "2. Split" subsection **Link:** https://www.tensorflow.org/tutorials/structured_data/time_series#2_split **Condition:** The original description is: The code above took a batch of three 7-time step windows with 19 features at each time step. It splits them into a batch of 6-time step 19-feature inputs, and a 1-time step 1-feature label. However, it's better to be modified as: The code above took ~a batch~ three batches of ~three~ a 7-time step windows with 19 features at each time step. It splits them into ~a batch~ three batches of a 6-time step 19-feature inputs, and a 1-time step 1-feature label. **Reason:** Please see the screenshot below. We know it's three batches instead of one. 1. A description of the tensor structure is provided. > Typically, data in TensorFlow is packed into arrays where the outermost index is across examples (the "batch" dimension). The middle indices are the "time" or "space" (width, height) dimension(s). The innermost indices are the features. 2. The result of the code is ``` All shapes are: (batch, time, features) Window shape: (3, 7, 19) Inputs shape: (3, 6, 19) Labels shape: (3, 1, 1) ``` ![image.png](attachment:8c3a5cc9-3096-4d45-9851-aa34a1dee951.png) Screenshot date: 2026-04-22 Link: [Run in Google Colab](https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/structured_data/time_series.ipynb) --- site/en/tutorials/structured_data/time_series.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/tutorials/structured_data/time_series.ipynb b/site/en/tutorials/structured_data/time_series.ipynb index 31aab384859..b909c940857 100644 --- a/site/en/tutorials/structured_data/time_series.ipynb +++ b/site/en/tutorials/structured_data/time_series.ipynb @@ -813,7 +813,7 @@ "source": [ "Typically, data in TensorFlow is packed into arrays where the outermost index is across examples (the \"batch\" dimension). The middle indices are the \"time\" or \"space\" (width, height) dimension(s). The innermost indices are the features.\n", "\n", - "The code above took a batch of three 7-time step windows with 19 features at each time step. It splits them into a batch of 6-time step 19-feature inputs, and a 1-time step 1-feature label. The label only has one feature because the `WindowGenerator` was initialized with `label_columns=['T (degC)']`. Initially, this tutorial will build models that predict single output labels." + "The code above took three batches of a 7-time step windows with 19 features at each time step. It splits them into three batches of a 6-time step 19-feature inputs, and a 1-time step 1-feature label. The label only has one feature because the `WindowGenerator` was initialized with `label_columns=['T (degC)']`. Initially, this tutorial will build models that predict single output labels." ] }, {