コード例 #1
0
    def _get_inputs(self):
        n_timesteps = (hp.default.duration * hp.default.sr) // hp.default.hop_length + 1

        return [InputDesc(tf.float32, (None, n_timesteps, 9999), 'x_ppgs'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mfcc), 'x_mfccs'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_fft // 2 + 1), 'y_spec'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mels), 'y_mel'), ]
コード例 #2
0
    def _get_inputs(self):
        n_timesteps = (hp.default.duration * hp.default.sr) // hp.default.hop_length + 1  #401

        return [InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mels), 'r_mel'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_fft // 2 + 1), 't_spec'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mels), 't_mel'),
                InputDesc(tf.float32, (None, n_timesteps, hp.default.n_fft // 2 + 1), 'r_spec')]
コード例 #3
0
 def _get_inputs(self):
     length = hp.signal.duration * hp.signal.sr
     length_spec = length // hp.signal.hop_length + 1
     return [
         InputDesc(tf.float32, (None, length), 'wav'),
         InputDesc(tf.float32, (None, length_spec, hp.signal.n_mels), 'x'),
         InputDesc(tf.int32, (None, ), 'speaker_id')
     ]
コード例 #4
0
 def _get_inputs(self):
     return [
         InputDesc(tf.float32, (None, None, hp.default.n_mfcc), 'x_mfccs'),
         InputDesc(tf.int32, (
             None,
             None,
         ), 'y_ppgs')
     ]
コード例 #5
0
 def _get_inputs(self):
     length_melspec = hp.signal.length // hp.signal.hop_length + 1
     return [
         InputDesc(tf.float32, (None, hp.signal.length), 'wav'),
         InputDesc(tf.float32, (None, length_melspec, hp.signal.n_mels),
                   'melspec'),
         InputDesc(tf.float32, (None, 2), 'labels')
     ]
コード例 #6
0
ファイル: main.py プロジェクト: waxz/ppo_torcs
 def _get_inputs(self):
     return [
         InputDesc(tf.float32, (None, 6), 'state'),
         InputDesc(tf.float32, (None, 2), 'action'),
         InputDesc(tf.float32, (None, ), 'futurereward'),
         InputDesc(tf.float32, (None, ), 'advantage'),
         # InputDesc(tf.float32, (None,), 'action_prob'),
     ]
コード例 #7
0
    def _get_inputs(self):

        return [
            InputDesc(tf.float32, (None, None, hp.default.n_mfcc), 'x_mfccs'),
            InputDesc(tf.float32, (None, None, hp.default.n_fft // 2 + 1),
                      'y_spec'),
            InputDesc(tf.float32, (None, None, hp.default.n_mels), 'y_mel'),
        ]
コード例 #8
0
    def _get_inputs(self):
        n_timesteps = (hp.default.duration *
                       hp.default.sr) // hp.default.hop_length + 1
        # timestep의 갯수, 전체 길이를 hop length 만큼 나눈 것.
        # STFT 변환 시, 전체 오디오에서 생성되는 총 window 개수와 동일

        # 그래프에 입력하는 entry point에 관한 메타데이터를 생성한다.
        # 이러한 메타데이터는 나중에 placeholder을 만들거나
        # 다른 타입의 입력값을 만드는데 쓰일 수 있다.
        # placeholder : 데이터의 형태만 지정한 뒤, 실제 입력은 실행 단계에서 받을 수 있는 텐서를 뜻한다.
        return [
            InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mfcc),
                      'x_mfccs'),
            InputDesc(tf.float32,
                      (None, n_timesteps, hp.default.n_fft // 2 + 1),
                      'y_spec'),
            InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mels),
                      'y_mel'),
        ]
コード例 #9
0
 def _get_inputs(self):
     #n_timesteps = (hp.default.duration * hp.default.sr) // hp.default.hop_length + 1
     n_timesteps = (hp.default.duration * hp.default.sr) // hp.default.hop_length
     return [InputDesc(tf.float32, (None, n_timesteps, hp.default.n_mels), 'y_mel'), 
            InputDesc(tf.float32, (None, n_timesteps, hp.default.n_ppgs), 'ppgs'),]
コード例 #10
0
 def _get_inputs(self):
     return [
         InputDesc(tf.float32, (None, self.length, 1), 'wav'),  # (n, t)
         InputDesc(tf.float32, (None, self.t_mel, hp.signal.n_mels),
                   'melspec')
     ]  # (n, t_mel, n_mel)