MCPcopy Index your code
hub / github.com/tdeboissiere/DeepLearningImplementations / sample_cat

Function sample_cat

InfoGAN/src/utils/data_utils.py:71–77  ·  view source on GitHub ↗
(batch_size, cat_dim)

Source from the content-addressed store, hash-verified

69
70
71def sample_cat(batch_size, cat_dim):
72
73 y = np.zeros((batch_size, cat_dim[0]), dtype="float32")
74 random_y = np.random.randint(0, cat_dim[0], size=batch_size)
75 y[np.arange(batch_size), random_y] = 1
76
77 return y
78
79
80def get_disc_batch(X_real_batch, generator_model, batch_counter, batch_size, cat_dim, cont_dim, noise_dim,

Callers 3

get_disc_batchFunction · 0.85
get_gen_batchFunction · 0.85
plot_generated_batchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected