How I can convert the following code in tensorflow to pytorch:
`self.optimizer = tf.train.RMSPropOptimizer(learning_rate=self.learning_rate).minimize(self.loss)
self.neg_log_prob = tf.nn.sigmoid_cross_entropy_with_logits(logits=self.select_y, labels=self.y_PA)
self.select_loss = self.neg_log_prob * self.average_reward
self.optimizer_selector = tf.train.AdamOptimizer(0.001).minimize(self.select_loss)
`
The self.select_loss in last minimize seems is tensor not scalar?