Lightweight bolt state detection based on a dynamic weighted loss function | Synapse