andrewowens / multisensory

Code for the paper: Audio-Visual Scene Analysis with Self-Supervised Multisensory Features
http://andrewowens.com/multisensory/
Apache License 2.0
220 stars 61 forks source link

whre is the sep_module (calss or funtion)in sourcesep.py #15

Open xiaoyiming opened 5 years ago

xiaoyiming commented 5 years ago

Really nice job!!!, I found that “sep_module”(class or function ) was used in sourcesep.py file. However, I could not find the definition. the “sep_module” was used as followed:

" spec_mix, phase_mix = sep_module(pr).stft(samples_trunc[:, :, 0], pr) spec_mix = crop_spec(spec_mix) phase_mix = crop_spec(phase_mix)

    self.specgram_op, phase = map(crop_spec, sep_module(pr).stft(samples_trunc[:, :, 0], pr))
    self.auto_op = sep_module(pr).istft(self.specgram_op, phase, pr)

    self.net = sep_module(pr).make_net(
      self.ims_ph, samples_trunc, spec_mix, phase_mix, 
      pr, reuse = False, train = False) "
andrewowens commented 5 years ago

Oops, sep_module() should simply return the "sourcesep" module (the code is written this way to support baselines, but we haven't released those). Thanks for catching that!

xiaoyiming commented 5 years ago

Thanks for reply. However, I found another problem as follows: def slim_losses_with_prefix(prefix, show = True): losses = tf.losses.get_regularization_losses() losses = [x for x in losses if prefix is None or x.name.startswith(prefix)] if show: print 'Collecting losses for prefix %s:' % prefix for x in losses: print x.name print return mu.maybe_add_n(losses) where the losses is always empty?

tuffr5 commented 5 years ago

@xiaoyiming Hello, I notice the miss definition too. Could you please share the way you deal with the undefined "sourcesep" module? Thank you.