Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency of code and example file #21

Open
tengerye opened this issue Apr 25, 2018 · 0 comments
Open

Inconsistency of code and example file #21

tengerye opened this issue Apr 25, 2018 · 0 comments

Comments

@tengerye
Copy link

tengerye commented Apr 25, 2018

I am using Python3, while I think something else causes this problem.

The error appears like this:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/yetengqi/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/yetengqi/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/yetengqi/projects/academicContrib/multi-view-learning/MVCNN-TensorFlow/input.py", line 115, in load
    shapes = list(pool.map(self._load_shape, sub))
  File "/home/yetengqi/anaconda3/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
    yield fs.pop().result()
  File "/home/yetengqi/anaconda3/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/home/yetengqi/anaconda3/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/yetengqi/anaconda3/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/yetengqi/projects/academicContrib/multi-view-learning/MVCNN-TensorFlow/input.py", line 100, in _load_shape
    s = Shape(listfile)
  File "/home/yetengqi/projects/academicContrib/multi-view-learning/MVCNN-TensorFlow/input.py", line 15, in __init__
    self.label = int(f.readline())
ValueError: invalid literal for int() with base 10: b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00C\x00\x08\x06\x06\x07\x06\x05\x08\x07\x07\x07\t\t\x08\n'

The following is my analysis:
In the input.py

    def __init__(self, list_file):
        with open(list_file) as f:
            self.label = int(f.readline())
            self.V = int(f.readline())
            view_files = [l.strip() for l in f.readlines()]

        self.views = self._load_views(view_files, self.V)
self.done_mean = False

But in your example of train_lists.txt, the label is tagged on the second column.

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

No branches or pull requests

1 participant