Implement a new layer data type.
Contrary to layerdata, this describes the layer itself rather than the layer contents.
This commit is contained in:
35
src/LayerInfo.hpp
Normal file
35
src/LayerInfo.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
#include <caffe/blob.hpp>
|
||||
#include <string>
|
||||
#include "utils.hpp"
|
||||
|
||||
namespace fmri
|
||||
{
|
||||
class LayerInfo
|
||||
{
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
Input,
|
||||
Convolutional,
|
||||
ReLU,
|
||||
Pooling,
|
||||
Output,
|
||||
Other
|
||||
};
|
||||
|
||||
LayerInfo(std::string_view name, std::string_view type,
|
||||
const std::vector<boost::shared_ptr<caffe::Blob<DType>>> ¶meters);
|
||||
|
||||
const std::string& name() const;
|
||||
|
||||
static Type typeByName(std::string_view name);
|
||||
|
||||
private:
|
||||
std::vector<boost::shared_ptr<caffe::Blob<DType>>> parameters_;
|
||||
Type type_;
|
||||
std::string name_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user