class_docstr: Operator that ensures an RNNCell runs on a particular device.
class_docstr_tok: ["Operator","that","ensures","an","RNNCell","runs","on","a","particular","device","."]
docstr: Construct a `DeviceWrapper` for `cell` with device `device`.
  
  Ensures the wrapped `cell` is called with `tf.device(device)`.
  
  Args:
    cell: An instance of `RNNCell`.
    device: A device string or function, for passing to `tf.device`.
    **kwargs: dict of keyword arguments for base layer.
docstr_tok: ["Construct","a","`","DeviceWrapper","`","for","`","cell","`","with","device","`","device","`",".","Ensures","the","wrapped","`","cell","`","is","called","with","`","tf.device","(","device",")","`",".","Args",":","cell",":","An","instance","of","`","RNNCell","`",".","device",":","A","device","string","or","function",",","for","passing","to","`","tf.device","`",".","*","*","kwargs",":","dict","of","keyword","arguments","for","base","layer","."]
code: def __init__(self, cell, device, **kwargs):
      """Construct a `DeviceWrapper` for `cell` with device `device`.
  
      Ensures the wrapped `cell` is called with `tf.device(device)`.
  
      Args:
        cell: An instance of `RNNCell`.
        device: A device string or function, for passing to `tf.device`.
        **kwargs: dict of keyword arguments for base layer.
      """
      super(DeviceWrapperBase, self).__init__(cell, **kwargs)
      self._device = device
  
imports: import hashlib
  import numbers
  import sys
  import types
  import warnings
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new DeviceWrapperBase object from inherited base classes: object with example: obj = DeviceWrapperBase(cell, device)