Git Product home page Git Product logo

gans's Introduction

gans

Various GANs for playing around

gans's People

Contributors

utkd avatar

Stargazers

 avatar LgxGeoGo avatar  avatar libo-huang (黄礼泊) avatar Raimundo Jiménez avatar  avatar Surbhi Mittal avatar Elloá B. Guedes avatar Danye Xu avatar 比你笨 avatar Tayfun karaderi avatar  avatar Moritz Salla avatar Aashutosh Soni avatar Yuchi Tian avatar Evam Kaushik avatar hyhy_JPN avatar  avatar  avatar Konstantin Georgiev avatar  avatar Tom Hammersley avatar  avatar Yifeng avatar Himansh Mulchandani avatar Yong Feng avatar Mohan S Acharya avatar Mukul Khanna avatar Brandon McCain avatar Lucas Ferreira da Silva avatar Chih-Yang Li avatar  avatar Shardul Parab avatar Mariam Mohamed Fawzy avatar Peter Morgan avatar

Watchers

James Cloos avatar  avatar Jehill Parikh avatar

gans's Issues

Unable to create a Session

Hello, when I try to run the codes to create the GAN model, I receive an error saying that I am unable to create a Session. Appreciate any help :)


InternalError Traceback (most recent call last)
in ()
3 disc_condition_input = Input(shape=(10,))
4
----> 5 discriminator, disc_out = get_discriminator(img_input, disc_condition_input)
6 discriminator.compile(optimizer=Adam(0.0002, 0.5), loss='binary_crossentropy', metrics=['accuracy'])
7

in get_discriminator(input_layer, condition_layer)
1 def get_discriminator(input_layer, condition_layer):
2 hid = Conv2D(128, kernel_size=3, strides=1, padding='same')(input_layer)
----> 3 hid = BatchNormalization(momentum=0.9)(hid)
4 hid = LeakyReLU(alpha=0.1)(hid)
5

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/engine/base_layer.py in call(self, inputs, **kwargs)
458 # Actually call the layer,
459 # collecting output(s), mask(s), and shape(s).
--> 460 output = self.call(inputs, **kwargs)
461 output_mask = self.compute_mask(inputs, previous_mask)
462

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/layers/normalization.py in call(self, inputs, training)
181 normed_training, mean, variance = K.normalize_batch_in_training(
182 inputs, self.gamma, self.beta, reduction_axes,
--> 183 epsilon=self.epsilon)
184
185 if K.backend() != 'cntk':

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in normalize_batch_in_training(x, gamma, beta, reduction_axes, epsilon)
1833 """
1834 if ndim(x) == 4 and list(reduction_axes) in [[0, 1, 2], [0, 2, 3]]:
-> 1835 if not _has_nchw_support() and list(reduction_axes) == [0, 2, 3]:
1836 return _broadcast_normalize_batch_in_training(x, gamma, beta,
1837 reduction_axes,

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in _has_nchw_support()
287 """
288 explicitly_on_cpu = _is_current_explicit_device('CPU')
--> 289 gpus_available = len(_get_available_gpus()) > 0
290 return (not explicitly_on_cpu and gpus_available)
291

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in _get_available_gpus()
273 global _LOCAL_DEVICES
274 if _LOCAL_DEVICES is None:
--> 275 _LOCAL_DEVICES = get_session().list_devices()
276 return [x.name for x in _LOCAL_DEVICES if x.device_type == 'GPU']
277

~/.virtualenvs/jlenv/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in get_session()
181 config = tf.ConfigProto(intra_op_parallelism_threads=num_thread,
182 allow_soft_placement=True)
--> 183 _SESSION = tf.Session(config=config)
184 session = _SESSION
185 if not _MANUAL_VAR_INIT:

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in init(self, target, graph, config)
1561
1562 """
-> 1563 super(Session, self).init(target, graph, config=config)
1564 # NOTE(mrry): Create these on first __enter__ to avoid a reference cycle.
1565 self._default_graph_context_manager = None

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in init(self, target, graph, config)
631 if self._created_with_new_api:
632 # pylint: disable=protected-access
--> 633 self._session = tf_session.TF_NewSession(self._graph._c_graph, opts)
634 # pylint: enable=protected-access
635 else:

InternalError: Failed to create session.

It cannot generate the images as you did when I reran it

I just ran this code on my gpu but did not get the similar images. actually the generated images are like random noise. And I also tried it on other dataset, but the accuracy of discriminator is always close to 0. I guess it is because of mode collapse, but you have used experience replay. I'm really confused now.

loss function

Hello, may I know why is the loss function binary_crossentropy instead of categorical_crossentropy?

NEED generate_random_labels()

Could you share def generate_random_labels()?

In cifar10cgan.ipynb, the function "generate_random_labels" is missing.

Thank you for your helpful ipynb!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.