You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by Georges Alkhouri <ge...@stud.htwk-leipzig.de> on 2016/07/20 15:26:56 UTC

Extract final feature vector after training

Hello dear Singa Community,

is it possible to extract features after the model is trained and saved to the checkpoint path?

My setup is quiet similar like the RBM example setup. (Please look at the attachment)

I want to extract the „Inner4“ layer AFTER the network is trained. I tried to add an output layer to the 
config before training and I got all „Inner4“ layer feature vectors from every training epoch.
But I just want the final trained feature vector.

Is this possible? What did I miss?

Thank you very much

Best regards,


Georges



Re: Extract final feature vector after training

Posted by Wang Wei <wa...@comp.nus.edu.sg>.
You can do it in this way,
1. train your model and checkpoint it into a file (do not add the output
layer)
2. use the checkpoint file to extract the features of your training data,
following the instructions of "Performance Test" and "Feature Extraction"
http://singa.apache.org/docs/test.html.  For this step, you need to update
the job config to add a CSVOutput layer.

On Thu, Jul 28, 2016 at 1:36 AM, Georges Alkhouri <
georges.alkhouri@stud.htwk-leipzig.de> wrote:

> Hey Wei,
>
> I did read the instructions and added an output layer to my config file
> (Attachment).
>
> The problem is that with EACH training step it’ll extract the feature
> vector to my output CSV file.
> Is it possible to just extract the LAST FINAL TRAINING STEP? Imagine I
> want to extract a layer with 1000 nodes, in every training step it’ll add a
> vector with a length of 1000 to my output file. The file will get pretty
> huge.
>
> Thanks and with best regards,
>
>
> Georges
>
>
> On 22 Jul 2016, at 05:15, Wang Wei <wa...@comp.nus.edu.sg> wrote:
>
> Hi Georges,
>
> Please refer to the instructions in this page
> http://singa.apache.org/docs/test.html
> Should you have other problems, feel free to contact us.
>
> regards,
> Wei
>
> On Wed, Jul 20, 2016 at 11:26 PM, Georges Alkhouri <
> georges.alkhouri@stud.htwk-leipzig.de> wrote:
>
> Hello dear Singa Community,
>
> is it possible to extract features after the model is trained and saved to
> the checkpoint path?
>
> My setup is quiet similar like the RBM example setup. (Please look at the
> attachment)
>
> I want to extract the „Inner4“ layer AFTER the network is trained. I tried
> to add an output layer to the
> config before training and I got all „Inner4“ layer feature vectors from
> every training epoch.
> But I just want the final trained feature vector.
>
> Is this possible? What did I miss?
>
> Thank you very much
>
> Best regards,
>
>
> Georges
>
>
>
>
>
>
>
>

Re: Extract final feature vector after training

Posted by Georges Alkhouri <ge...@stud.htwk-leipzig.de>.
Hey Wei,

I did read the instructions and added an output layer to my config file (Attachment). 

The problem is that with EACH training step it’ll extract the feature vector to my output CSV file.
Is it possible to just extract the LAST FINAL TRAINING STEP? Imagine I want to extract a layer with 1000 nodes, in every training step it’ll add a vector with a length of 1000 to my output file. The file will get pretty huge.

Thanks and with best regards,


Georges


> On 22 Jul 2016, at 05:15, Wang Wei <wa...@comp.nus.edu.sg> wrote:
> 
> Hi Georges,
> 
> Please refer to the instructions in this page
> http://singa.apache.org/docs/test.html
> Should you have other problems, feel free to contact us.
> 
> regards,
> Wei
> 
> On Wed, Jul 20, 2016 at 11:26 PM, Georges Alkhouri <
> georges.alkhouri@stud.htwk-leipzig.de> wrote:
> 
>> Hello dear Singa Community,
>> 
>> is it possible to extract features after the model is trained and saved to
>> the checkpoint path?
>> 
>> My setup is quiet similar like the RBM example setup. (Please look at the
>> attachment)
>> 
>> I want to extract the „Inner4“ layer AFTER the network is trained. I tried
>> to add an output layer to the
>> config before training and I got all „Inner4“ layer feature vectors from
>> every training epoch.
>> But I just want the final trained feature vector.
>> 
>> Is this possible? What did I miss?
>> 
>> Thank you very much
>> 
>> Best regards,
>> 
>> 
>> Georges
>> 
>> 
>> 
>> 
>> 


Re: Extract final feature vector after training

Posted by Wang Wei <wa...@comp.nus.edu.sg>.
Hi Georges,

Please refer to the instructions in this page
http://singa.apache.org/docs/test.html
Should you have other problems, feel free to contact us.

regards,
Wei

On Wed, Jul 20, 2016 at 11:26 PM, Georges Alkhouri <
georges.alkhouri@stud.htwk-leipzig.de> wrote:

> Hello dear Singa Community,
>
> is it possible to extract features after the model is trained and saved to
> the checkpoint path?
>
> My setup is quiet similar like the RBM example setup. (Please look at the
> attachment)
>
> I want to extract the „Inner4“ layer AFTER the network is trained. I tried
> to add an output layer to the
> config before training and I got all „Inner4“ layer feature vectors from
> every training epoch.
> But I just want the final trained feature vector.
>
> Is this possible? What did I miss?
>
> Thank you very much
>
> Best regards,
>
>
> Georges
>
>
>
>
>