-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Datatype conversion #2559
Comments
In both cases we can get the same conversion. Why not using the latter ? It's easy to understand and more concise than that in the example. Are are any special consideration in the example ? |
I think it is just not updated. You can open a PR for it. |
Actually the associated type is used to be compatible across backends. Not all backends are guaranteed to support the same element type for ints or float. For example, So changing that to |
I browsed the source code of |
The element types are set in the backend implementation. Take a look at the NdArray backend. The default For wgpu, the default uses f32 and i32 and the element types are also in the backend implementation. |
Hi,
This is a snapshot from https://github.com/tracel-ai/burn/blob/main/examples/custom-image-dataset/src/data.rs
The conversion is too complicated and cause confusions to users who are not familiar with burn. I converted the datatype of
TensorData
like this and got the same resultsThe text was updated successfully, but these errors were encountered: