Пример #1
0
 def lookup(self):
   """Returns cached_tree_ids, cached_node_ids, cached_logits."""
   cached_tree_ids, cached_node_ids, cached_logits = array_ops.split(
       lookup_ops.lookup_table_find_v2(
           self._table_ref, self._example_ids, default_value=[0.0, 0.0, 0.0]),
       [1, 1, self._logits_dimension],
       axis=1)
   cached_tree_ids = array_ops.squeeze(
       array_ops.bitcast(cached_tree_ids, dtypes.int32))
   cached_node_ids = array_ops.squeeze(
       array_ops.bitcast(cached_node_ids, dtypes.int32))
   return (cached_tree_ids, cached_node_ids, cached_logits)
Пример #2
0
 def lookup(self):
   """Returns cached_tree_ids, cached_node_ids, cached_logits."""
   cached_tree_ids, cached_node_ids, cached_logits = array_ops.split(
       lookup_ops.lookup_table_find_v2(
           self._table_ref, self._example_ids, default_value=[0.0, 0.0, 0.0]),
       [1, 1, self._logits_dimension],
       axis=1)
   cached_tree_ids = array_ops.squeeze(
       array_ops.bitcast(cached_tree_ids, dtypes.int32))
   cached_node_ids = array_ops.squeeze(
       array_ops.bitcast(cached_node_ids, dtypes.int32))
   return (cached_tree_ids, cached_node_ids, cached_logits)
Пример #3
0
 def lookup(self):
   """Returns cached_tree_ids, cached_node_ids, cached_logits."""
   cached_tree_ids, cached_node_ids, cached_logits = array_ops.split(
       lookup_ops.lookup_table_find_v2(
           self._table_ref,
           self._example_ids,
           default_value=[0.0, _DUMMY_NODE_ID, 0.0]),
       [1, 1, self._logits_dimension],
       axis=1)
   cached_tree_ids = array_ops.squeeze(
       array_ops.bitcast(cached_tree_ids, dtypes.int32))
   cached_node_ids = array_ops.squeeze(
       array_ops.bitcast(cached_node_ids, dtypes.int32))
   if self._example_ids.shape.ndims is not None:
     cached_logits.set_shape(
         [self._example_ids.shape[0], self._logits_dimension])
   return (cached_tree_ids, cached_node_ids, cached_logits)
Пример #4
0
 def lookup(self):
     """Returns cached_tree_ids, cached_node_ids, cached_logits."""
     cached_tree_ids, cached_node_ids, cached_logits = array_ops.split(
         lookup_ops.lookup_table_find_v2(
             self._table_ref,
             self._example_ids,
             default_value=[0.0, _DUMMY_NODE_ID,
                            0.0]), [1, 1, self._logits_dimension],
         axis=1)
     cached_tree_ids = array_ops.squeeze(
         array_ops.bitcast(cached_tree_ids, dtypes.int32))
     cached_node_ids = array_ops.squeeze(
         array_ops.bitcast(cached_node_ids, dtypes.int32))
     if self._example_ids.shape.ndims is not None:
         cached_logits.set_shape(
             [self._example_ids.shape[0], self._logits_dimension])
     return (cached_tree_ids, cached_node_ids, cached_logits)