Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions app/Graph/onnx_subgraphs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ using namespace it_lab_ai;

void alexnet_inf_careless(Graph& graph, const RuntimeOptions& options,
Tensor& input, Tensor& output) {
auto* o = new Tensor(output);
auto* i = new Tensor(input);
graph.inference(options);
if (graph.getLayersCount() == 0) {
throw std::runtime_error("No layers");
}
graph.setOutput(graph.getLayerFromID(graph.getLayersCount() - 1), *o);
graph.setInput(graph.getLayerFromID(0), *i);
graph.setInput(graph.getLayerFromID(0), input);
graph.setOutput(graph.getLayerFromID(graph.getLayersCount() - 1), output);
graph.inference(options);
}

void alexnet_comparison() {
Expand Down
2 changes: 2 additions & 0 deletions include/layers/Shape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Shape {
Shape(const std::initializer_list<size_t>& l) : dims_(l) {}
Shape(const Shape& c) = default;
Shape& operator=(const Shape& c) = default;
Shape(Shape&&) noexcept = default;
Shape& operator=(Shape&&) noexcept = default;
size_t operator[](size_t i) const noexcept { return dims_[i]; }
size_t& operator[](size_t i) noexcept { return dims_[i]; }
[[nodiscard]] size_t at(size_t i) const {
Expand Down
4 changes: 2 additions & 2 deletions include/layers/Tensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class Tensor {
values_ = a;
}

Tensor(const Tensor& t) noexcept = default;
Tensor(const Tensor& t) = default;
Tensor(Tensor&& t) noexcept = default;
Tensor& operator=(const Tensor& t) noexcept = default;
Tensor& operator=(const Tensor& t) = default;
Tensor& operator=(Tensor&& t) noexcept = default;

[[nodiscard]] Shape get_shape() const { return shape_; }
Expand Down
Loading