class_docstr: Img2Vec is a ``torch.nn.module`` that returns image embeddings.
  
  For this, it uses a pretrained `torchvision.torch.resnext50_32x4d`, with its final fully connected layer removed.
  
  Output is a `self.output_size`-dimensioned vector, generated by taking the output of the Resnext's last convolutional layer and performing an adaptive channel pool average. 
class_docstr_tok: ["Img2Vec","is","a","``","torch.nn.module","``","that","returns","image","embeddings",".","For","this",",","it","uses","a","pretrained","`","torchvision.torch.resnext50_32x4d","`",",","with","its","final","fully","connected","layer","removed",".","Output","is","a","`","self.output_size","`","-dimensioned","vector",",","generated","by","taking","the","output","of","the","Resnext","'s","last","convolutional","layer","and","performing","an","adaptive","channel","pool","average","."]
code: def to(self, device, available_devices=1):
      self.device = device
      self.model = self.model.to(self.device)
      return self
  
file_path: lightwood/lightwood/encoder/image/helpers/img_to_vec.py
imports: import torch
  import torch.nn
  from lightwood.helpers.device import get_device_from_name
  from lightwood.helpers.torch import LightwoodAutocast
  from lightwood.helpers.log import log
label_desc: Use image node_id 2 for calling the Img2Vec obj's underlying member method code with example usage: obj.to(device, available_devices) and returns: self