Skip to content

Conversation

@Leon-Gee
Copy link

hello i was hoping to help contributing with the aceess of this dataset through the open source hub package. i made an easy 2 line description of code on how to do this:

# Load kmnist-training set in python
import hub
ds = hub.load("hub://activeloop/kmnist-train")

# Load kmnist-test set in python
#ds = hub.load("hub://activeloop/kmnist-test")



# Checking out the first number and his label
import matplotlib.pyplot as plt
img = ds.images[0].numpy() 
plt.imshow(img)
plt.title(f"{ds.labels[0].numpy(aslist=True)}")
plt.show()

# train a model in pytorch
for sample in ds.pytorch():
    # ... model code here ...

# train a model in tensorflow
for sample in ds.tensorflow():
    # ... model code here ...

@Leon-Gee
Copy link
Author

If you would like me to review it let me know it:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant