mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 21:12:07 -07:00
fix bug with samples that were not clipped after tanh-untanh transformations, upd README.md
This commit is contained in:
parent
51a13c90d1
commit
854ab11de3
3 changed files with 16 additions and 8 deletions
|
@ -197,9 +197,12 @@ class SampleProcessor(object):
|
|||
else:
|
||||
raise ValueError ('expected SampleTypeFlags mode')
|
||||
|
||||
if not debug and sample_process_options.normalize_tanh:
|
||||
img = img * 2.0 - 1.0
|
||||
|
||||
if not debug:
|
||||
if sample_process_options.normalize_tanh:
|
||||
img = np.clip (img * 2.0 - 1.0, -1.0, 1.0)
|
||||
else:
|
||||
img = np.clip (img, 0.0, 1.0)
|
||||
|
||||
outputs.append ( img )
|
||||
|
||||
if debug:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue