Skip to content

Instantly share code, notes, and snippets.

@tkanmae
Last active September 12, 2018 03:12
Show Gist options
  • Save tkanmae/93d0e1c152c6a64c0877a67340aa9392 to your computer and use it in GitHub Desktop.
Save tkanmae/93d0e1c152c6a64c0877a67340aa9392 to your computer and use it in GitHub Desktop.
Approximate_Truncated_Normal_Distribution
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Approximate Truncate Normal Distribution"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import tensorflow as tf"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"n = 10000"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"x_np = np.fmod(np.random.randn(n), 2)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"x_node = tf.truncated_normal([10000])"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"with tf.Session() as sess:\n",
" x_tf = sess.run(x_node)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAD8CAYAAABgmUMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3Xd4FWXe//H3NwUSOoQWUghdegtIE1BBigp2UNdVLDzW1XVdVx/c1XWf3+qqa1tdFRUFV0GUIihFsCOIEHrvJaGHElpIOffvj3PYjWyABJIzJ8nndV3nypmZO2e+k4F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OLzAFRylmZpWACcBDzrmMvMuc/0+NUnFJnZldAexxzqV4XUuQReA/nfGGc649cBT/KYx/K2X7uTowGH9g1gMqAv09LcojXu9XBYdfGpCQZzo+MK/EMrNI/KHxoXNuYmD2bjOLDSyPBfYE5p9u+0vKz6U7MMjMtgDj8J+uegWoZmYnR7nMW/u/tyuwvCqQTsnZ3pNSgVTn3PzA9Kf4g6S07uc+wGbn3F7nXDYwEf++L+37+aSi2q9pgfenzi8wBYffAqBJ4OqMcvg70qZ4XNM5C1wh8S6w2jn3Yp5FU4CTV1bcir/v4+T8XweuzugCHAocEs8ELjOz6oG/9i4LzAspzrnHnXPxzrkk/Pvua+fczcA3wHWBZqdu78mfw3WB9i4wf2jgapwGQBP8nYghyTm3C9huZs0Csy4FVlFK9zP+U1RdzKxC4N/4ye0t1fs5jyLZr4FlGWbWJfBz/HWezyoYrzuAQuWF/8qEdfivsBjhdT3nuS098B/GLgOWBF4D8Z/f/QpYD8wGagTaG/B6YNuXA8l5Put2YEPgNczrbSvAtvfmP1dVNcT/C2ED8AlQPjA/KjC9IbC8YZ7vHxH4OaylkFeaeLS97YCFgX09Gf/VM6V2PwN/BtYAK4AP8F8ZVer2MzAWfz9ONv4jyzuKcr8CyYGf4UbgNU65wOJsL905LiIihaJTVSIiUigKDhERKRQFh4iIFIqCQ0RECkXBISIihaLgEBGRQlFwiIhIoSg4RESkUP4/BuL0RCxEzSwAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots()\n",
"ax.plot(np.sort(x_tf), label='TF')\n",
"ax.plot(np.sort(x_np))\n",
"ax.legend()\n",
"ax.set_ylabel('Value');"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEKCAYAAAAcgp5RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAA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xXgPsmeYiY17jmtSG+36ytt9msBO4PvUkuQwYr2mqaxhJPzVxb0XSpWQ5sOwvbNIxbwcej4g/naZaeedsvu8+z/UFHCJrxzqQXhM9IX4a2FVT72qyO9tPkjVhlB3XL5G1qb0IPAN8dXJcZL0nHk6vR5slrgadryXAbuC7wD8B56fyfuDzaflngIPpfB0ENpQYz2t+fuD3yC4oADqAL6Tfv/8HvKnsc5Qzrj9Mv0sPA18H3jpPcd0FHAVeTr9fG4BfBX41bRfZBERPpn+7aXuizXNcH6s5X/uAn5mnuNaQ3Z97pCZ3XT1f58xPxpqZVVzLNd2YmVkxTvRmZhXnRG9mVnFO9GZmFedEb2ZWcU701hbSyIG/MKnsk5JuO8s+p8qPzKx8TvTWLu4ie+Co1nWp3KzSnOitXdwHvDc9YToxsNRPA9+StFvSQ8rmCXjN6JBpDPMv1ax/Lg3DgaRLJP1zGqTuq/MxQqNZUU701hYi4ntkT7RelYquA+4FTgO/FBEXA+8B/iTv8MNp7JI/B66JiEuAO4Dfr3fsZnPVlIOamZVkovlmR3rfQPbY+R9Iejfwn2TDwi4lGzp5Jm8B3k42CilkE4U0fDwXs8mc6K2d7AA2pynafjwi9qcmmB7gkoh4WdIw2bg2tc7w6r9+J7YLeDQi3lVu2GZz46YbaxsRcYps4K87eOUmbCdwPCX59wBvnGLXp4G3KZs3tgtYm8qfAHokvQuyppxGTGRhNhNf0Vu7uQvYzis9cO4E/kHSQWAI+M7kHSLiiKR7yYaU/nfgW6n8JUnXALdK6iT7//RnZKMjmjUNj15pZlZxbroxM6s4J3ozs4pzojczqzgnejOzinOiNzOrOCd6M7OKc6I3M6s4J3ozs4r7/2+/G61DhLE6AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots()\n",
"ax.hist(x_tf, bins=25, histtype='step', label='TF')\n",
"ax.hist(x_np, bins=25, histtype='step')\n",
"ax.legend()\n",
"ax.set_xlabel('Value');"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment