'Wrap the value into NervanaCPU tensor.
Arguments:
value: Array or single input. If it is array, check and Convert
the dtype and shape. If it is single value, broadcast to
the memory
Returns:
self'

def set(self, value):

    if isinstance(value, np.ndarray):
        if (value.dtype is not self.dtype):
            value = value.astype(self.dtype)
        assert (value.size == self.size)
        if (value.ndim < self._min_dims):
            value = value.reshape(self.shape)
    self._tensor[:] = value
    return self
