watch
continuously watch logfile output
watch 'head -n 2 <logfile>; tail -f <logfile> | grep <keyword or pattern>'
# beginning 2 lines
# tail grep certain lines only
example
watch 'grep -E "Epoch|val_accuracy" <logfile> | tail; tail <logfile>'
# grep "Epoch" or "val_accuracy", but get latest only with tail
# also output last lines of logfile