Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created August 26, 2018 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/bb76d48a9cd0d3973a19435082b63592 to your computer and use it in GitHub Desktop.
Save NMZivkovic/bb76d48a9cd0d3973a19435082b63592 to your computer and use it in GitHub Desktop.
def _generate_index_matrix(self, x,y):
return tf.constant(np.array(list(self._iterator(x, y))))
def _iterator(self, x, y):
for i in range(x):
for j in range(y):
yield np.array([i, j])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment