Crate caffe2op_index

source ·

Structs

  • | Creates a dictionary that maps T keys | to consecutive integers from 1 to max_elements. | Zero is reserved for unknown keys. | | TODO(azzolini): support sizes larger | than int32 |
  • | Freezes the given index, disallowing | creation of new index entries. | | Should not be called concurrently with | IndexGet. |
  • | Given an index handle and a tensor of | keys, return an Int tensor of same shape | containing the indices for each of the | keys. If the index is frozen, unknown | entries are given index 0. Otherwise, | new entries are added into the index. | | If an insert is necessary but max_elements | has been reached, fail. |
  • | Loads the index from the given 1-D tensor. | Elements in the tensor will be given | consecutive indexes starting at 1. | Fails if tensor contains repeated elements. |
  • | Returns the number of entries currently | present in the index. |
  • | Stores the keys of this index in a 1-D | tensor. Since element 0 is reserved | for unknowns, the first element of the | output tensor will be element of index | 1. |

Type Definitions