Skip to content

Commit

Permalink
[NeoML] BaseLayer use BlobDesc.MemorySize
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Golikov <[email protected]>
  • Loading branch information
favorart committed Apr 25, 2024
1 parent d2a783b commit 6bd5ea7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NeoML/src/Dnn/BaseLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@ void CBaseLayer::reshape()
{
NeoAssert( dnn != 0 ); // possible only in a network

if( !isReshapeNeeded && !forcedReshape) {
if( !isReshapeNeeded && !forcedReshape ) {
return;
}
isReshapeNeeded = false;

CArray<CBlobDesc> prevInputDescs;
inputDescs.MoveTo( prevInputDescs );
inputDescs.SetSize(inputs.Size());
inputDescs.CopyTo( prevInputDescs ); // do not delete, do not loose the memory_size
inputDescs.SetSize( inputs.Size() );

// Call the input layers reshape recursively, reset the input blobs
for( int i = 0; i < GetInputCount(); ++i ) {
GetInputLayer(i)->reshape();
Expand Down

0 comments on commit 6bd5ea7

Please sign in to comment.