it will return an empty dataset. because there is no pictures in folder mamma and avian.
You can just create softlink in linux, to make them in the same folder.
Also the source code of Imagefolder is really simple to read and modify, you can inherit it and make some modify. have a try.
like
class TrainImageFolder(ImageFolder):

    def __getitem__(self, index):
            filename = self.imgs[index]#  'avian/crow/nsdf3.png'
            if filename.split('/')[0] =='avian': label = 0
            ### or 
            # if filename.split('/')[1] =='dog': label = 0
            return super(TrainImageFolder, self).__getitem__(index)[0],  label