May 2019
Intermediate to advanced
272 pages
7h 19m
English
We will start with the imports and the global variables:
import numpy as npfrom functools import partialfrom keras.models import Modelfrom keras.layers import Inputfrom keras.optimizers import Adamfrom keras.layers.merge import _Mergefrom keras import backend as Kfrom models import (build_resnet_discriminator, build_resnet_generator)from tensorboardX import SummaryWriterfrom data_utils import get_data, iterate_minibatches, sample, log_textfrom train_utils import loss_gradient_penalty, loss_wasserstein, RandomWeightedAverageN_CRITIC_ITERS = 10GRADIENT_PENALTY_WEIGHT = 10GLOB_STR = "data/1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled/*"BATCH_SIZE = 0 # needed to compute ...
Read now
Unlock full access