Skip to content

Commit

Permalink
remove tensorflow
Browse files Browse the repository at this point in the history
  • Loading branch information
burning846 committed Jan 9, 2021
1 parent d6b8427 commit b5cc987
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion audio.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 16 additions & 1 deletion hparams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from tensorflow.contrib.training import HParams
from glob import glob
import os

Expand All @@ -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
Expand Down

0 comments on commit b5cc987

Please sign in to comment.