remove tensorflow
This commit is contained in:
parent
d6b84272fd
commit
b5cc987ad9
2 changed files with 17 additions and 2 deletions
2
audio.py
2
audio.py
|
|
@ -1,7 +1,7 @@
|
|||
import librosa
|
||||
import librosa.filters
|
||||
import numpy as np
|
||||
import tensorflow as tf
|
||||
# import tensorflow as tf
|
||||
from scipy import signal
|
||||
from scipy.io import wavfile
|
||||
from hparams import hparams as hp
|
||||
|
|
|
|||
17
hparams.py
17
hparams.py
|
|
@ -1,4 +1,3 @@
|
|||
from tensorflow.contrib.training import HParams
|
||||
from glob import glob
|
||||
import os
|
||||
|
||||
|
|
@ -13,6 +12,22 @@ def get_image_list(data_root, split):
|
|||
|
||||
return filelist
|
||||
|
||||
class HParams:
|
||||
def __init__(self, **kwargs):
|
||||
self.data = {}
|
||||
|
||||
for key, value in kwargs.items():
|
||||
self.data[key] = value
|
||||
|
||||
def __getattr__(self, key):
|
||||
if key not in self.data:
|
||||
raise AttributeError("'HParams' object has no attribute %s" % key)
|
||||
return self.data[key]
|
||||
|
||||
def set_hparam(self, key, value):
|
||||
self.data[key] = value
|
||||
|
||||
|
||||
# Default hyperparameters
|
||||
hparams = HParams(
|
||||
num_mels=80, # Number of mel-spectrogram channels and local conditioning dimensionality
|
||||
|
|
|
|||
Loading…
Reference in a new issue