コード例 #1
0
ファイル: list_ops.py プロジェクト: datanonymous/TFandroid
def tensor_list_gather(input_handle, indices, element_dtype, name=None):
  return gen_list_ops.tensor_list_gather(
      input_handle=input_handle,
      indices=indices,
      element_shape=-1,
      element_dtype=element_dtype,
      name=name)
コード例 #2
0
ファイル: list_ops.py プロジェクト: GiveMeLuna/tensorflow
def _TensorListScatterGrad(op, dlist):
    t, indices, _ = op.inputs
    return gen_list_ops.tensor_list_gather(dlist,
                                           indices,
                                           element_shape=array_ops.slice(
                                               array_ops.shape(t), [1], [-1]),
                                           element_dtype=t.dtype), None, None
コード例 #3
0
ファイル: list_ops.py プロジェクト: terrytangyuan/tensorflow
def tensor_list_gather(input_handle, indices, element_dtype, name=None):
  return gen_list_ops.tensor_list_gather(
      input_handle=input_handle,
      indices=indices,
      element_shape=-1,
      element_dtype=element_dtype,
      name=name)
コード例 #4
0
ファイル: list_ops.py プロジェクト: rmlarsen/tensorflow
def _TensorListScatterGrad(op, dlist):
  t, indices, _ = op.inputs
  return gen_list_ops.tensor_list_gather(
      dlist,
      indices,
      element_shape=array_ops.slice(array_ops.shape(t), [1], [-1]),
      element_dtype=t.dtype), None, None
コード例 #5
0
def _TensorListScatterIntoExistingListGrad(op, dlist):
  """Gradient function for TensorListScatterIntoExistingList."""
  _, tensor, indices = op.inputs
  dtensor = gen_list_ops.tensor_list_gather(
      dlist,
      indices,
      element_shape=array_ops.slice(array_ops.shape(tensor), [1], [-1]),
      element_dtype=tensor.dtype)
  zeros = array_ops.zeros_like(tensor)
  dlist = tensor_list_scatter(zeros, indices, indices, input_handle=dlist)
  return dlist, dtensor, None
コード例 #6
0
ファイル: list_ops.py プロジェクト: adit-chandra/tensorflow
def _TensorListScatterIntoExistingListGrad(op, dlist):
  """Gradient function for TensorListScatterIntoExistingList."""
  _, tensor, indices = op.inputs
  dtensor = gen_list_ops.tensor_list_gather(
      dlist,
      indices,
      element_shape=array_ops.slice(array_ops.shape(tensor), [1], [-1]),
      element_dtype=tensor.dtype)
  zeros = array_ops.zeros_like(tensor)
  dlist = tensor_list_scatter(zeros, indices, indices, input_handle=dlist)
  return dlist, dtensor, None
コード例 #7
0
ファイル: list_ops.py プロジェクト: datanonymous/TFandroid
def _TensorListScatterGrad(op, dlist):
  """Gradient function for TensorListScatter."""
  tensor = op.inputs[0]
  indices = op.inputs[1]
  dtensor = gen_list_ops.tensor_list_gather(
      dlist,
      indices,
      element_shape=array_ops.slice(array_ops.shape(tensor), [1], [-1]),
      element_dtype=tensor.dtype)
  if op.type == "TensorListScatterV2":
    return dtensor, None, None, None
  else:
    return dtensor, None, None
コード例 #8
0
ファイル: list_ops.py プロジェクト: terrytangyuan/tensorflow
def _TensorListScatterGrad(op, dlist):
  """Gradient function for TensorListScatter."""
  tensor = op.inputs[0]
  indices = op.inputs[1]
  dtensor = gen_list_ops.tensor_list_gather(
      dlist,
      indices,
      element_shape=array_ops.slice(array_ops.shape(tensor), [1], [-1]),
      element_dtype=tensor.dtype)
  if op.type == "TensorListScatterV2":
    return dtensor, None, None, None
  else:
    return dtensor, None, None
コード例 #9
0
ファイル: list_ops.py プロジェクト: becster/tensorflow
def _TensorListScatterGrad(op, dlist):
  t, indices, _ = op.inputs
  return gen_list_ops.tensor_list_gather(
      dlist, indices, element_dtype=t.dtype), None
コード例 #10
0
ファイル: list_ops.py プロジェクト: qwerzou1/shibie
def _TensorListScatterGrad(op, dlist):
    t, indices, _ = op.inputs
    return gen_list_ops.tensor_list_gather(dlist,
                                           indices,
                                           element_dtype=t.dtype), None