(self)
| 244 | """A test `Module`.""" |
| 245 | |
| 246 | def forward(self): |
| 247 | # This logs a 7 row table with two columns where each cell contains a 16 x 16 color |
| 248 | # image. |
| 249 | # Shape: num examples x table columns x image height x image width x channels. |
| 250 | images = jax.numpy.ones((7, 2, 16, 16, 3)) |
| 251 | |
| 252 | def create_table(images: np.ndarray): |
| 253 | return wandb.Table( |
| 254 | ["output", "target"], [[wandb.Image(img) for img in row] for row in images] |
| 255 | ) |
| 256 | |
| 257 | self.add_summary("my_table", CallbackSummary(create_table, images)) |
| 258 | |
| 259 | module = _TestModule.default_config().set(name="tmp").instantiate(parent=None) |
| 260 |
no test coverage detected