upsampling convolution block
(inputs, factor=2, **kwargs)
| 67 | |
| 68 | # Upsampling Block |
| 69 | def upsampling(inputs, factor=2, **kwargs): |
| 70 | """ |
| 71 | upsampling convolution block |
| 72 | """ |
| 73 | out = layers.Conv2D(64 * (factor ** 2), 3, padding="same", **kwargs)(inputs) |
| 74 | out = tf.nn.depth_to_space(out, block_size=factor) |
| 75 | out = layers.Conv2D(64 * (factor ** 2), 3, padding="same", **kwargs)(out) |
| 76 | out = tf.nn.depth_to_space(out, block_size=factor) |
| 77 | return out |
| 78 | |
| 79 | def get_edsr_model(num_filters, num_of_residual_blocks): |
| 80 | """ |