import tensorflow as tf


    References:
        Kolda, Tamara G., and Brett W. Bader. "Tensor decompositions and 
        applications." SIAM review 51.3 (2009): 455-500.
    '''
    
    def _create_model(self, train_triples):
        # Count unique items to determine embedding matrix sizes
        head_cnt = len(set(train_triples[:,0]))
        rel_cnt = len(set(train_triples[:,1]))
        tail_cnt = len(set(train_triples[:,2]))
        init_sd = 1.0 / np.sqrt(self.embedding_size)
        # Embedding matrices for entities and relationship types
        head_init = tf.truncated_normal([head_cnt, self.embedding_size], stddev=init_sd)
        rel_init = tf.truncated_normal([rel_cnt, self.embedding_size], stddev=init_sd)
        tail_init = tf.truncated_normal([tail_cnt, self.embedding_size], stddev=init_sd)
        if self.maxnorm is not None:
            # Ensure maxnorm constraints are initially satisfied
            head_init = dense_maxnorm(head_init, self.maxnorm)
            rel_init = dense_maxnorm(rel_init, self.maxnorm)
            tail_init = dense_maxnorm(tail_init, self.maxnorm)
        self.head_embedding_vars = tf.Variable(head_init)
        self.rel_embedding_vars = tf.Variable(rel_init)
        self.tail_embedding_vars = tf.Variable(tail_init)
        # Embedding layer for each (head, rel, tail) triple being fed in as input
        head_embed = tf.nn.embedding_lookup(self.head_embedding_vars, self.head_input)
        rel_embed = tf.nn.embedding_lookup(self.rel_embedding_vars, self.rel_input)
        tail_embed = tf.nn.embedding_lookup(self.tail_embedding_vars, self.tail_input)
