remove tensorflow

This commit is contained in:
burning 2021-01-09 16:51:42 +08:00
parent d6b84272fd
commit b5cc987ad9
2 changed files with 17 additions and 2 deletions

View file

@ -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

View file

@ -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