class_docstr: RotatE model.
class_docstr_tok: ["RotatE","model","."]
docstr: construct the main program for train and test
docstr_tok: ["construct","the","main","program","for","train","and","test"]
code: def construct_program(self):
      """
      construct the main program for train and test
      """
      self.startup_program = fluid.Program()
      self.train_program = fluid.Program()
      self.test_program = fluid.Program()
  
      with fluid.program_guard(
          self.train_program, self.startup_program
      ):
          self.train_pos_input = fluid.layers.data(
              "pos_triple",
              dtype="int64",
              shape=[None, 3, 1],
              append_batch_size=False,
          )
          self.train_neg_input = fluid.layers.data(
              "neg_triple",
              dtype="int64",
              shape=[None, 3, 1],
              append_batch_size=False,
          )
          self.train_neg_mode = fluid.layers.data(
              "neg_mode",
              dtype="float32",
              shape=[1],
              append_batch_size=False,
          )
          self.train_feed_vars = [
              self.train_pos_input,
              self.train_neg_input,
              self.train_neg_mode,
          ]
          self.train_fetch_vars = self.construct_train_program()
          loss = self.train_fetch_vars[0]
          self.apply_optimizer(loss, opt=self._optimizer)
  
      with fluid.program_guard(self.test_program, self.startup_program):
          self.test_input = fluid.layers.data(
              "test_triple",
              dtype="int64",
              shape=[3],
              append_batch_size=False,
          )
          self.test_feed_list = ["test_triple"]
          self.test_fetch_vars = self.construct_test_program()
  
file_path: PGL/legacy/examples/pgl-ke/model/RotatE.py
imports: import paddle.fluid
  from .Model import Model
  from .utils import lookup_table
label_desc: Use image node_id 2 for calling the RotatE obj's underlying member method code with example usage: obj.construct_program() without return types