Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
caffe2::TensorSerializer< Context > Class Template Reference

TensorSerializer is the serializer for Tensors. More...

#include <blob_serialization.h>

Inheritance diagram for caffe2::TensorSerializer< Context >:
caffe2::BlobSerializerBase

Public Member Functions

void Serialize (const Blob &blob, const string &name, SerializationAcceptor acceptor) override
 Serializes a Blob. More...
 
void SerializeWithChunkSize (const Blob &blob, const string &name, SerializationAcceptor acceptor, int chunk_size) override
 
void Serialize (const Tensor< Context > &tensor, const string &name, TensorProto *proto, size_t chunkBegin, int32_t chunkSize)
 
- Public Member Functions inherited from caffe2::BlobSerializerBase
virtual void Serialize (const Blob &blob, const std::string &name, SerializationAcceptor acceptor)=0
 The virtual function that returns a serialized string for the input blob. More...
 
virtual void SerializeWithChunkSize (const Blob &blob, const std::string &name, SerializationAcceptor acceptor, int)
 

Additional Inherited Members

- Public Types inherited from caffe2::BlobSerializerBase
using SerializationAcceptor = std::function< void(const std::string &blobName, const std::string &data)>
 

Detailed Description

template<class Context>
class caffe2::TensorSerializer< Context >

TensorSerializer is the serializer for Tensors.

TensorSerializer takes in a blob that contains a Tensor, and serializes it into a TensorProto protocol buffer.

Definition at line 62 of file blob_serialization.h.

Member Function Documentation

template<class Context >
void caffe2::TensorSerializer< Context >::Serialize ( const Blob blob,
const string &  name,
BlobSerializerBase::SerializationAcceptor  acceptor 
)
override

Serializes a Blob.

Note that this blob has to contain Tensor<Context>, otherwise this function produces a fatal error.

Definition at line 202 of file blob_serialization.h.


The documentation for this class was generated from the following file: