akankshakshurai/cuda-error-resolution-analysis huggingface dataset:
Train resnet50 from scratch and finetune the pretrained resnet50 to do prediction

nikiguo93: <p>how to train resnet50 from scratch and how to finetune it?<br>
Can anybody give me an example?<br>
Would be thankful</p>

ptrblck: <p>The <a href="https://github.com/pytorch/examples/blob/2639cf050493df9d3cbf065d45e6025733add0f4/imagenet/main.py">PyTorch ImageNet example</a> might be a good starter for training the model from scratch (alternatively, check e.g. FastAI to use the latest training tips). Once this is done, you could use <a href="https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html">the finetuning tutorial</a> to finetune your model.</p>

nikiguo93: <p>Thank you so much. It is helpful. I have a question in the training loss. I found that the training loss converge slowly. Could you please tell me how to imporve this?</p>

ptrblck: <p>The convergence depends on e.g. the used optimizer, its hyperparameters etc.<br>
You could either run experiments using different training setups (based e.g. on the latest research) or check what training scripts in other repositories are using. As already mentioned before, FastAI has always stressed out to use the latest training techniques for a fast default convergence.</p>

nikiguo93: <p>Thanks for your suggestion. I did not initialize the parameters. It is said that in pytorch the __init__function has been designed to initialize model parameters automatically. Is that right?</p>

ptrblck: <p>You could usually initialize all <code>nn.Paremeters</code>, buffers, and other submodules in the <code>nn.Module.__init__</code> method. Afterwards you could use these objects in the <code>foward</code>.<br>
Each pre-defined module would then initialize its parameters via the <code>reset_parameters()</code> method as seen e.g. <a href="https://github.com/pytorch/pytorch/blob/7adb78017a81b656d22864ec97c072519a7dca63/torch/nn/modules/linear.py#L84-L96">here</a> for <code>nn.Linear</code>.</p>
Pytorch on raspberry pi (ARMv7l)

vikassingh: <p>I am trying to test my Trained model on raspberry pi 4.</p>
<p>whenever i am giving the test command i am getting the following error.</p>
<p>RuntimeError: invalid argument 1: RNG state is wrong size at /home/pi/pytorch/aten/src/TH/generic/THTensorRandom.cpp:443</p>
<p>could someone please help me with this?</p>

tom: <p>It’s not the answer you are lookingfor, but I’d recommend using arm64 on arm. You’ll bemuch happier…<br>
<a href="https://mathinf.com/pytorch/arm64/" rel="noopener nofollow ugc">Of course, I’m biased…</a></p>
<p>Bestregards</p>
<p>Thomas</p>

vikassingh: <p>Got the pytorch package for arm32, parallely i was trying on arm64 also there i was not able to get h5py package.<br>
Any suggestion for h5py package installation on arm32 raspberry pi.</p>

tom: <aside class="quote no-group" data-username="vikassingh" data-post="3" data-topic="127376">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/v/3ec8ea/48.png" class="avatar"> vikassingh:</div>
<blockquote>
<p>here i was not able to get h5py package.</p>
</blockquote>
</aside>
<p>Personally, I am a firm believer in using system Python as opposed to venv / conda etc., and then I can <code>apt-get install python3-h5py</code> on arm64 as well as arm32.</p>
<p>Best regards</p>
<p>Thomas</p>

vikassingh: <p>by using the mentioned command the package will be installed at root location<br>
then, how i can use the package from a particular environment ?</p>
<p>Regards,<br>
Vikas</p>