forked from mrq/DL-Art-School
fix
This commit is contained in:
parent
24e60bd510
commit
fcfb3a1525
|
@ -93,8 +93,8 @@ class RandomAudioCropInjector(Injector):
|
||||||
self.min_crop_sz = opt['crop_size']
|
self.min_crop_sz = opt['crop_size']
|
||||||
self.max_crop_sz = self.min_crop_sz
|
self.max_crop_sz = self.min_crop_sz
|
||||||
else:
|
else:
|
||||||
self.min_crop_sz = opt['min_crop_sz']
|
self.min_crop_sz = opt['min_crop_size']
|
||||||
self.max_crop_sz = opt['max_crop_sz']
|
self.max_crop_sz = opt['max_crop_size']
|
||||||
self.lengths_key = opt['lengths_key']
|
self.lengths_key = opt['lengths_key']
|
||||||
|
|
||||||
def forward(self, state):
|
def forward(self, state):
|
||||||
|
@ -106,7 +106,7 @@ class RandomAudioCropInjector(Injector):
|
||||||
if margin < 0:
|
if margin < 0:
|
||||||
return {self.output: inp}
|
return {self.output: inp}
|
||||||
start = random.randint(0, margin)
|
start = random.randint(0, margin)
|
||||||
return {self.output: inp[:, :, start:start+self.crop_sz]}
|
return {self.output: inp[:, :, start:start+crop_sz]}
|
||||||
|
|
||||||
|
|
||||||
class AudioClipInjector(Injector):
|
class AudioClipInjector(Injector):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user