andersbll / autoencoding_beyond_pixels

Generative image model with learned similarity measures
MIT License
436 stars 96 forks source link

Supervised training #3

Open tseckin opened 8 years ago

tseckin commented 8 years ago

I wonder if it is enough to specify "supervised=True" of feeds method for supervised learning?

I set supervised parameter to true for cifar but I am getting an error. (I also tried lfw and getting the same error)

Example for cifar:

    train_feed, test_feed, _ = dataset.cifar.feeds(
        split='test', batch_size=batch_size, epoch_size=epoch_size, supervised=True
    )

Here is the error of cifar_aegan:

INFO     Downloading http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
INFO     Unpacking datasets/cifar10/cifar-10-python.tar.gz
________________________________________________________________________________
[Memory] Calling dataset.cifar.arrays-alias...
arrays-alias('test')
__________________________________________________arrays-alias - 646.6s, 10.8min
Reconstruction error at layer #6: Convolution
experiment_name: cifar_nhidden256_reconganweight1.0e-05_recondepth6_nodisaerecon
Traceback (most recent call last):
  File "cifar_aegan.py", line 39, in <module>
    run()
  File "cifar_aegan.py", line 29, in run
    model, output_dir, train_feed, test_feed, n_epochs=200, lr_start=0.025
  File "/autoencoding_beyond_pixels/aegan.py", line 80, in train
    margin=gan_margin)
  File "/autoencoding_beyond_pixels/model/aegan.py", line 165, in __init__
    super(GradientDescent, self).__init__(model, feed, learn_rule)
  File "build/bdist.linux-x86_64/egg/deeppy/train/gradient_descent.py", line 18, in __init__
  File "/autoencoding_beyond_pixels/model/aegan.py", line 171, in reset
    self.model.setup(*self.feed.shapes)
TypeError: setup() takes exactly 2 arguments (3 given)

Is it a bug or am I missing something for supervised learning?

andersbll commented 8 years ago

Yes, you are missing something. I haven't included the code for the conditional model. I have now made an implementation available. I hope this is helpful. :)

terrencew commented 7 years ago

It seems this implementation link is not available now. Would you please give an available one?