(self, in_obj)
return self
in_obj should be one single input shape as all three sentences will go through the
        word embedding layer first.
in_obj should be one single input shape as all three sentences will go through the
        word embedding layer first.
in_obj should be one single input shape as all three sentences will go through the word embedding layer first .
def configure(self, in_obj):
        """
        in_obj should be one single input shape as all three sentences will go through the
        word embedding layer first.
        """
        if not isinstance(in_obj, list):
            in_obj = in_obj.shape
        self.in_shape = in_obj
        self.embed_s.configure(in_obj[0])
        self.embed_s.set_next(self.encoder)
        self.encoder.configure(self.embed_s)

        self.embed_p.configure(in_obj[1])
        self.embed_p.set_next(self.decoder_p)
        self.decoder_p.configure(self.embed_p)
        self.decoder_p.set_next(self.affine_p)
        prev_in = self.decoder_p
        for l in self.affine_p:
            l.configure(prev_in)
            prev_in.set_next(l)
            prev_in = l

        self.embed_n.configure(in_obj[2])
        self.embed_n.set_next(self.decoder_n)
        self.decoder_n.configure(self.embed_n)
        self.decoder_n.set_next(self.affine_n)
        prev_in = self.decoder_n
        for l in self.affine_n:
            l.configure(prev_in)
            prev_in.set_next(l)
            prev_in = l

        self.out_shape = [
            self.affine_p[-1].out_shape, self.affine_n[-1].out_shape]

        return self
def configure ( self , in_obj ) : if not isinstance ( in_obj , list ) : in_obj = in_obj . shape self . in_shape = in_obj self . embed_s . configure ( in_obj [ 0 ] ) self . embed_s . set_next ( self . encoder ) self . encoder . configure ( self . embed_s ) self . embed_p . configure ( in_obj [ 1 ] ) self . embed_p . set_next ( self . decoder_p ) self . decoder_p . configure ( self . embed_p ) self . decoder_p . set_next ( self . affine_p ) prev_in = self . decoder_p for l in self . affine_p : l . configure ( prev_in ) prev_in . set_next ( l ) prev_in = l self . embed_n . configure ( in_obj [ 2 ] ) self . embed_n . set_next ( self . decoder_n ) self . decoder_n . configure ( self . embed_n ) self . decoder_n . set_next ( self . affine_n ) prev_in = self . decoder_n for l in self . affine_n : l . configure ( prev_in ) prev_in . set_next ( l ) prev_in = l self . out_shape = [ self . affine_p [ - 1 ] . out_shape , self . affine_n [ - 1 ] . out_shape ] return self