This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| # tf.enable_eager_execution() # uncomment if tf version < 2.0 | |
| def assign(x, slices, values): | |
| """Assign slicing-tensor to the given values. | |
| Args | |
| :x: A `Tensor` as input. | |
| :slices: A `Tensor`, `list` or `numpy array` indicates the region |