File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ function clock_to_seconds() {
4
4
hours=` echo $1 | awk -F ' :' ' {print $1}' `
5
5
mins=` echo $1 | awk -F ' :' ' {print $2}' `
6
6
secs=` echo $1 | awk -F ' :' ' {print $3}' `
7
- echo ` bc -l <<< " $secs + $mins * 60 + $hours * 3600" `
7
+ echo ` awk ' BEGIN{printf "%.2f",( ' $secs ' + ' $mins ' * 60 + ' $hours ' * 3600)} ' `
8
8
}
9
9
10
10
function infer() {
@@ -58,9 +58,9 @@ function infer() {
58
58
end=` tail ${log} -n 2 | head -n 1 | awk -F ' ' ' {print $2}' | xargs`
59
59
start_sec=` clock_to_seconds $start `
60
60
end_sec=` clock_to_seconds $end `
61
- fps=` bc <<< " scale = 2; 1280 / ($end_sec - $start_sec) " `
61
+ fps=` awk ' BEGIN{printf "%.2f",( 1280 / (' $end_sec ' - ' $start_sec ' ))} ' `
62
62
echo " Last 1280 samples start: ${start} (${start_sec} sec), end: ${end} (${end_sec} sec;" >> ${log}
63
- echo " FPS: $fps images/sec" >> ${log}
63
+ echo " FPS: $fps images/sec" 2>&1 | tee -a ${log}
64
64
}
65
65
66
66
if [ ! -f " train.list" ]; then
You can’t perform that action at this time.
0 commit comments