This repository has been archived on 2019-09-17. You can view files and clone it, but cannot push or open issues or pull requests.
Files
research-project/src/LayerInfo.hpp
Bert Peters 35ad3df4ca Compute the 1000 most interacting nodes in each layer.
This works for fully connected layers only, but it works.
2018-02-12 15:51:50 +01:00

39 lines
859 B
C++

#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,
InnerProduct,
Other
};
LayerInfo(std::string_view name, std::string_view type,
const std::vector<boost::shared_ptr<caffe::Blob<DType>>> &parameters);
const std::string& name() const;
Type type() const;
const std::vector<boost::shared_ptr<caffe::Blob<DType>>>& parameters() const;
static Type typeByName(std::string_view name);
private:
std::vector<boost::shared_ptr<caffe::Blob<DType>>> parameters_;
Type type_;
std::string name_;
};
}