-
Notifications
You must be signed in to change notification settings - Fork 5
Graph with layer #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Graph with layer #38
Conversation
void removeLayer(Layer& lay); | ||
int getLayers() const; | ||
int getEdges() const; | ||
bool empty() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool empty() const; | |
bool isEmpty() const; |
std::vector<int> BFS(int start); | ||
void setInput(Layer& lay, Tensor<double>& vec); | ||
void setOutput(Layer& lay, Tensor<double>& vec); | ||
void inference(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void inference(); | |
void run(); |
int getEdges() const; | ||
bool empty() const; | ||
bool hasPath(Layer& layPrev, Layer& layNext) const; | ||
std::vector<int> BFS(int start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector<int> BFS(int start); | |
std::vector<int> inference(int start); |
public: | ||
Layer() = default; | ||
virtual ~Layer() = default; | ||
void setID(int id) { id_ = id; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be string form with integer ID
virtual ~Layer() = default; | ||
void setID(int id) { id_ = id; } | ||
int getID() const { return id_; } | ||
virtual void run(const Tensor<double>& input, Tensor<double>& output) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual void run(const Tensor<double>& input, Tensor<double>& output) = 0; | |
virtual void exec(const Tensor<double>& input, Tensor<double>& output) = 0; |
void addNeighbor(Layer* neighbor); | ||
void removeNeighbor(Layer* neighbor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it important? I think its part of graph
#include "./layer/layer.h" | ||
#include "./tensor/tensor.h" | ||
|
||
class Graph { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Graph { | |
class Network { |
or Model
int id_; | ||
|
||
public: | ||
Layer() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please create constructor with abstract class of attributes, @aobolensk what do you think?
void addLayer(Layer& lay); | ||
void addEdge(Layer& layPrev, Layer& layNext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void addLayer(Layer& lay); | |
void addEdge(Layer& layPrev, Layer& layNext); | |
bool addLayer(Layer& lay, std::vector<LayerID>& InputsLayers, std::vector<LayerID>& OutputLayers); |
bool for check - Layer is added or not
addEdge is redudant
No description provided.