Compare commits
No commits in common. "8be8fa259563a48279bcd79a5c16e5994ced6909" and "6f3bca61cfe02ef399e777a94c3304f98ec3c66c" have entirely different histories.
8be8fa2595
...
6f3bca61cf
|
|
@ -140,6 +140,4 @@ Temporary Items
|
|||
outputs/*
|
||||
inputs/mnist
|
||||
inputs/audio*
|
||||
logs/*
|
||||
models/*
|
||||
*.pkl
|
||||
|
|
|
|||
317
Siamese.ipynb
317
Siamese.ipynb
File diff suppressed because one or more lines are too long
|
|
@ -122,10 +122,8 @@ def create_speech_pairs_data(audio_group='audio'):
|
|||
# print('pickled speech model data')
|
||||
|
||||
def speech_model_data():
|
||||
tr_pairs = np.load('outputs/tr_pairs.npy')/255.0
|
||||
te_pairs = np.load('outputs/te_pairs.npy')/255.0
|
||||
tr_pairs[tr_pairs < 0] = 0
|
||||
te_pairs[te_pairs < 0] = 0
|
||||
tr_pairs = np.load('outputs/tr_pairs.npy').astype(np.float32)/255.0
|
||||
te_pairs = np.load('outputs/te_pairs.npy').astype(np.float32)/255.0
|
||||
tr_y = np.load('outputs/tr_y.npy')
|
||||
te_y = np.load('outputs/te_y.npy')
|
||||
return tr_pairs,te_pairs,tr_y,te_y
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ tb_cb = TensorBoard(log_dir='./siamese_logs', histogram_freq=1, batch_size=32,
|
|||
embeddings_freq=0, embeddings_layer_names=None,
|
||||
embeddings_metadata=None)
|
||||
# train
|
||||
rms = RMSprop(lr=0.001) # lr=0.001)
|
||||
rms = RMSprop(lr=0.00001) # lr=0.001)
|
||||
sgd = SGD(lr=0.001)
|
||||
model.compile(loss=contrastive_loss, optimizer=rms, metrics=[accuracy])
|
||||
model.fit([tr_pairs[:, 0], tr_pairs[:, 1]], tr_y,
|
||||
|
|
|
|||
Loading…
Reference in New Issue