(self, batch_size, image_height, image_width)
| 168 | return onnx_opt_graph |
| 169 | |
| 170 | def check_dims(self, batch_size, image_height, image_width): |
| 171 | assert batch_size >= self.min_batch and batch_size <= self.max_batch |
| 172 | assert image_height % 8 == 0 or image_width % 8 == 0 |
| 173 | latent_height = image_height // 8 |
| 174 | latent_width = image_width // 8 |
| 175 | assert latent_height >= self.min_latent_shape and latent_height <= self.max_latent_shape |
| 176 | assert latent_width >= self.min_latent_shape and latent_width <= self.max_latent_shape |
| 177 | return (latent_height, latent_width) |
| 178 | |
| 179 | def get_minmax_dims(self, batch_size, image_height, image_width, static_batch, static_shape): |
| 180 | min_batch = batch_size if static_batch else self.min_batch |
no outgoing calls
no test coverage detected