Crate caffe2_serde

source ·

Macros

Structs

  • | DeserializeParams is just a helper | class to consolidate the parameters | required for deserializing tensor | data so they can be passed around more | easily. | | It also contains some helper functions | to perform some operations on the parameters | that are shared by multiple deserialization | functions. |
  • this is a reader implemented by std::istream



  • | SerializeParams is just a helper class | to consolidate the parameters required | for serializing tensor data so they | can be passed around more easily. | | It also contains some helper functions | to perform some operations on the parameters | that are shared by multiple serialization | functions. |
  • | @brief | | StringDeserializer is the deserializer | for Strings. |
  • | @brief | | StringSerializer is the serializer | for | | String. | | StringSerializer takes in a blob that | contains a String, and serializes it | into a BlobProto protocol buffer. |
  • | @brief | | TensorDeserializer is the deserializer | for Tensors. | | The device that the deserialized Tensor | will live under is determined by the | device_detail field. If you want to | specify the device of the deserialized | tensor, change the TensorProto’s corresponding | fields before calling | | Deserialize. |
  • | ———– | @brief | | TensorSerializer is the serializer | for Tensors. | | TensorSerializer takes in a blob that | contains a Tensor, and serializes it | into a TensorProto protocol buffer. |

Constants

Traits

  • | @brief | | BlobDeserializerBase is an abstract | class that deserializes a blob from | a BlobProto or a TensorProto. |
  • | @brief | | BlobSerializerBase is an abstract | class that serializes a blob to a string. | | This class exists purely for the purpose | of registering type-specific serialization | code. If you need to serialize a specific | type, you should write your own Serializer | class, and then register it using | | REGISTER_BLOB_SERIALIZER. For a detailed | example, see TensorSerializer for | details. |
  • this is the interface for the (file/stream/memory) reader in PyTorchStreamReader. with this interface, we can extend the support besides standard istream

Functions

Type Definitions