File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,14 +16,12 @@ using namespace it_lab_ai;
1616
1717void alexnet_inf_careless (Graph& graph, const RuntimeOptions& options,
1818 Tensor& input, Tensor& output) {
19- auto * o = new Tensor (output);
20- auto * i = new Tensor (input);
21- graph.inference (options);
2219 if (graph.getLayersCount () == 0 ) {
2320 throw std::runtime_error (" No layers" );
2421 }
25- graph.setOutput (graph.getLayerFromID (graph.getLayersCount () - 1 ), *o);
26- graph.setInput (graph.getLayerFromID (0 ), *i);
22+ graph.setInput (graph.getLayerFromID (0 ), input);
23+ graph.setOutput (graph.getLayerFromID (graph.getLayersCount () - 1 ), output);
24+ graph.inference (options);
2725}
2826
2927void alexnet_comparison () {
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ class Shape {
1919 Shape (const std::initializer_list<size_t >& l) : dims_(l) {}
2020 Shape (const Shape& c) = default ;
2121 Shape& operator =(const Shape& c) = default ;
22+ Shape (Shape&&) noexcept = default ;
23+ Shape& operator =(Shape&&) noexcept = default ;
2224 size_t operator [](size_t i) const noexcept { return dims_[i]; }
2325 size_t & operator [](size_t i) noexcept { return dims_[i]; }
2426 [[nodiscard]] size_t at (size_t i) const {
Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ class Tensor {
8686 values_ = a;
8787 }
8888
89- Tensor (const Tensor& t) noexcept = default ;
89+ Tensor (const Tensor& t) = default ;
9090 Tensor (Tensor&& t) noexcept = default ;
91- Tensor& operator =(const Tensor& t) noexcept = default ;
91+ Tensor& operator =(const Tensor& t) = default ;
9292 Tensor& operator =(Tensor&& t) noexcept = default ;
9393
9494 [[nodiscard]] Shape get_shape () const { return shape_; }
You can’t perform that action at this time.
0 commit comments