class_docstr: This layer computes the loss function for MCTS.
class_docstr_tok: ["This","layer","computes","the","loss","function","for","MCTS","."]
code: def create_tensor(self, **kwargs):
      pred_prob, pred_value, search_prob, search_value = [
          layer.out_tensor for layer in self.in_layers
      ]
      log_prob = tf.log(pred_prob + np.finfo(np.float32).eps)
      probability_loss = -tf.reduce_mean(search_prob * log_prob)
      value_loss = tf.reduce_mean(tf.square(pred_value - search_value))
      self.out_tensor = (
          probability_loss + self.value_weight * value_loss
      )
      self.probability_loss = probability_loss
      self.value_loss = value_loss
      return self.out_tensor
  
imports: from deepchem.models import TensorGraph
  from deepchem.models.optimizers import Adam
  from deepchem.models.tensorgraph.layers import Feature, Weights, Label, Layer
  import numpy
  import tensorflow
  import copy
  import time
label_desc: Use image node_id 2 for calling the MCTSLoss obj's underlying member method code with example usage: obj.create_tensor() and returns: self