MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / celeb

Function celeb

unsupervised_class3/dcgan_tf.py:505–539  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

503
504
505def celeb():
506 X = util.get_celeb()
507 # just loads a list of filenames, we will load them in dynamically
508 # because there are many
509 dim = 64
510 colors = 3
511
512 # for celeb
513 d_sizes = {
514 'conv_layers': [
515 (64, 5, 2, False),
516 (128, 5, 2, True),
517 (256, 5, 2, True),
518 (512, 5, 2, True)
519 ],
520 'dense_layers': [],
521 }
522 g_sizes = {
523 'z': 100,
524 'projection': 512,
525 'bn_after_project': True,
526 'conv_layers': [
527 (256, 5, 2, True),
528 (128, 5, 2, True),
529 (64, 5, 2, True),
530 (colors, 5, 2, False)
531 ],
532 'dense_layers': [],
533 'output_activation': tf.tanh,
534 }
535
536 # setup gan
537 # note: assume square images, so only need 1 dim
538 gan = DCGAN(dim, colors, d_sizes, g_sizes)
539 gan.fit(X)
540
541
542def mnist():

Callers

nothing calls this directly

Calls 2

fitMethod · 0.95
DCGANClass · 0.70

Tested by

no test coverage detected