question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] PyTorch & Tensorflow aliases for datasets

See original GitHub issue

🚨🚨 Feature Request

  • Related to an existing Issue
  • A new implementation (Improvement, Extension)

If your feature will improve HUB

These methods of converting hub datasets to PyTorch or TensorFlow exist right now:

ds.tensorflow
ds.pytorch

Aliases of the same methods can be created, e.g.:

ds.tf
ds.torch

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AbhinavTulicommented, Sep 13, 2021

Hey @muhdhisham! It’s good to see that you’re interested in contributing to hub. Adding an alias for methods in Python is rather trivial. You need to navigate to the Dataset class in hub/core/dataset.py and make the changes. Adding aliases should be very similar to how this alias is defined here https://github.com/activeloopai/Hub/blob/main/hub/core/dataset.py#L480

0reactions
dhiganthraocommented, Oct 8, 2021

Closing this issue as it’s been resolved by @muhdhisham. Thank you for your contribution to Hub!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using a Dataset with PyTorch/Tensorflow - Hugging Face
Setting a specific format allow to cast dataset examples as PyTorch/Tensorflow/Numpy/Pandas tensors, arrays or DataFrames and to filter out some columns. A ...
Read more >
A tale of two frameworks. Tensorflow and Pytorch
In this tutorial, I'll walk you through the same example in both frameworks, including side-by-side comparisons of a few best practices such as:....
Read more >
Text generation with an RNN - TensorFlow
This tutorial demonstrates how to generate text using a character-based RNN. You will work with a dataset of Shakespeare's writing from ...
Read more >
tf.convert_to_tensor | TensorFlow v2.11.0
This function converts Python objects of various types to Tensor objects. It accepts Tensor objects, numpy arrays, Python lists, and Python scalars.
Read more >
tf.cast | TensorFlow v2.11.0
Casts a tensor to a new type. View aliases.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found