我正在尝试通过使用来自同一repo here (which uses deconvolution)的其他示例来适应this example from the git repo.
我无法弄清楚哪里出了问题,但这似乎很基本.我们来了:
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
# Keras uses TensforFlow backend as default
from keras.layers import Input, Dense, Lambda, Flatten, Reshape
from keras.layers import Conv1D,UpSampling1D
from keras.models import Model
from keras import backend as K
from keras import metrics
from keras.datasets import mnist
# Input image dimensions
steps, original_dim = 1, 28*28 # Take care here since we are changing this according to the data
# Number of convolutional filters to use
filters = 64
# Convolution kernel size
num_conv = 6
# Set batch size
batch_size = 100
# Decoder output dimensionality
decOutput = 10
latent_dim = 20
intermediate_dim = 256
epsilon_std = 1.0
epochs = 5
x = Input(batch_shape=(batch_size,steps,original_dim))
# Play around with padding here, not sure what to go with.
conv_1 = Conv1D(1,
kernel_size=num_conv,
padding='same',