Giter VIP home page Giter VIP logo

Comments (7)

martian07 avatar martian07 commented on August 21, 2024 4

resolved with
!pip install torch==1.0.1 torchvision==0.2.2

from sentiment-discovery.

martian07 avatar martian07 commented on August 21, 2024

same error, even tried earlier commits still didn't ran

from sentiment-discovery.

forest1988 avatar forest1988 commented on August 21, 2024

I encountered a similar problem.

It seems that the defined 'DataLoader' in this repository corresponds to the old 'DataLoader' and does not support the newer version.

https://github.com/NVIDIA/sentiment-discovery/blob/master/data_utils/loaders.py#L91
I added 2 lines in def __init__() of class DataLoader(data.DataLoader) as below.

class DataLoader(data.DataLoader):
    """normal data loader except with options for distributed data batch sampling + wrap around"""
    def __init__(self, dataset, batch_size=1, shuffle=False, sampler=None, batch_sampler=None,
                 num_workers=0, collate_fn=default_collate, pin_memory=False, drop_last=False,
                 transpose=False, world_size=2, rank=-1, distributed=False, wrap_last=False,
                 timeout=0, worker_init_fn=None):
        self.dataset = dataset

        # added 2019-11-24
        self._dataset_kind = None
        self.multiprocessing_context = None

        self.batch_size = batch_size

I haven't confirmed that it works correctly, but at least it works without error.

from sentiment-discovery.

forest1988 avatar forest1988 commented on August 21, 2024

Unfortunately, the method I wrote above may not be performing properly.
I tried using "Finetuned Plutchik Transformer" by the way above, but it doesn't seem to get good results...

self._dataset_kind = None

may be undesirable.

from sentiment-discovery.

matthias-tschoepe avatar matthias-tschoepe commented on August 21, 2024

I had a similar problem maybe it helps someone: I tried to load my own Dataloader object, which I saved with a previous version of Pytorch. After updating Pytorch my Dataloader object could be loaded, but I couldn't iterate over it. So, I had to create a new Dataloader object with the new Pytorch version.

from sentiment-discovery.

ArronChan avatar ArronChan commented on August 21, 2024

I had a similar problem maybe it helps someone: I tried to load my own Dataloader object, which I saved with a previous version of Pytorch. After updating Pytorch my Dataloader object could be loaded, but I couldn't iterate over it. So, I had to create a new Dataloader object with the new Pytorch version.

how to create a new Dataloader object with the new Pytorch version? I am so confused

from sentiment-discovery.

mgayari avatar mgayari commented on August 21, 2024

AttributeError: 'DirectoryDataLoader' object has no attribute 'label_map'. Please help.

from sentiment-discovery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.