Skip to content

Conversation

lancerts
Copy link
Collaborator

@lancerts lancerts commented Jan 12, 2024

  1. Update the Caltech 101 dataset URL in readme.
  2. random_shuffle: is not a member of 'std' since it c++17, updated to shuffle.
  3. Functional(torch::log_softmax, 1, torch::nullopt) no longer matches the constructor, updated to lambda expression.
  4. auto tlabel = torch::from_blob(&data[index].second, {1}, torch::kLong); sometimes leads to non-sensical numerical value.
    A few examples from std::cout:
data[index].second: 42 
tlabel:  42 [ CPULongType{1} ] 
data[index].second: 10 
tlabel:  10 [ CPULongType{1} ] 
data[index].second: 98 
tlabel:  4.6698e+16

Updated to direct the creation of a tensor instead of creation from a pointer.

Tested the program via libtorch (2.1.2) with cuda 12.1 using both the release and debug build.

Copy link

netlify bot commented Jan 12, 2024

Deploy Preview for pytorch-examples-preview canceled.

Name Link
🔨 Latest commit fb0ecc7
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-examples-preview/deploys/65a1b7b2ee76ec00087bc152

@lancerts lancerts marked this pull request as ready for review January 12, 2024 22:06
@msaroufim msaroufim self-requested a review January 13, 2024 02:25
@msaroufim msaroufim merged commit 97adea1 into pytorch:main Jan 13, 2024
@lancerts lancerts deleted the custom-dataset-fix branch January 24, 2024 18:46
YinZhengxun pushed a commit to YinZhengxun/mt-exercise-02 that referenced this pull request Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants