Research Article

Quadruplet-Based Deep Cross-Modal Hashing

Algorithm 1

QDCMH: quadruplet-based deep cross-modal hashing.
Input:
   training data set: . The maximal number of epoches of the algorithm is . Mini-batch size .
Output:
  Parameters , of the deep neural networks, and corresponding hash codes matrix .
(1) Generating quadruplets (named ) from training set, generating quadruplets (named ) from training set.
(2) Initialize the deep neural network parameters , , the whole training image hash representations , the whole training text hash representations , the hash codes matrix , and the epoch numbers .
(3) repeat
(4)  fordo
(5)   Randomly sample images from to construct a mini-batch of images.
(6)   For each instance in the mini-batch, calculate by forward propagation.
(7)   Update .
(8)   Calculate the derivative of in equation (7).
(9)   Update the network parameters by utilizing backpropagation.
(10)  end for
(11)  fordo
(12)   Randomly sample texts from to construct a mini-batch of texts.
(13)   For each instance in the mini-batch, calculate by forward propagation.
(14)   Update .
(15)   Calculate the derivative of in equation (7).
(16)   Update the network parameters by using backpropagation.
(17)  end for
(18)  Update using equation (5).
(19) until the max epoch number .