Skip to content

Strange description in "2. Split" subsection#2435

Open
HsienChing wants to merge 1 commit intotensorflow:masterfrom
HsienChing:patch-10
Open

Strange description in "2. Split" subsection#2435
HsienChing wants to merge 1 commit intotensorflow:masterfrom
HsienChing:patch-10

Conversation

@HsienChing
Copy link
Copy Markdown

@HsienChing HsienChing commented Apr 22, 2026

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.

  1. 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

Screenshot date: 2026-04-22
Link: Run in Google Colab

#  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)
@HsienChing HsienChing requested a review from a team as a code owner April 22, 2026 03:14
@github-actions
Copy link
Copy Markdown

Preview

Preview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.

Format and style

Use the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs

$ python3 -m tensorflow_docs.tools.nbfmt notebook.ipynb
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
If commits are added to the pull request, synchronize your local branch: git pull origin patch-10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant