class_docstr: A single layer for shift.
class_docstr_tok: ["A","single","layer","for","shift","."]
docstr: Initialize shift layer.
  
  Args:
    vocab: (list of String) the vocabulary
    shift: (Integer) the amount of shift apply to the alphabet.
      Positive number implies shift to the right, negative number
      implies shift to the left.
docstr_tok: ["Initialize","shift","layer",".","Args",":","vocab",":","(","list","of","String",")","the","vocabulary","shift",":","(","Integer",")","the","amount","of","shift","apply","to","the","alphabet",".","Positive","number","implies","shift","to","the","right",",","negative","number","implies","shift","to","the","left","."]
code: def __init__(self, vocab, shift):
      """Initialize shift layer.
  
      Args:
        vocab: (list of String) the vocabulary
        shift: (Integer) the amount of shift apply to the alphabet.
          Positive number implies shift to the right, negative number
          implies shift to the left.
      """
      self.shift = shift
      alphabet = vocab
      shifted_alphabet = deque(alphabet)
      shifted_alphabet.rotate(shift)
      self.encrypt = dict(zip(alphabet, list(shifted_alphabet)))
      self.decrypt = dict(zip(list(shifted_alphabet), alphabet))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import deque
  import numpy
  from tensor2tensor.data_generators import algorithmic
  from tensor2tensor.utils import registry
label_desc: Use image node_id 1 to create a new ShiftEncryptionLayer object from inherited base classes: object with example: obj = ShiftEncryptionLayer(vocab, shift)