RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be

Table of contents

All errors:

environment:

Foreword:

wrong reason:


All errors:

RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same。

environment:

torch 1.7.0+cu102

torchvision 0.8.1+cu102

mmcv-full (torch1.7.0+cuda10.2)

System: Centos 7

Foreword:

This error was reported when using mmclassification to complete the classification task!

First of all, because  mmclassification is an algorithm packaged by SenseTime, there is no need to suspect that there is a problem inside the algorithm.

Before that, I modified the data augmentation in the configuration file .

wrong reason:

An error occurred with the use of data augmentation:

1. Delete Normalize from standardization (very likely)

2. The position is wrong (data enhancement operates on the data in order from top to bottom, probably because the order is wrong) (possible, but unlikely)

Note: I am reporting an error here because I deleted the standardization . When doing experiments before, it was found that the test results obtained without standardized training were better.

The official example given:

Tutorial 4: How to Design a Data Processing Process — MMClassification 0.23.2 documentation

All data augmentations are detailed here: (mmcls/datasets/pipelines/__init__.py)

     QQ: 1757092754 Welcome to study and communicate together! 

Guess you like

Origin blog.csdn.net/m0_61139217/article/details/126432425