Comments (2)
It's a good way to init tensor by:
tensor = torch.FloatTensor(...).type_as(input)
or
tensor = torch.FloatTensor(...).to(input.device)
which guarantees all tensors are on the same device.
from image-adaptive-3dlut.
In some situation, training code raises a device error:
cuda error: an illegal memory access was encountered
After debug I found that the main reason is
Tensor
used during the training is not on the same device. For example:In
Generator3DLUT_identity
andGenerator3DLUT_zero
,self.LUT.device
iscpu
. InTrilinearInterpolationFunction
,int_package
andfloat_package
are also oncpu
. However, the input and the output of the network are cuda tensor, causing sometimes device error occurs when running the model.To solve the problem, it's better to init all tensors as the same and dynamic type, instead of initializing the tensor on fixed devices.
Could you explain more? I met this problem,but I don't know how to do this. Do you mean that we can put the LUT and TrilinearInterpolationFunction on the gpu?
from image-adaptive-3dlut.
Related Issues (20)
- Eval images corrupt when training using unpaired dataset HOT 1
- 你好!当我将3DLUT模型的pth模型转换到onnx模型的时候,出现trilinearInterpolationFunction报错,该怎么解决呢?
- python3 image_adaptive_lut_train_paired.py
- Segmentation fault while training HOT 6
- how to solve 3dlut banding HOT 1
- Fatal Error (Is it a LUT?) HOT 3
- 3DLUT 参数量计算 HOT 2
- LUT 学习方式 HOT 1
- CPU和GPU的运行结果不一致
- AttributeError: module 'trilinear' has no attribute 'forward' HOT 3
- 关于LUT的问题 HOT 1
- About TV_3D loss
- 關於kernel size
- 为什么 classifier 采用复杂网络,性能狂掉?
- 直接跑预训练模型 视频调色比较稳定,但是自己训练的模型无法复现预训练效果?
- 请问LUT1和LUT2是初始化为零的表,无法更新,那让它们乘上权重有什么意义呢?
- Can you tell me how to convert hdrplus dataset to XYZ colorspace
- trilinear_kernel HOT 1
- Cube file
- Segmentation fault
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 image-adaptive-3dlut.