AttributeError: 'Tensor' object has no attribute 'items' in swin

hello, i encounter this problem in line: for name, x in xs.items(), how to solve it, thanks

Tensors don’t have the items() method (which is a method of e.g. the dict class) and I’m unsure which method you are looking for, as it seems you would like to get a name and tensor from xs (I assume xs should be a dict or any other container?).