Hi,
Hoping someone is still following this class. I’m running the course labs locally. In Lab3 I run into an issue while Checking device accuracy.
torch_inputs = torch.Tensor(sample_inputs[‘image’][0])
torch_outputs = ffnet_40s(torch_inputs)
torch_outputs
Throws an error:
RuntimeError: Given groups=1, weight of size [32, 3, 3, 3], expected input[1, 1024, 2048, 3] to have 3 channels, but got 1024 channels instead
Could it be related to the warning received after running:
from qai_hub_models.models.ffnet_40s import Model as FFNet_40s
Load from pre-trained weights
ffnet_40s = FFNet_40s.from_pretrained()
Loading pretrained model state dict from /home/chuck/.qaihm/models/ffnet/v1/ffnet40S/ffnet40S_dBBB_cityscapes_state_dict_quarts.pth
Initializing ffnnet40S_dBBB_mobile weights
/home/chuck/.qaihm/models/cityscapes_segmentation/v2/Qualcomm-AI-research_FFNet_git/models/ffnet_blocks.py:599: FutureWarning: You are using torch.load
with weights_only=False
(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See pytorch/SECURITY.md at main · pytorch/pytorch · GitHub for more details). In a future release, the default value for weights_only
will be flipped to True
. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals
. We recommend you start setting weights_only=True
for any use case where you don’t have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
pretrained_dict = torch.load(
V/r,
Chuck