Skip to main content
. 2023 Nov 2;23(21):8913. doi: 10.3390/s23218913
Algorithm 2 Compression of Edge–LPR algorithm.
  • Require: 

    output minimum loss L, maximum average accuracy AP

  • Ensure: 

    maximizing model accuracy

  • 1:

    initialization;

  • 2:

    input images set xi and its label y, training round n;

  • 3:

    train the previous network model T to obtain αT;

  • 4:

    conduct channel pruning and get reward AP, R;

  • 5:

    add L1 regular constraint,

  • 6:

    classify using cross entropy loss, g(s)=s;

  • 7:

    calculate the model accuracy Loss using Equations (8) and (10);

  • 8:

    calculate the model accuracy AP using Equations (15);

  • 9:

    if n<N then

  • 10:

       repeat;

  • 11:

       update the previous weight network model T;

  • 12:

       end

  • 13:

    end if

  • 14:

    if n≥N then

  • 15:

       update the previous weight network model T;

  • 16:

       output L,AP;

  • 17:

    end if