added support for tag filter, rewritten teacher_log generation in detailed layer