faustomilletari / VNet

GNU General Public License v3.0
284 stars 123 forks source link

Does Random seed information required? #17

Closed sagarhukkire closed 7 years ago

sagarhukkire commented 7 years ago

Hi Fausto

I am trying to train the model for testing with 10 iteration , every time I see the loss values ,they are changing?

is it normal or do i need to keep any seed information in VNet?

Thanks Sagar

faustomilletari commented 7 years ago

Hello,

The initialization changes every time. You can specify a seed by adding the relevant code to the implementation. Be sure you initialize the seed "caffe style" (meaning in a way that caffe understands.

Fausto Milletarì Sent from my iPhone

On 1 Mar 2017, at 02:20, sagarax009 notifications@github.com wrote:

Hi Fausto

I trying train the model for testing with 10 iteration , every time I see the loss values ,they are changing?

is it normal or do i need to keep any seed information in VNet?

Thanks Sagar

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

sagarhukkire commented 7 years ago

Thanks ,I updated the _caffe.cpp and _init.py for set_random_seed field. And in Vnet.py in solver.prototxt I mentioned number for random_seed field.

Even model reads the value ,still there is different values for different runs.

One question does this random seed matters, if I do not use will it affect on performance?

Sagar Hukkire

On Wed, Mar 1, 2017 at 11:12 AM, Fausto Milletari notifications@github.com wrote:

Hello,

The initialization changes every time. You can specify a seed by adding the relevant code to the implementation. Be sure you initialize the seed "caffe style" (meaning in a way that caffe understands.

Fausto Milletarì Sent from my iPhone

On 1 Mar 2017, at 02:20, sagarax009 notifications@github.com wrote:

Hi Fausto

I trying train the model for testing with 10 iteration , every time I see the loss values ,they are changing?

is it normal or do i need to keep any seed information in VNet?

Thanks Sagar

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/faustomilletari/VNet/issues/17#issuecomment-283299443, or mute the thread https://github.com/notifications/unsubscribe-auth/ATFxy6m_0Q5406QZ5g1UDRHg_psbLmiEks5rhUR6gaJpZM4MPTan .

sagarhukkire commented 7 years ago

@faustomilletari Hi I am able to fix it...thanks. I have few changes which may help people. 1) in solver.cpp for softmax ExactBottomblob should be 2 instead of 3 2) for deterministic result random_seed field should be imported in caffe.cpp and _init.py and same is used in prototxt

One question: in Vnet.py I can see the matplot for loss,but where it is generated or stored in particular folder?

sagarhukkire commented 7 years ago

addition of double loss

i understand this are dice value for bottom and top but for batch size 1 also my loss value getting more than 1.Can you guide me why this might be reason?

faustomilletari commented 7 years ago

Should be dice for each volume in batch...

Fausto Milletarì Sent from my iPhone

On 2 Mar 2017, at 06:58, sagarax009 notifications@github.com wrote:

what are this two values for loss?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

sagarhukkire commented 7 years ago

loss_crossing1

Thats true . But my batch size is 1. So my loss should converge upto to 1 not more than that.

Do you I need to normalize ?