Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperemy committed Oct 4, 2022
1 parent cd8fda7 commit 3a327f8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions tests/batcher_t1.py → deep_speaker/tests/batcher_t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import numpy as np

import triplet_loss
from batcher import KerasFormatConverter, TripletBatcherSelectHardNegatives, TripletBatcher
from constants import NUM_FBANKS, NUM_FRAMES, CHECKPOINTS_TRIPLET_DIR, CHECKPOINTS_SOFTMAX_DIR, BATCH_SIZE
from conv_models import DeepSpeakerModel
from triplet_loss import deep_speaker_loss
from utils import load_best_checkpoint
from deep_speaker import triplet_loss
from deep_speaker.batcher import KerasFormatConverter, TripletBatcherSelectHardNegatives, TripletBatcher
from deep_speaker.constants import NUM_FBANKS, NUM_FRAMES, CHECKPOINTS_TRIPLET_DIR, CHECKPOINTS_SOFTMAX_DIR, BATCH_SIZE
from deep_speaker.conv_models import DeepSpeakerModel
from deep_speaker.triplet_loss import deep_speaker_loss
from deep_speaker.utils import load_best_checkpoint


def predict(x):
Expand Down
8 changes: 4 additions & 4 deletions tests/batcher_t2.py → deep_speaker/tests/batcher_t2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import numpy as np

from batcher import LazyTripletBatcher
from constants import NUM_FBANKS, NUM_FRAMES
from conv_models import DeepSpeakerModel
from triplet_loss import deep_speaker_loss
from deep_speaker.batcher import LazyTripletBatcher
from deep_speaker.constants import NUM_FBANKS, NUM_FRAMES
from deep_speaker.conv_models import DeepSpeakerModel
from deep_speaker.triplet_loss import deep_speaker_loss


def main2():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from triplet_loss import deep_speaker_loss
from deep_speaker.triplet_loss import deep_speaker_loss


def opposite_positive_equal_negative_batch():
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ commands = pylint --disable=R,C,W,E1136 deep_speaker
flake8 deep_speaker --count --exclude=michel,tests --max-line-length 127 --statistics
python example.py
python example_pcm.py
pytest tests
passenv = *
install_command = pip install {packages}

0 comments on commit 3a327f8

Please sign in to comment.