This file contains 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
""" | |
Load the MNIST dataset into numpy arrays | |
Author: Alexandre Drouin | |
License: BSD | |
""" | |
import numpy as np | |
from tensorflow.examples.tutorials.mnist import input_data |
This file contains 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 matplotlib.pyplot as plt | |
import numpy as np | |
def show_images(images, cols = 1, titles = None): | |
"""Display a list of images in a single figure with matplotlib. | |
Parameters | |
--------- | |
images: List of np.arrays compatible with plt.imshow. | |
This file contains 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 | |
from tensorflow.python.summary.event_accumulator import EventAccumulator | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
def plot_tensorflow_log(path): | |
# Loading too much data is slow... | |
tf_size_guidance = { |
This file contains 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
# -*- encoding: utf-8 -*- | |
# pip install emoji | |
import emoji | |
def char_is_emoji(character): | |
return character in emoji.UNICODE_EMOJI | |