【发布时间】:2021-01-18 04:46:23
【问题描述】:
我想将 MNIST 数字数据集从 (28, 28) 重塑为 (32, 32)。一种方法是对数据进行插值。我使用自定义径向基函数进行插值。怎么办??
这是RBF函数
def RBF(x, c, s):
return np.exp(-np.sum((x-c)**2, axis=1)/(2*s**2))
其中 x 是实际值,c 是中心(假设为均值),s 是标准差。
这是我从 tensorflow 加载数据的方式
import tensorflow as tf
data = tf.contrib.learn.datasets.mnist.load_mnist()
【问题讨论】:
标签: python tensorflow scipy mnist