zhenxuan00 / triple-gan Goto Github PK
View Code? Open in Web Editor NEWSee Triple-GAN-V2 in PyTorch: https://github.com/taufikxu/Triple-GAN
See Triple-GAN-V2 in PyTorch: https://github.com/taufikxu/Triple-GAN
Hello,
I am wondering is there any other implementation in other languages like PyTorch or Tensorflow?
I try to run your code on the MNIST dataset, however I get a strange error as soon as the pre-training has finished. I really appreciate any guidance. Thanks!
The error is as follows:
Traceback (most recent call last):
File "x2y_yz2x_xy2p_ssl_mnist.py", line 462, in
cl_b = train_batch_cla(x_labelled[from_l_c:to_l_c], y_labelled[from_l_c:to_l_c], sample_y, p_u[from_u_c:to_u_c], alpha_cla_g, lr, alpha_unlabeled_entropy, alpha_average)
File "/home/mehdi/anaconda3/envs/python2/lib/python2.7/site-packages/theano/compile/function_module.py", line 871, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/mehdi/anaconda3/envs/python2/lib/python2.7/site-packages/theano/gof/link.py", line 314, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/mehdi/anaconda3/envs/python2/lib/python2.7/site-packages/theano/compile/function_module.py", line 859, in call
outputs = self.fn()
ValueError: GpuElemwise. Input dimension mis-match. Input 1 (indices start at 0) has shape[0] == 1, but the output's size on that axis is 100.
Apply node that caused the error: GpuElemwise{Composite{((((i0 * i1) + ((i2 * i3 * i4) / i5)) + ((i2 * i6 * i3 * i7) / (i5 * i8))) + i9)},no_inplace}(GpuElemwise{Composite{Cast{float32}(EQ(i0, i1))},no_inplace}.0, GpuDimShuffle{0,x}.0, CudaNdarrayConstant{[[-1.]]}, GpuDimShuffle{x,x}.0, GpuElemwise{log,no_inplace}.0, GpuDimShuffle{x,x}.0, GpuElemwise{Composite{Cast{float32}(AND(GE(i0, i1), LE(i0, i2)))},no_inplace}.0, GpuSoftmaxWithBias.0, GpuElemwise{clip,no_inplace}.0, GpuElemwise{Composite{((i0 * (i1 / i2)) / i3)},no_inplace}.0)
Toposort index: 1145
Inputs types: [CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, col), CudaNdarrayType(float32, (True, True)), CudaNdarrayType(float32, (True, True)), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, (True, True)), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, row)]
Inputs shapes: [(100, 10), (1, 1), (1, 1), (1, 1), (100, 10), (1, 1), (100, 10), (100, 10), (100, 10), (1, 10)]
Inputs strides: [(10, 1), (0, 0), (0, 0), (0, 0), (10, 1), (0, 0), (10, 1), (10, 1), (10, 1), (0, 1)]
Inputs values: ['not shown', CudaNdarray([[ 0.41114426]]), CudaNdarray([[-1.]]), CudaNdarray([[ 0.30000001]]), 'not shown', CudaNdarray([[ 100.]]), 'not shown', 'not shown', 'not shown', 'not shown']
Outputs clients: [[GpuDimShuffle{0,1,x,x}(GpuElemwise{Composite{((((i0 * i1) + ((i2 * i3 * i4) / i5)) + ((i2 * i6 * i3 * i7) / (i5 * i8))) + i9)},no_inplace}.0)]]
HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
Hi,
@zhenxuan00 @taufikxu
Thanks for your codes! When I ran the code, it seems no path library in python. (in checkpoints.py) How can I solve it? Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.