1,506 questions
0
votes
0
answers
35
views
AutoEncoder Reconstruction error is not decreasing while training data increse
I'm using an AE to compress an 58 dimensional data into 8 dimension. I have used the same architect of AE with different number of data points. All the data points are independent to each other and ...
0
votes
1
answer
128
views
CNN Autoencoder takes a very long time to train
I have been training a CNN Autoencoder on binary images (pixels are either 0 or 1) of size 64x64. The model is shown below:
import torch
import torch.nn as nn
import torch.nn.functional as F
class ...
1
vote
1
answer
92
views
LogVar layer of a VAE only returns zeros
I'm building a Variational auto encoder (VAE) with tfjs.
For now I'm only exploring with the fashionMNIST dataset and a simple model as follows:
input layer (28*28*1)
flatten
intermediate_1 (dense 50 ...
0
votes
0
answers
94
views
Autoencoder for multi-label classification task
I'm working on a multi-label classification problem using an autoencoder-based neural network built in PyTorch. The overall idea of my approach is as follows:
I load my dataset from a CSV file, ...
0
votes
1
answer
81
views
gradient tape for custom loss function
I'm currently working with an autoencoder in hopes to test its accuracy vs pca. My tutor asked me to add a custom loss function that involves the derivatives of the decoder output with respect to the ...
0
votes
0
answers
57
views
Pytorch LSTM-VAE not able to learn
I have some problem to make a LSTM-VAE for anomalies detection on multivariate signals (no constant duration). I found some informations in this forum and original papers to apply good practices. Even,...
0
votes
0
answers
54
views
Is it Possible to feed Embeddings generate by BERT to a LSTM based autoencoder to get the latent space?
I've just learn about how BERT produce embeddings. I might not understand it fully.
I was thinking of doing a project of leveraging those embeddings and feed it to an autoencoder to generate latent ...
0
votes
1
answer
47
views
LSTM autoencoder very poor results
I am working on blockchain transaction anomaly detection system and testing various models. Currently I am stuck on a LSTM autoencoder. I have preprocessed transaction data from ethereum network (used ...
0
votes
0
answers
10
views
Facing ResourceExhaustedError while training an autoencoder using k-fold cross validation
I'm trying to train an stacked denoising autoencoder. Also, since I have a small data set, I implement 10-fold cross validation to find the best hyperprameters. In every fold I build a new model and ...
0
votes
0
answers
33
views
VAE with Gumbel softmax on MNIST dataset
What could be the issue of kl loss going to 0? reconstruction loss is small, but every image is the same, and does not represent any digit.
Here is my encoder/decoder architecture I used, I think the ...
-1
votes
1
answer
46
views
How do I display the images generated by an autoencoder?
I created an autoencoder using python, with no errors. However, I do not know the code for how do display the generated images from the autoencoder. The code of the autoencoder is shown below:
import ...
1
vote
1
answer
84
views
How to implement an autoencoder model as PMML?
suppose we have the following model:
how can we build such a model and export it as PMML file?
is PMML capable to encode such model structure?
what are the necessary component in PMML to generate N ...
1
vote
1
answer
2k
views
The layer sequential has never been called and thus has no defined input error when trying to extract layers from sequential model
I am trying to extract the layers from a sequential model to build an autoencoder. I trained the model on some data but when I try to get model.input from my model I get an error saying that it has ...
0
votes
1
answer
35
views
Test step of VAE returns only 0s
I'm jumping back into a project I stopped working on last year (mostly). I had already encountered this issue, and this answer solved it back then. I am currently running basically the exact script ...
1
vote
0
answers
79
views
How to implement an Autoencoder for a binary dataset?
I was asked to create an Autoencoder that reconstructs the binary CSV file (decode).
I implemented one based on the MNIST example from geeksforgeeks. But I am very uncertain about the correctness, ...
-1
votes
1
answer
45
views
Recreating Text Embeddings From An Example Dataset
I have a list of sentences, and a list of their ideal embeddings on a 25-dimensional vector. I am trying to use a neural network to generate new encodings, but I am struggling. While the model runs ...
4
votes
0
answers
432
views
Workaround for removal of add_loss()
I'm working through a Keras/Tensorflow course that uses Keras 2 to build a variational autoencoder and I'm trying to get it working in Keras 3. I've managed to overcome a lot of issues but I'm stuck ...
0
votes
0
answers
122
views
Convolutional Variational Autoencoder
I'm creating a Convolutional Variational Autoencoder with Tensorflow in Python code, with some images I created myself (64x64 pixels).
My problem is, that if I use anything else than Binary ...
1
vote
1
answer
141
views
PyG graph autoencoder loss is frozen, possible Data object assembly issue
I'm trying to use Graph Autoencoder on a custom PyG Data object, but when I attempt to train it, the loss, AUC and AP do not change. The exact same autoencoder works when using PyTorch Geometric's ...
0
votes
0
answers
41
views
Input mismatch in dense layer
I am using this autoencoder model to detect anomaly.
class AnomalyDetector(Model):
def __init__(self):
super(AnomalyDetector, self).__init__()
self.encoder = tf.keras.Sequential([
...
3
votes
1
answer
154
views
Autoencoders and Polar Coordinates
Can an autoencoder learn the transformation into polar coordinates? If a set of 2D data lies approximately on a circle, there is a lower-dimensional manifold, parameterized by the angle, that ...
0
votes
0
answers
35
views
Correct shape and structure of Input Data for Autoencoder
i am trying to build my first Autoencoder for anomaly detection and i dont really know, how the Input Data has to be shaped in order to train the Model. I`ll give you Information about the Data and i ...
1
vote
0
answers
63
views
RuntimeError: shape '[1, 13, 13]' is invalid for input of size 13
I use LSTM-Autoencoder, took the model by this guy https://colab.research.google.com/drive/1_J2MrBSvsJfOcVmYAN2-WSp36BtsFZCa#scrollTo=vgUChGd_A-Bv,
for anomaly detection in time series
and got problem ...
1
vote
1
answer
626
views
Why does the encoder output latent variable shape of AutoencoderKL differ from the decoder input latent variable shape?
from diffusers import AutoencoderKL
import torch
from PIL import Image
from torchvision import transforms
vae = AutoencoderKL.from_pretrained("../model")
image = Image.open("../...
1
vote
0
answers
43
views
Incompatible shape Keras Autoencoder
I'm relatively new and am trying to build an autoencoder for anomaly detection on an unlabelled dataset that only contains categorical columns.
The error I get is:
Incompatible shapes: [64,1,5346] vs. ...
1
vote
1
answer
47
views
Why not use the anomaly datasets to train an autoencoder?
When using autoencoders for detecting network anomalies, why not train them using anomaly datasets? Reconstruction errors smaller than a threshold could signify anomalies, while those larger than the ...
0
votes
0
answers
57
views
Autograd returning None
I am trying to create a Contractive Autoencoder, and I read in a couple of papers that the main idea is to use the norm of the Jacobian of the encoder's output with respect to its inputs.
In other ...
0
votes
1
answer
96
views
Reproducible Training of an autoencoder in Tensorflow
I tried to implement an autoencoder-based anomaly detector finding anomalies in the dataset KDDTrain+. This is actually a pretty straight forward implementation. Unfortunately I failed in implementing ...
1
vote
1
answer
918
views
Encoder-Decoder with Huggingface Models
I want to create an Encoder-Decoder Model using the following structure:
Bert-base-uncased for encoding the input (https://huggingface.co/google-bert/bert-base-uncased)
Linear layer for connecting ...
0
votes
0
answers
60
views
Optimal autoencoder model for picture anomaly detection
I'm training an autoencoder to detect anomalies among pictures based on the decoder error value. I tried out different ways of image preprocessing, NN architectures, losses, activation functions, ...
0
votes
1
answer
64
views
Autoencoder shaping issue
I am having an issue with my autoencoder as I am shaping the ouput incorrectly. Currently the autoencoder is coded lke this.
I Got This Error :
ValueError: Dimensions must be equal, but are 2000 and ...
1
vote
1
answer
324
views
autoencoder.fit doesnt work becaue of a ValueError
I don't understand what my problem is. It should work, if only because its the standard autoenoder from the tensorflow documentation.
this is the error
line 64, in call
decoded = self.decoder(...
0
votes
0
answers
61
views
Custom Loss Function with Principal Component Angle Calculation in PyTorch Not Differentiable?
Approach: I wrote a custom loss function in PyTorch that compares the angular difference between the original (input) and reconstructed images based on their first principal component axes. This ...
0
votes
0
answers
61
views
Pytorch input mismatch could be processed during the forward pass
I don't understand why the mismatch of the input size and the pytorch linear layer still could be processed during the forward pass
I tried my AE model with pytorch, the following is the model. I don'...
0
votes
2
answers
804
views
I cannot put PyTorch model to device (.to(device))
So I was writing my first ever autoencoder, here is the code (it can be a little bit goofy, but I believe I written all of it right):
class Autoencoder(nn.Module):
def __init__(self):
...
0
votes
0
answers
69
views
Weigh the losses for Supervised VAE Classifier
I am working in the field of audio classification.
Recently I have been trying to use Supervised VAE Classifier.
Here is the architecture I am using:
class VAE(nn.Module):
def __init__(self, ...
1
vote
0
answers
186
views
How to train auto encoder with noise
I have an auto encoder with 2 encoder blocks and one concatenation block and 1 decoder block. the reconstruction works fine for my simulated data with 0 added noise. Even if the Gaussian noise with a ...
-2
votes
1
answer
156
views
PyTorch correct implementation of classification on an autoencoder [closed]
EDIT: embarrassingly my error was shuffling the data only and not the labels.
I was given an assignment to create an lstm autoEncoder in pytorch to reconstruct mnist images.
next the assignment asked ...
1
vote
1
answer
1k
views
Feature Importance of a Pytorch AutoEncoder [closed]
I need to get from my Pytorch AutoEncoder the importance it gives to each input variable. I am working with a tabular data set, no images.
My AutoEncoder is as follows:
class AE(torch.nn.Module):
...
1
vote
1
answer
46
views
train row encoder and column encoder in Tensorflow
I am trying to create a custom neural network that has 2 encoders and one decoder. The row encoder takes in the input of size eg: 30x40 and the column encoder is supposed to take the same data in ...
0
votes
1
answer
410
views
Autoencoder with nn.Sequential
i wrote this code, in order to implement an autoencoder with nn.sequential module, but i have an error:
latent_dims=4
class Encoder(nn.Module):
def __init__(self):
super().__init__()
...
1
vote
0
answers
210
views
Training VAE on data from simple multivariate Gaussian leads to collapsed reconstructed distribution
I'm very new to VAEs, and trying to familiarise myself by first considering a simple data set sampled from a 3d Gaussian distribution with covariance [[1, 0.5, 0.2], [0.5, 1, 0.3], [0.2, 0.3, 1]] and ...
0
votes
1
answer
94
views
Pytorch 2D CNN with unlabeled training data from set of 2d numpy arrays: potential problem with batch size or shapes
I have created a custom dataset to load 2d numpy array data to autoencode with a CNN. I believe the structure of the dataset and resulting batches/tensor shapes are correct. I also checked the shapes ...
-1
votes
1
answer
309
views
Strange names in Javascript code - how do I decode it?
I have some JS code of 1000 lines, I found it on the internet, it is some audio player plugin. The problem is that it's not clear. Because all names of functions and variables have incomprehensible ...
1
vote
0
answers
49
views
How can I predict a vector using Varational AutoEncoder?
I found this code, and I did not understand. I want train my model to find the value of Y but I wont put Y as input. Like I want to make the learn (X,Y)
but after learning use X to find Y
What should ...
0
votes
1
answer
179
views
Is it possible to avoid encoding padding when creating a sequence data encoder in PyTorch?
I am attempting to make an observation history encoder, where my goal is for a model that takes in as input a variable length sequence of dimension [Time, Batch, Features] (where sequences are padded ...
1
vote
0
answers
26
views
The results of the autoencoder code's functional API (my implemention) are different from the results of Sequential (example code in the textbook)
In ch17 of the textbook 'hands on machine learning' by Aurélien Geron, the results of the functional API of the autoencoder code (which I implemented myself) are different from the results of ...
0
votes
1
answer
182
views
Test_step returns no loss values
I have been working for some time with a VAE model based off of thisexample, working with binary data so it has been modified.
Recently, the computing cluster I was working on suffered a fault and my ...
0
votes
1
answer
52
views
Dimension error in Denoising AutoEncoder model Dimensions must be equal, but are 9252 and 129 for with input shapes: [?,9252,32], [?,129,32]
I am trying to build an Autoencoder model using TensorFlow. The input data shape: (339, 129, 32)
The model architecture is as follows:
input_data = tf.keras.layers.Input(shape=train_sample.shape[1:])
...
0
votes
1
answer
52
views
Accessing latent space of submodel of larger model
I have this autoencoder class
class SimpleAE(tf.keras.Model):
def __init__(self, latent_dim, bypass = False, trainable=True, **kwargs):
super(SimpleAE,self).__init__(**kwargs)
self.latent_dim =...