frontend loss weight