Giter VIP home page Giter VIP logo

Comments (10)

Maruidear avatar Maruidear commented on July 23, 2024 1

Hi@SinDongHwan
Change to Python 3.5, the code will run successfully.
Thank you very much for your kind help.

from fcsn.

SinDongHwan avatar SinDongHwan commented on July 23, 2024

Hi @Maruidear.
Please check h5 file.
KeyError: "Unable to open object (object 'video_tensor(41)' doesn't exist)"

from fcsn.

Maruidear avatar Maruidear commented on July 23, 2024

@Maruidear
请检查h5文件。
KeyError:“无法打开对象(对象'video_tensor(41)'不存在)“

After I replaced the. H5 file, I found a new problem:
Traceback (most recent call last):
File "train.py", line 142, in
solver.train()
File "train.py", line 86, in train
mean_loss = torch.stack(sum_loss_history).mean().item()
RuntimeError: expected a non-empty list of Tensors

from fcsn.

Maruidear avatar Maruidear commented on July 23, 2024

I find "*.h5" is loaded and "sum_loss_history" is empty before line 86 in train.py.

from fcsn.

Maruidear avatar Maruidear commented on July 23, 2024

我发现train.py的第86行之前已加载“ * .h5”,并且“ sum_loss_history”为空。

and I think the reason for this problem is that train() failed to execute successfully.

from fcsn.

SinDongHwan avatar SinDongHwan commented on July 23, 2024

Hi, @Maruidear

Please check "self.train_loader".
I think not excute for iteration because of empty.

from fcsn.

Maruidear avatar Maruidear commented on July 23, 2024

Hi,@SinDongHwan
Now I think that the dataset can be loaded successfully.And there is a 'KeyError: "Unable to open object (object 'video_tensor(17)' doesn't exist)"' problem.
I have never modified any code, and the.".h5"file is downloaded directly from github.

Traceback (most recent call last):
File "train.py", line 144, in
solver.train()
File "train.py", line 61, in train
for batch_i, (feature, label, ) in enumerate(tqdm(self.train_loader, desc='Batch', ncols=80, leave=False)):
File "/home/student/maruidi/anaconda2/envs/FCSN/lib/python3.6/site-packages/tqdm/std.py", line 1129, in iter
for obj in iterable:
File "/home/student/maruidi/anaconda2/envs/FCSN/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/student/maruidi/anaconda2/envs/FCSN/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/student/maruidi/anaconda2/envs/FCSN/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 103, in getitem
return self.dataset[self.indices[idx]]
File "/home/student/maruidi/Frames/Video_Summary_using_FCSN-master/data_loader.py", line 17, in getitem
video = self.data_file['video
'+str(index)]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/home/student/maruidi/anaconda2/envs/FCSN/lib/python3.6/site-packages/h5py/_hl/group.py", line 264, in getitem
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'video_tensor(7)' doesn't exist)"

from fcsn.

SinDongHwan avatar SinDongHwan commented on July 23, 2024

Hi, @Maruidear
I didn't face a error, working well.
if you can tell me a id/pwd of teamviewer to my e-mail, i help you.

Video_Summary_using_FCSN_dev/data_loader.py:10: H5pyDeprecationWarning: The default file mode will change to 'r' (read-only) in h5py 3.0. To suppress this warning, pass the mode you need to h5py.File(), or set the global default h5.get_config().default_file_mode, or set the environment variable H5PY_DEFAULT_READONLY=1. Available modes are: 'r', 'r+', 'w', 'w-'/'x', 'a'. See the docs for details.
self.data_file = h5py.File(data_path)
Save parameters at save_dir/epoch-4.pkl
Epoch: 8%|██ | 4/50 [00:03<00:32, 1.43it/s, loss=0.691]train.py:106: H5pyDeprecationWarning: The default file mode will change to 'r' (read-only) in h5py 3.0. To suppress this warning, pass the mode you need to h5py.File(), or set the global default h5.get_config().default_file_mode, or set the environment variable H5PY_DEFAULT_READONLY=1. Available modes are: 'r', 'r+', 'w', 'w-'/'x', 'a'. See the docs for details.
with h5py.File(self.config.data_path) as data_file:
Save score at score_dir/epoch-4.json
+------+-----------+--------+---------+
| ID | Precision | Recall | F-score |
+------+-----------+--------+---------+
| 21 | 0.478 | 0.472 | 0.475 |
| 14 | 0.503 | 0.492 | 0.498 |
| 7 | 0.522 | 0.515 | 0.518 |
| 17 | 0.641 | 0.627 | 0.634 |
| 20 | 0.562 | 0.556 | 0.559 |
| 46 | 0.582 | 0.574 | 0.578 |
| 2 | 0.595 | 0.590 | 0.592 |
| 50 | 0.522 | 0.514 | 0.518 |
| 11 | 0.623 | 0.612 | 0.617 |
| 40 | 0.546 | 0.539 | 0.543 |
| mean | 0.557 | 0.549 | 0.553 |
+------+-----------+--------+---------+
Save parameters at save_dir/epoch-9.pkl
Save score at score_dir/epoch-9.json
+------+-----------+--------+---------+
| ID | Precision | Recall | F-score |
+------+-----------+--------+---------+
| 21 | 0.483 | 0.477 | 0.480 |
| 14 | 0.489 | 0.482 | 0.486 |
| 7 | 0.570 | 0.559 | 0.565 |
| 17 | 0.645 | 0.639 | 0.642 |
| 20 | 0.567 | 0.561 | 0.564 |
| 46 | 0.574 | 0.567 | 0.571 |
| 2 | 0.383 | 0.383 | 0.383 |
| 50 | 0.505 | 0.500 | 0.502 |
| 11 | 0.687 | 0.684 | 0.685 |
| 40 | 0.534 | 0.528 | 0.531 |
| mean | 0.544 | 0.538 | 0.541 |
+------+-----------+--------+---------+
Epoch: 22%|█████▎ | 11/50 [00:12<00:43, 1.12s/it, loss=0.622]^C
Traceback (most recent call last):
File "train.py", line 142, in
solver.train()
File "train.py", line 82, in train
self.optimizer.step()
File "/home/ml/.virtualenvs/vsumm/lib/python3.5/site-packages/torch/optim/adam.py", line 103, in step
denom = (exp_avg_sq.sqrt() / math.sqrt(bias_correction2)).add_(group['eps'])
KeyboardInterrupt

from fcsn.

SinDongHwan avatar SinDongHwan commented on July 23, 2024

Hi, @Maruidear.
Good~!!
I've not caught a python version. ^^

from fcsn.

wangsen-sen avatar wangsen-sen commented on July 23, 2024

Hi, @Maruidear.
Good~!!
I've not caught a python version. ^^

Hi,I have the following problem :
Traceback (most recent call last):
File "train.py", line 141, in
solver.train()
File "train.py", line 56, in train
writer = summary(log_dir=self.config.log_dir)
TypeError: 'LazyModule' object is not callable

I don't know how to solve it. Can you give me some suggestions?Thank you very much.

from fcsn.

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.