Neural Networks

Keep each picture together

A plausible shape that mixes pictures

Botie must present each picture to a dense layer as features while preserving which pixels belong to which picture.

BOTIE

All twelve pixels fit in either a 2-by-6 or a 6-by-2 array. Which arrangement matches this dense-layer input contract?
The inputs we are comparing

Two image arrays

Example 1

[
  [
    [
      1,
      2,
      3
    ],
    [
      4,
      5,
      6
    ]
  ],
  [
    [
      7,
      8,
      9
    ],
    [
      10,
      11,
      12
    ]
  ]
]

Example 2

[
  [
    [
      0,
      1,
      0
    ],
    [
      1,
      0,
      1
    ]
  ],
  [
    [
      2,
      3,
      2
    ],
    [
      3,
      2,
      3
    ]
  ]
]
Result for example 1
123456
789101112
Choose an explanation to test
An empty image beside two bright corners

This check uses the pieces from “Flatten pixels without merging examples”.

BOTIE

The batch contains two images, each with two rows of three pixels. Return two feature rows while preserving row-major pixel order and keeping the empty image separate from the image with bright corners.
Two image arrays
[
  [
    [
      0,
      0,
      0
    ],
    [
      0,
      0,
      0
    ]
  ],
  [
    [
      9,
      0,
      0
    ],
    [
      0,
      0,
      9
    ]
  ]
]

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Which output positions contain the second image, and how can you verify that from its pixels?

Name the example axis and feature axes before changing a tensor's shape.

This is a small construction problem. The lesson explains the assumptions and the parts of the full method that this example leaves out.

Work through the Python challenges →
Continue the courseLoss Functions →
← A Dense Layer and the Forward Pass