Build parameter dictionary II: Input

A solution to the exercise from the last section

There are lots of ways to go about this. Here's one.

Exercise 3: Build a parameter dictionary, part II: The Input

  • Find the aspect ratio of the images.
  • Add the bottom position, height, and width of the input image to the parameter dictionary.
  • Print out all the parameters.

In this exercise, we start to define and place the images in the figure. To fully define the position and size of the input image, we need to provide the x- and y-position of the lower left corner (a.k.a. "left" and "bottom" of the image) and its height and width. If we assume that it's left position is determined by the left border, this exercise fills in the rest of what we need.

Feel free to use my solution to the last exercise as a starting point: nn_viz_02.py

Ready? Go for it.

Discussion

2 comments