Skip to content

Commit

Permalink
add create_dataset (should go to utils though )
Browse files Browse the repository at this point in the history
  • Loading branch information
valavanisleonidas committed May 28, 2019
1 parent 1b0d64d commit ce4a3ca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ def compute_Similarity(self, utterance, type='cosine_similarity'):
return similarity_vec, assigned_speaker_vec


def create_dataset(indexed_labels, origin_file_path):
from load_data import AudioDataset

cube_shape = (80, 40, 20)
cube = FeatureCube(cube_shape)
transform = transforms.Compose([CMVN(), cube, ToTensor()])

dataset = AudioDataset(
origin_file_path,
c.DATA_ORIGIN,
indexed_labels=indexed_labels,
transform=transform)

return dataset


def evaluate():
model = C3D2(n_labels=100, num_channels=1)

Expand Down

0 comments on commit ce4a3ca

Please sign in to comment.