Giter VIP home page Giter VIP logo

cache's People

Contributors

ringbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cache's Issues

请问dataset.py文件的refresh方法的作用是什么?

https://github.com/Ringbo/Cache/blob/master/source/model/dataset.py
refresh方法

该方法会把三维矩阵的第二维(长度是360)顺序打乱,第二维不是buggy_res + fixed_res + tree_context的长度吗?另外请问为什么要前后半分别打乱呢?maxPathLength//2

谢谢

    def refresh(self):
        randnum = random.randint(1, 1e8)
        maxPathLength = self.starts.size(1)
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.starts.numpy()[:, : maxPathLength//2]))
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.starts.numpy()[:, maxPathLength//2:]))

        np.random.seed(randnum)
        list(map(np.random.shuffle, self.paths.numpy()[:, : maxPathLength//2]))
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.paths.numpy()[:, maxPathLength//2:]))

        np.random.seed(randnum)
        list(map(np.random.shuffle, self.ends.numpy()[:, : maxPathLength//2]))
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.ends.numpy()[:, maxPathLength//2:]))

        np.random.seed(randnum)
        list(map(np.random.shuffle, self.paths_length.numpy()[:, : maxPathLength//2]))
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.paths_length.numpy()[:, maxPathLength//2:]))

        np.random.seed(randnum)
        list(map(np.random.shuffle, self.raw_paths.numpy()[:, : maxPathLength//2]))
        np.random.seed(randnum)
        list(map(np.random.shuffle, self.raw_paths.numpy()[:, maxPathLength//2:]))

        # np.random.seed(randnum)
        # list(map(np.random.shuffle, self.labels_indicator))
        # self.labels = torch.from_numpy(np.where(self.labels_indicator == True)[1])

Error: AttributeError: 'NoneType' object has no attribute 'location'

Hi. When I'm trying to run main.py, the following error occurs:

Traceback (most recent call last):
  File "/home/Cache/source/main.py", line 286, in <module>
    main(args)
  File "/home/Cache/source/main.py", line 282, in main
    train()
  File "/home/Cache/source/main.py", line 98, in train
    reader = DatasetReader(args.dataset_path + "path_contexts.csv", args.dataset_path + "paths.csv",
  File "/home/Cache/source/model/dataset_reader_binary.py", line 76, in __init__
    self.load(corpus_path, testFlag)
  File "/home/Cache/source/model/dataset_reader_binary.py", line 104, in load
    if self.last_item.location == "/".join(fileInfo[:-1]):
AttributeError: 'NoneType' object has no attribute 'location'

I would appreciate your help.

Reproduce dataset

Hi authors, your work is interesting. I am newbie in this field and I am recreating the method dataset.

Could you please guide me how to generate the correct part of the large dataset? Can your provided script generate the correct samples?

Thank you.

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.