import tensorflow as tf
import numpy as np
from libs.utils import weight_variable, bias_variable, montage_batch
# %%
def VAE(input_shape=[None, 784],
n_components_encoder=2048,
n_components_decoder=2048,
n_hidden=2,
debug=False):
# %%
# Input placeholder
...
分类目录归档:TensorFlow
tensorflow教程源码-构建深度卷积自动编码器
import tensorflow as tf
import numpy as np
import math
from libs.activations import lrelu
from libs.utils import corrupt
# %%
def autoencoder(input_shape=[None, 784],
n_filters=[1, 10, 10, 10],
filter_sizes=[3, 3, 3, 3],
corruption=False):
&qu...
tensorflow教程源码-建立深度剩余网络
# %%
import tensorflow as tf
from libs.connections import conv2d, linear
from collections import namedtuple
from math import sqrt
# %%
def residual_network(x, n_outputs,
activation=tf.nn.relu):
"""Builds a residual network.
Parameters
----------
...
tensorflow教程源码-构建深度去噪自动编码器
import tensorflow as tf
import numpy as np
import math
from libs.utils import corrupt
# %%
def autoencoder(dimensions=[784, 512, 256, 64]):
"""Build a deep denoising autoencoder w/ tied weights.
Parameters
----------
dimensions : list, optional
The number...
tensorflow教程源码-构建一个带有绑定权重的深度自动编码器
# %% Imports
import tensorflow as tf
import numpy as np
import math
# %% Autoencoder definition
def autoencoder(dimensions=[784, 512, 256, 64]):
"""Build a deep autoencoder w/ tied weights.
Parameters
----------
dimensions : list, optional
The number of n...
tensorflow教程源码-构建深度卷积神经网络
# %% Imports
import tensorflow as tf
import tensorflow.examples.tutorials.mnist.input_data as input_data
from libs.utils import *
import matplotlib.pyplot as plt
# %% Setup input to the network and true output label. These are
# simply placeholders which we'll fill in later.
mnist = input_...
tensorflow教程源码-构建具有批量归一化和泄漏整流器的深度卷积神经网络
# %%
import tensorflow as tf
from libs.batch_norm import batch_norm
from libs.activations import lrelu
from libs.connections import conv2d, linear
from libs.datasets import MNIST
# %% Setup input to the network and true output label. These are
# simply placeholders which we'll fill in late...
tensorflow教程源码-使用单层神经网络执行逻辑回归
# pip3 install --upgrade
# https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py3-none-any.whl
# %%
import tensorflow as tf
import tensorflow.examples.tutorials.mnist.input_data as input_data
import numpy as np
import matplotlib.pyplot as plt
# %%
# get the classic mnist dataset
# o...
tensorflow教程源码-使用单一因子和偏差执行回归
# %% imports
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
# %% Let's create some toy data
plt.ion()
n_observations = 100
fig, ax = plt.subplots(1, 1)
xs = np.linspace(-3, 3, n_observations)
ys = np.sin(xs) + np.random.uniform(-0.5, 0.5, n_observations)
ax.scatt...
tensorflow教程源码-使用多项式因子执行回归
# %% Imports
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
# %% Let's create some toy data
plt.ion()
n_observations = 100
fig, ax = plt.subplots(1, 1)
xs = np.linspace(-3, 3, n_observations)
ys = np.sin(xs) + np.random.uniform(-0.5, 0.5, n_observations)
ax.scatt...