1 Star 0 Fork 0

deeplearningrepos/dcgan-completion.tensorflow

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
simple-distributions.py 1002 Bytes
一键复制 编辑 原始数据 按行查看 历史
Brandon Amos 提交于 2016-08-09 22:08 +08:00 . Add image completion.
#!/usr/bin/env python3
import numpy as np
from scipy.stats import norm
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
plt.style.use('bmh')
import matplotlib.mlab as mlab
np.random.seed(0)
X = np.arange(-3, 3, 0.001)
Y = norm.pdf(X, 0, 1)
fig = plt.figure()
plt.plot(X, Y)
plt.tight_layout()
plt.savefig("normal-pdf.png")
nSamples = 35
X = np.random.normal(0, 1, nSamples)
Y = np.zeros(nSamples)
fig = plt.figure(figsize=(7,3))
plt.scatter(X, Y, color='k')
plt.xlim((-3,3))
frame = plt.gca()
frame.axes.get_yaxis().set_visible(False)
plt.savefig("normal-samples.png")
delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-3.0, 3.0, delta)
X, Y = np.meshgrid(x, y)
Z = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
plt.figure()
CS = plt.contour(X, Y, Z)
plt.clabel(CS, inline=1, fontsize=10)
nSamples = 200
mean = [0, 0]
cov = [[1,0], [0,1]]
X, Y = np.random.multivariate_normal(mean, cov, nSamples).T
plt.scatter(X, Y, color='k')
plt.savefig("normal-2d.png")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deeplearningrepos/dcgan-completion.tensorflow.git
git@gitee.com:deeplearningrepos/dcgan-completion.tensorflow.git
deeplearningrepos
dcgan-completion.tensorflow
dcgan-completion.tensorflow
master

搜索帮助