Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GAN and AutoEncoder #522

Closed
Kantshun opened this issue Sep 24, 2019 · 5 comments
Closed

GAN and AutoEncoder #522

Kantshun opened this issue Sep 24, 2019 · 5 comments
Labels
feature New feature or request

Comments

@Kantshun
Copy link

Is there anyway I can implement GAN and AutoEncoder with ludwig? could anyone provide some examples? I have no idea how I can access the outputs of middle layers nor fixed the weights of some layers while training the model. It seems that ludwig is not friendly to neither GAN nor AutoEncoder, which are quite important in some applications.

@msaisumanth
Copy link
Contributor

@Kantshun I don't think there are easy ways to do either GAN or autoencoder with Ludwig as things are right now.

@msaisumanth msaisumanth added the feature New feature or request label Sep 25, 2019
@w4nderlust
Copy link
Collaborator

@Kantshun for GANs at the moment there is no specific support, but regarding autoencoders, it depends on the type of data you want to autoencoder: any datatype that is supported for both input and output features. The only caveat is that currently Ludwig doesn't support multiple features to be defined with the same column name, so you would have to copy a column, change its name and then write a model accordingly.
For instance, for text the data it would look like:

text_input,text_output
hello world,hello world
my name is,my name is
...

And the model definition would look like:

input_features:
  -
    name: text_input
    type: text
output_features:
  -
    name: text_output
    type: text

Hope this help you.

@Kantshun
Copy link
Author

Kantshun commented Oct 5, 2019

@w4nderlust your method can train an autoencoder, but that's not enough. in my application, i need to use encoder and decoder separately, I have no idea how to split a ludwig model into two sub model that represent encoder and decoder.

@w4nderlust
Copy link
Collaborator

@Kantshun I understand the need. For the encoder part, you can use the collect activations command for obtaining the latent representations, but at the moment there is no way to actually provide a latent representation for the decoder to perform the generation.
Given TensorFlow's fixed graph structure is currently a bit difficult to change Ludwig to accomodate your usecase, but once we move to TensorFlow 2 it will become much easier and we will try to address this usecase.
Consider it may take a little while for that to happen as we have currently other priorities for v0.3, so my best estimate at the moment is that it will happen by v0.4.

@FredS1000
Copy link

Hey,
just wanted to ask, if there is already a solution. I have an imbalanced dataset of audio signals with two classes and would like to try an autoencoder with an adjustable threshold to do anomaly detection on the larger part of the datset...

Thanks

@mhabedank mhabedank closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants