Request in writing that your attorney arrange for a court reporter to be present at the trial and record the entire proceeding. Judges miraculously act more judiciously when they know they're being put on the record by a court reporter. Remember that it is your right to have a court reporter present; if necessary, insist on it.
If the trial is held in an open courtroom or chambers, pack the place with people you know who you can rely upon to testify regarding the judges demeanor should you appeal based upon judicial misconduct. If the bias against you is blatantly obvious, call the local paper and let them the reporter that cover the court-related stories. Make sure you indicate the time and place they should be for your court appearance(s).
Subtly hint to your attorney that if you experience any gender bias or judicial misconduct, or anything that is in the slightest way appealable during the trial, you WILL appeal. Your "hint" will get back to the judge and may cause him to moderate his biases. Judges hate to be appealed. Even if an appeal is unsuccessful, the judges hate to get the reputation that a large portion of their judgements are appealed. Remember that the "threat" of an appeal is only good if you have the money to actually file and pursue the case.
Consider asking your attorney to motion for the judge to recuse himself from the case. This can be a risky route- most judges DO NOT like to be told that they can't conduct business as they see fit in their own courtroom or that they're biased, and they may do their best to punish you for it later. However, if you have a valid reason for believing that the judge cannot be impartial, a motion to recuse is reasonable.