mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-21 05:53:24 -07:00
upgrade to tf 2.4.0rc1
This commit is contained in:
parent
8b9b907682
commit
0eb7e06ac1
6 changed files with 23 additions and 59 deletions
|
@ -333,7 +333,17 @@ def depth_to_space(x, size):
|
|||
x = tf.reshape(x, (-1, oh, ow, oc, ))
|
||||
return x
|
||||
else:
|
||||
|
||||
b,c,h,w = x.shape.as_list()
|
||||
oh, ow = h * size, w * size
|
||||
oc = c // (size * size)
|
||||
|
||||
x = tf.reshape(x, (-1, size, size, oc, h, w, ) )
|
||||
x = tf.transpose(x, (0, 3, 4, 1, 5, 2))
|
||||
x = tf.reshape(x, (-1, oc, oh, ow))
|
||||
return x
|
||||
return tf.depth_to_space(x, size, data_format=nn.data_format)
|
||||
|
||||
nn.depth_to_space = depth_to_space
|
||||
|
||||
def rgb_to_lab(srgb):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue