Topic 1 Question 31
You need to train a computer vision model that predicts the type of government ID present in a given image using a GPU-powered virtual machine on Compute Engine. You use the following parameters: ✑ Optimizer: SGD ✑ Image shape = 224ֳ—224 ✑ Batch size = 64 ✑ Epochs = 10 ✑ Verbose =2 During training you encounter the following error: ResourceExhaustedError: Out Of Memory (OOM) when allocating tensor. What should you do?
Change the optimizer.
Reduce the batch size.
Change the learning rate.
Reduce the image shape.
解説
ユーザの投票
コメント(13)
B. I think you want to reduce batch size. Learning rate and optimizer shouldn't really impact memory utilisation. Decreasing image size (A) would work, but might be costly in terms final performance
👍 22maartenalexander2021/06/22- 👍 9guruguru2021/07/24
B is correct, it uses less memory.
A works too but depending on what you need you will loose perfomance (just like maartenalexander said) so I think it is not recommended.
👍 3mousseUwU2021/10/20
シャッフルモード