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 argparse | |
| import os | |
| import platform | |
| import shutil | |
| import time | |
| from pathlib import Path | |
| import math | |
| import cv2 | |
| import torch |
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 |
NewerOlder