I suppose, but they will charge a person with assault against a police officer sometimes in those scenarios. Juries usually frown on those who assault police officers.
If you are compliant with them, you can sue for damages if they have violated your rights while you were in a state of duress.
You could try to defend yourself, but the officers are usually armed.
It's one of those situations where you're kind of damned if you do and damned if you don't.