Skip to content

Instantly share code, notes, and snippets.

@lhlmgr
lhlmgr / norm_flow_eager.py
Created October 26, 2018 09:01
Graph-Mode vs. Eager-Mode comparison
#source: https://github.com/ericjang/normalizing-flows-tutorial/blob/master/nf_part1_intro.ipynb
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow_probability as tfp
import tensorflow.contrib.eager as tfe
import time
tf.enable_eager_execution()
def plot_mva():
# values max throughput
num_cliens = [12, 24, 30, 60, 90, 105]
respt = [2.7314, 5.159, 6.2694, 10.1468, 17.0647, 19.718]
tp = [ 0.9203, 1.9648, 2.271, 3.4444, 3.7277, 3.9695]
#values scalability client
tp2 = [662.3, 1272.4688 , 2175.675 , 2485.525 , 2857.2188 ,3005.2937 , 3334.4062]
rt2 = [ 1.9611 , 2.3867 , 3.9672 , 5.0036 , 5.5203 , 6.9196 , 10.8498]
num_cliens2 = [6, 12, 24, 30, 36, 42, 60]