When someone is a threat to personal safety then you have a right to use reasonable force for protection. Don't be half hearted in your attempts. If one strategy doesn't work then try another.
Reasonable force also means not to over do it. Never hurt anyone more than you have to. Using violence as a payback, to prove a point or to teach someone a lesson is not justified. Safety and survival are your objectives.
Every situation is different so trust your instincts, be resourceful and do what makes you feel safe. Only you can decide whether to fight back.

You may choose other options such as:
Non-resistance to avoid further violence.
Defuse the attacker by being verbally assertive.
Yell, scream, use an alarm or make any loud noise to attract help nearby.
Distract or divert the attacker and escape to safety.
Stall for time and wait for a better opportunity to act.
Use your own good judgement and common sense.

Don't let your body language accidentally tell your assailant you are about to act.
Surprise is your best weapon.
Preparing yourself for a wide range of possibilities with your Universal Self-defence training will help you apply the right strategy.