Classification done in 79.1ms [avg = 79.1ms] Probabilities and labels: n02124075 Egyptian cat (0.31) n02123159 tiger cat (0.18) n02123045 tabby, tabby cat (0.12) n02119022 red fox, Vulpes vulpes (0.11) n02085620 Chihuahua (0.04)
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
filename_queue = tf.FIFOQueue(100000, [tf.string], shapes=[[]]) | |
# ... | |
reader = tf.WholeFileReader() | |
image_filename, image_raw = reader.read(self._filename_queue) | |
image = tf.image.decode_jpeg(image_raw, channels=3) | |
# Image preprocessing | |
image_preproc = ... |
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 time | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from Blockchain_test import return_data | |
from keras.preprocessing import sequence | |
from keras.models import Sequential | |
from keras.layers import Dense, Embedding | |
from keras.layers import LSTM |
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 time | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from Blockchain_test import return_data | |
from keras.preprocessing import sequence | |
from keras.models import Sequential | |
from keras.layers import Dense, Embedding | |
from keras.layers import LSTM |
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 time | |
import numpy as np | |
import threading | |
import tensorflow as tf | |
from tensorflow.python.client import timeline | |
def test_queue(): |
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
# We must calculate the mean of each gradient. Note that this is the | |
# synchronization point across all towers. | |
grads_and_vars = average_gradients(t_grads) | |
# Optionally perform gradient clipping | |
if config.max_norm_gradient > 0: | |
grads, variables = zip(*grads_and_vars) | |
grads_clipped, _ = tf.clip_by_global_norm(grads, clip_norm=config.max_norm_gradient) | |
grads_and_vars = zip(grads_clipped, variables) |
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 os | |
import sys | |
import pickle | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.python.summary.event_accumulator import EventAccumulator | |
event_file = "/home/trunia1/dev/python/LSTMCounting/output/screens/" \ | |
"summaries/004_rmsprop_0.0005_lstm_512x2_grad_10_batch_128_dropkp_0.75/" \ |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<!-- The visual styling of our barchart is in this file --> | |
<link rel="stylesheet" href="barchart.css"> | |
<!-- This is the main container to which we append all chart elements --> | |
<svg class="chart"></svg> | |
<!-- We include D3 from an external location so that we don't have |
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
Show hidden characters
{ | |
"cmd": ["open", "-a", "Google Chrome", "$file", "--args", "--allow-file-access-from-files"] | |
} |
Table lists average classification times per image (milliseconds). Averages are computed over classification of 100 images from MS-COCO validation set. For the VGG networks a very high variance in classification times was observed, some images were classified fast while most of them took more processing time that other network configurations.