assert uniq_spatial_size[i] >= max_spatial_win[i], \
"window size {} is larger than image size {}".format(
max_spatial_win[i], uniq_spatial_size[i])
max_coords[:, i] = np.random.randint(
0, max(uniq_spatial_size[i] - max_spatial_win[i], 1), n_samples)
// adjust max spatial coordinates based on each spatial window size
all_coordinates = {}
for mod in list(win_sizes):
After Change
indices_to_add = candidates_indices[list_indices[i]]
print(max_coords.shape, indices_to_add)
for s in range(0, N_SPATIAL):
max_coords[i, s] = indices_to_add[s] - np.floor(
spatial_win_sizes[0]/2)[s]
// for i in range(0, N_SPATIAL):
// assert uniq_spatial_size[i] >= max_spatial_win[i], \
// "window size {} is larger than image size {}".format(
// max_spatial_win[i], uniq_spatial_size[i])