自动编码器,自动关联器或空竹网络是用于学习有效编码的人工神经网络。因此,它是降维算法的一部分。
class wb_sampling extends tf.layers.Layer { constructor(config) { super(config); this.KL_weight = config.KL_weight; // weights the KL_loss compared to reconstruction loss. If KL_weiht==0, reconstruction loss is the only loss used if (this.KL_weight === undefined) { this.KL_weight=0.0001; // default } this.last_mu; this.last_logVar; // Adds KL loss this.addLoss(() => { const retour = tf.tidy(() => { let kl_loss; let z_log_var=this.last_logVar; let z_mean=this.last_mu; kl_loss = tf.scalar(1).add(z_log_var).sub(z_mean.square()).sub(z_log_var.exp()); kl_loss = tf.sum(kl_loss, -1); kl_loss = kl_loss.mul(tf.scalar(-0.5 * this.KL_weight)); return (tf.mean(kl_loss)); }); return (retour); }); // end of addLoss } // end of constructor computeOutputShape(inputShape) { return inputShape[0]; // same shape as mu } call(inputs, training) { return tf.tidy(() => { const [mu, logVar] = inputs; // store mu and logVar values to be used by the KL loss function this.last_mu=mu; // zMean this.last_logVar=logVar; // zLogVar const z = tf.tidy(() => { const batch = mu.shape[0]; const dim = mu.shape[1]; const epsilon = tf.randomNormal([batch, dim]); const half = tf.scalar(0.5); const temp = logVar.mul(half).exp().mul(epsilon); const sample = mu.add(temp); return sample; }); return z; }); } // end of call() static get className() { return 'wb_sampling'; } } // end of wb_sampling layer
到目前为止,我有这个代码,但我无法正常工作。我收到的错误,例如:valueError:通过类型“ kerastensor”的对象
我正在尝试构建一个用于异常检测的 LSTM Autoendoer。 但该模型似乎不适用于我的数据。 这是我用来训练的正常数据。 这是我使用的异常数据...
我们正在 CIFAR10 图像上训练 AE。我们使用了以下架构: 我们的AE类(nn.Module): def __init__(self, in_channels, z_channels): 超级(我们的AE,自我).__...
我使用 python 创建了一个自动编码器,没有错误。但是,我不知道如何显示自动编码器生成的图像的代码。自动编码器的代码如下所示: 小鬼...
层顺序从未被调用,因此在尝试从顺序模型中提取层时没有定义的输入错误
我正在尝试从顺序模型中提取层来构建自动编码器。我在一些数据上训练了模型,但是当我尝试从模型中获取 model.input 时,我收到一条错误消息,说它有......
我想创建一个深度学习模型(最好使用 Tensorflow/Keras)来进行图像异常检测。我所说的异常检测本质上是 OneClassSVM。 我已经尝试过 sklearn 的
目前我正在尝试构建一个自动编码器来检测时间序列数据中的异常。 我的方法基于本教程:https://keras.io/examples/timeseries/timeseries_anomaly_detectio...
假设我们有以下模型: 我们如何构建这样的模型并将其导出为 PMML 文件? PMML能够编码这样的模型结构吗? PMML 中生成 N 的必要组件是什么
假设我们有以下模型: 我的问题是(1)我们如何构建这样的模型并将其导出为 PMML 文件? (2) PMML 能够编码这样的模型结构吗?, (3) 必要的是什么
我只有来自实验的“正”类图像数据,任务是使用深度学习网络来训练它们。任何与上述类别稍有不同的东西都应该属于类别......
我正在跳回一个去年(大部分)停止工作的项目。我已经遇到过这个问题,这个答案当时就解决了。我目前正在运行基本上完全相同的脚本...
我正在使用 Autoencoder 开发异常检测模型(针对 PCB),我正在使用免费 GPU 开发 google Colab。所以作为第一步,我尝试构建我的自动编码器并可视化
R py_get_attr_impl(x, name,silent) 中的错误:AttributeError:模块“tensorflow”没有属性“placeholder”
我正在尝试从 R 中的 Tensorflow 实现自动编码器降维,在此示例中: 图书馆(暗红色) 库(张量流) 欺诈数据 <- read.csv("fraud_data") data_label <-
如何构建卷积自动编码器的解码器部分?假设我有这个 (输入 -> conv2d -> maxpool2d -> maxunpool2d -> convTranspose2d -> 输出): # CIFAR 图像形状 =...
我需要为这个网站做一个注册工具,我想要最快的访问这个网站,有人可以帮助我吗?
我需要为这个网站做一个注册工具,我想要最快的访问这个网站,有人可以帮助我吗? https://www.goethe.de/ins/vn/vi/sta/han/prf/gzb1.cfm 当人数较多时...
我有一个句子列表,以及它们在 25 维向量上的理想嵌入列表。我正在尝试使用神经网络生成新的编码,但我很挣扎。当模型运行时...