Comments (5)
你好,请问一下你train_data数据集是从哪下载的, 因为train.py包含:
tra_image_dir = os.path.join('DUTS', 'DUTS-TR', 'DUTS-TR', 'im_aug' + os.sep)
tra_label_dir = os.path.join('DUTS', 'DUTS-TR', 'DUTS-TR', 'gt_aug' + os.sep)
from ieee_tip_uiu-net.
from ieee_tip_uiu-net.
您好,我在使用其它两种数据集训练时,在一个epoch下,不同批次会出现报错 l0: 0.010986, l1: 0.011472, l2: 0.014452, l3: 0.004034, l4: 0.004883, l5: 0.013490, l6: 0.004046
[epoch: 1/500, batch: 45/ 213, ite: 15] train loss: 0.884871, tar: 0.183994 Traceback (most recent call last): File "D:\contrast-methods\IEEE_TIP_UIU-Net-main\train.py", line 139, in for i, data in enumerate(salobj_dataloader): File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 630, in next data = self._next_data() ^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data return self._process_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data data.reraise() File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch_utils.py", line 694, in reraise raise exception RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop data = fetcher.fetch(index) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\fetch.py", line 54, in fetch return self.collate_fn(data) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 265, in default_collate return collate(batch, collate_fn_map=default_collate_fn_map) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 127, in collate return elem_type({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 127, in return elem_type({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 119, in collate return collate_fn_map[elem_type](batch, collate_fn_map=collate_fn_map) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 162, in collate_tensor_fn return torch.stack(batch, 0, out=out) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: torch.cat(): input types can't be cast to the desired output type Byte。 请问这种错误有解决方案吗?
你好,我也遇到这个问题了,请问您解决了吗
from ieee_tip_uiu-net.
将num_workers改成0貌似就可以了。
from ieee_tip_uiu-net.
作者为了提速把num_workers设置为1,就是多一个子进程数量,在train.py文件里面找到如下代码把num_workers改成0就好了,但是训练速度会下降
salobj_dataset = SalObjDataset(
img_name_list=tra_img_name_list,
lbl_name_list=tra_lbl_name_list,
transform=transforms.Compose([
RescaleT(320),
RandomCrop(288),
ToTensorLab(flag=0)]))
salobj_dataloader = DataLoader(salobj_dataset, batch_size=batch_size_train, shuffle=False, num_workers=0, drop_last=True) #shuffle=True 乱序
from ieee_tip_uiu-net.
Related Issues (18)
- forget to upload model
- 你好,请问什么时候开源全部代码? HOT 8
- 在test.py中IoU=total_IoU/20为什么除以20? HOT 1
- #测试Quantification_Results和Verification_data数据结果均接近于0?? HOT 8
- What is the difference between your work and the U^2 net? HOT 2
- YOLOv7添加该网络 HOT 1
- the model is available just for chinese HOT 1
- 请问论文中所述Synthetic dataset 选取6200张图像,具体是怎么实现的?
- Provide tutorial
- 关于传统算法指标计算问题
- requirements and IoU values HOT 3
- 为什么我测试出来iou比niou还小
- Modify input shape
- 建议requirements中依赖包的版本指明
- train_data问题
- test.py代码的问题
- 不能生成预测的图片吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ieee_tip_uiu-net.