mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 06:23:20 -07:00
amp force preview sample and prop change
This commit is contained in:
parent
cb677f5782
commit
790c888c5e
4 changed files with 12 additions and 5 deletions
|
@ -933,8 +933,10 @@ class AMPModel(ModelBase):
|
|||
|
||||
target_srcm, target_dstm = [ nn.to_data_format(x,"NHWC", self.model_data_format) for x in ([target_srcm, target_dstm] )]
|
||||
|
||||
#n_samples = min(4, self.get_batch_size(), 800 // self.resolution )
|
||||
n_samples = min(self.get_batch_size(), self.options['preview_samples'])
|
||||
if self.options['force_preview_samples_num'] is None:
|
||||
n_samples = min(4, self.get_batch_size(), 800 // self.resolution )
|
||||
else:
|
||||
n_samples = min(self.get_batch_size(), self.options['force_preview_samples_num'])
|
||||
|
||||
result = []
|
||||
|
||||
|
|
|
@ -179,6 +179,11 @@
|
|||
"random_dst_flip": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"force_preview_samples_num": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
},
|
||||
"batch_size": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
|
|
@ -979,10 +979,10 @@ class SAEHDModel(ModelBase):
|
|||
|
||||
target_srcm, target_dstm = [ nn.to_data_format(x,"NHWC", self.model_data_format) for x in ([target_srcm, target_dstm] )]
|
||||
|
||||
if self.options['preview_samples'] is None:
|
||||
if self.options['force_preview_samples_num'] is None:
|
||||
n_samples = min(4, self.get_batch_size(), 800 // self.resolution )
|
||||
else:
|
||||
n_samples = min(self.get_batch_size(), self.options['preview_samples'])
|
||||
n_samples = min(self.get_batch_size(), self.options['force_preview_samples_num'])
|
||||
|
||||
if filenames is not None and len(filenames) > 0:
|
||||
for i in range(n_samples):
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
"pretrain": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"preview_samples": {
|
||||
"force_preview_samples_num": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue