(name, x)
| 33 | use_gn = cfg.FPN.NORM == 'GN' |
| 34 | |
| 35 | def upsample2x(name, x): |
| 36 | try: |
| 37 | resize = tf.compat.v2.image.resize_images |
| 38 | with tf.name_scope(name): |
| 39 | shp2d = tf.shape(x)[2:] |
| 40 | x = tf.transpose(x, [0, 2, 3, 1]) |
| 41 | x = resize(x, shp2d * 2, 'nearest') |
| 42 | x = tf.transpose(x, [0, 3, 1, 2]) |
| 43 | return x |
| 44 | except AttributeError: |
| 45 | return FixedUnPooling( |
| 46 | name, x, 2, unpool_mat=np.ones((2, 2), dtype='float32'), |
| 47 | data_format='channels_first') |
| 48 | |
| 49 | with argscope(Conv2D, data_format='channels_first', |
| 50 | activation=tf.identity, use_bias=True, |
no test coverage detected
searching dependent graphs…