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
"""Minimal example showing how to generate TensorFlow TFRecord file.""" | |
import tensorflow as tf | |
tf.enable_eager_execution() | |
# All raw values should be converted to a type compatible with tf.Example. Use | |
# the following functions to do these convertions. | |
def _bytes_feature(value): | |
"""Returns a bytes_list from a string / byte.""" |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import os.path | |
import re | |
from osgeo import gdal | |
from osgeo import gdal_array | |
from osgeo import osr |