Difference between revisions of "Nov. 16 - Nov. 20"

From CSclasswiki
Jump to: navigation, search
Line 3: Line 3:
 
1. Training
 
1. Training
 
*: Could not directly change <code>setup_snapshot_image_grid(training_set)</code> as stated last week. It will raise error <code>"could not broadcast inout array from shape (3,256,256) into shape (3,0,256)"</code>
 
*: Could not directly change <code>setup_snapshot_image_grid(training_set)</code> as stated last week. It will raise error <code>"could not broadcast inout array from shape (3,256,256) into shape (3,0,256)"</code>
*: <code>gw</code> and <code>gh</code> must be assigned to 1 before initializing the data array in <code>setup_snapshot_image_grid(training_set)</code>
+
*: <code>gw</code> and <code>gh</code> must be assigned to 1 before initializing the data array in <code>setup_snapshot_image_grid(training_set)</code>. Directly set <code>gw</code> and <code>gh</code> to be 1 as parameters into <code>create_image_grid(images,grid_size=None)</code> will cause a mismatch in the second dimension of arrays, as in <code>setup_snapshot_image_grid(training_set)</code>, data arrays and layouts are built based on <code>np.zeros([gw*gh]+training_set.shape)</code>

Revision as of 04:19, 20 November 2020

back to Computer Art

1. Training

  • Could not directly change setup_snapshot_image_grid(training_set) as stated last week. It will raise error "could not broadcast inout array from shape (3,256,256) into shape (3,0,256)"
    gw and gh must be assigned to 1 before initializing the data array in setup_snapshot_image_grid(training_set). Directly set gw and gh to be 1 as parameters into create_image_grid(images,grid_size=None) will cause a mismatch in the second dimension of arrays, as in setup_snapshot_image_grid(training_set), data arrays and layouts are built based on np.zeros([gw*gh]+training_set.shape)