title: How to use F-score as error function to train neural networks?
body: <p>I am pretty new to neural networks. I am training a network in tensorflow, but the number of positive examples is much much less than negative examples in my dataset (it is a medical dataset). 
  So, I know that F-score calculated from precision and recall is a good measure of how well the model is trained. 
  I have used error functions like cross-entropy loss or MSE before, but they are all based on accuracy calculation (if I am not wrong). But how do I use this F-score as an error function? Is there a tensorflow function for that? Or I have to create a new one?</p>
  
  <p>Thanks in advance. </p>