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 warnings | |
from skimage.measure import compare_ssim | |
from skimage.transform import resize | |
from scipy.stats import wasserstein_distance | |
from scipy.misc import imsave | |
from scipy.ndimage import imread | |
import numpy as np | |
import cv2 | |
## |
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
# This file is useful for reading the contents of the ops generated by ruby. | |
# You can read any graph defination in pb/pbtxt format generated by ruby | |
# or by python and then convert it back and forth from human readable to binary format. | |
import tensorflow as tf | |
from google.protobuf import text_format | |
from tensorflow.python.platform import gfile | |
def pbtxt_to_graphdef(filename): | |
with open(filename, 'r') as f: |
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
# required apt-get install jython libcommons-logging-java libcommons-lang-java | |
import sys | |
sys.path.append('jackcess-2.0.4.jar') # assume the jackcess is in the same directory | |
sys.path.append('/usr/share/java/commons-logging-1.1.3.jar') # in case logging didn't get picked up | |
sys.path.append('/usr/share/java/commons-lang-2.6.jar') # in case lang didn't get picked up | |
from com.healthmarketscience.jackcess import * | |
from com.healthmarketscience.jackcess.util import ExportFilter | |
from com.healthmarketscience.jackcess.util import ExportUtil | |
from com.healthmarketscience.jackcess.util import SimpleExportFilter | |
import java.io |