QuietWoods

Results 7 comments of QuietWoods

根据test_aggregation_zeropad函数将aggregation_zeropad用torch api 实现,以下仅供参考: ```text def custom_aggregation_zeropad(input, weight, kernel_size=3, stride=1, padding=0, dilation=1): """ 自定义,用torch api实现 """ head_num = 2 n, c_x, c_w, in_height, in_width = input.shape[0], input.shape[1], weight.shape[2], input.shape[-2], input.shape[-1] out_height...

Are you using python3, if it is, change to python3 print format.Like this: python2 version: print "...." python3 version: print("....")

> Hi, how to generate data in the format required by segformer model? @ZhuangChen25674 依照cityscapes,把图片放一个文件夹,mask放另一个文件夹。 参考: docs/tutorials/customize_datasets.md

> hi, can i ask you a question?when i train segformer code in my pc,i got a error which i cannot solve,i have tried both methods and still cannot solve...

Comment on this line of code,it works for me. ``` # assert palette.shape[0] == len(self.CLASSES) assert palette.shape[1] == 3 assert len(palette.shape) == 2 ```

What is the value of num_classes?

参考 docs/tutorials/customize_datasets.md 1.在 local_configs/datasets 仿照cityscapes.py写一个自定义数据集文件。 里面的dataset_type改成CustomDataset。data_root写你自己的数据集路径。 `dataset_type = 'CustomDataset'` 2. 仿照local_configs/segformer/B1/segformer.b1.512x512.ade.160k.py,写一个自定义配置文件。 before: ` _base_ = [ '../../_base_/models/segformer.py', '../../_base_/datasets/ade20k_repeat.py', '../../_base_/default_runtime.py', '../../_base_/schedules/schedule_160k_adamw.py' ] num_classes=150, ` after: ` _base_ = [ '../../_base_/models/segformer.py', '../../_base_/datasets/custom.py',...