repositories
/
asr1617data.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eff7cbe
)
clean up prediction
author
Mart Lubbers
<mart@martlubbers.net>
Tue, 16 May 2017 18:17:09 +0000
(20:17 +0200)
committer
Mart Lubbers
<mart@martlubbers.net>
Tue, 16 May 2017 18:17:09 +0000
(20:17 +0200)
predict.py
patch
|
blob
|
history
diff --git
a/predict.py
b/predict.py
index
18a84e7
..
45e94da
100644
(file)
--- a/
predict.py
+++ b/
predict.py
@@
-19,10
+19,12
@@
with open(modelfile, 'r', encoding='utf-8') as f:
model = model_from_json(json)
model.load_weights(hdf5file)
model = model_from_json(json)
model.load_weights(hdf5file)
-(_, winlen, winstep,
_
) = modelfile.split('_')
+(_, winlen, winstep,
name
) = modelfile.split('_')
winlen = float(winlen)
winstep = float(winstep)
winlen = float(winlen)
winstep = float(winstep)
+multiclass = name == 'multi'
+
model.compile(
loss='binary_crossentropy',
optimizer='rmsprop',
model.compile(
loss='binary_crossentropy',
optimizer='rmsprop',
@@
-49,12
+51,5
@@
print('sr: ', int(1.0/winstep))
print("len(wavdata): ", len(wavdata))
print("len(x): ", len(x))
wav.write('class.wav', int(1.0/winstep), wavdata)
print("len(wavdata): ", len(wavdata))
print("len(x): ", len(x))
wav.write('class.wav', int(1.0/winstep), wavdata)
-#for i in smoothed:
-# print(int(i*255))
-
-
-
-
-
tgob.to_file('/dev/stdout')
tgob.to_file('/dev/stdout')