(batch_size, cat_dim)
| 69 | |
| 70 | |
| 71 | def 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 | |
| 80 | def get_disc_batch(X_real_batch, generator_model, batch_counter, batch_size, cat_dim, cont_dim, noise_dim, |
no outgoing calls
no test coverage detected