How to save RNN model into .pb file

hi, I went through the char_rnn on GitHub. I wish to save the model into .pb file. has anyone tried that before? Or anyone can give me some tips to do that

As i understand, this is normal way to save model?

hi dude thanks for your reply! I have viewed the example of this one to save model:
I guess I may use f.write( , but I got issue on deploy_model, I have no idea to save the whole net and data into the deploy_model