Giter VIP home page Giter VIP logo

Comments (10)

Bruce-Si avatar Bruce-Si commented on July 21, 2024

I want to train this code for dataset, following as

$ python tools/train.py --data_root /home/my_com/dataset/KITTI/ --batch_size 4

when first epoch is done, I got error

Traceback (most recent call last): File "tools/train.py", line 164, in main() File "tools/train.py", line 157, in main val_loader File "/home/my_com/virtualenv/JMODT/jmodt/utils/train_utils.py", line 198, in train prev_val_loss = val_loss_epoch

Can I get some solution from this problem?

Thanks.

I get the same error. Is there any progress?

from jmodt.

Lemon-L7 avatar Lemon-L7 commented on July 21, 2024

I want to train this code for dataset, following as
$ python tools/train.py --data_root /home/my_com/dataset/KITTI/ --batch_size 4
when first epoch is done, I got error
Traceback (most recent call last): File "tools/train.py", line 164, in main() File "tools/train.py", line 157, in main val_loader File "/home/my_com/virtualenv/JMODT/jmodt/utils/train_utils.py", line 198, in train prev_val_loss = val_loss_epoch
Can I get some solution from this problem?
Thanks.

I get the same error. Is there any progress?

I get the same error. Is there any progress? I means how to get the sample2frame.txt & seq2sample.txt in TESTING file

@Bruce-Si

from jmodt.

Bruce-Si avatar Bruce-Si commented on July 21, 2024

I have not noticed this problem... The script kitti_converter.py just creates TRAINING file. Maybe we have to create TESTING file by imitating the kitti_converter.py.
@Lemon-L7

from jmodt.

Lemon-L7 avatar Lemon-L7 commented on July 21, 2024

yeap,I check the files, if author‘s code didn't has any trouble, we should create TESTING file, like he sets in his constructor. @Bruce-Si

from jmodt.

ferrari700 avatar ferrari700 commented on July 21, 2024

yeap,I check the files, if author‘s code didn't has any trouble, we should create TESTING file, like he sets in his constructor. @Bruce-Si

Hello, I also encountered the same problem, have you solved it? How is the testing file created?

from jmodt.

zzm-hl avatar zzm-hl commented on July 21, 2024

我想为数据集训练此代码,如下所示

$ python 工具/train.py --data_root /home/my_com/dataset/KITTI/ --batch_size 4

当第一个时代完成时,我得到了错误

回溯(最后一次调用): 文件“tools/train.py”,第 164 行,在 main() 文件“tools/train.py”,第 157 行,在 main val_loader 文件“/home/my_com/virtualenv/JMODT/ jmodt/utils/train_utils.py",第 198 行,在火车 prev_val_loss = val_loss_epoch

我可以从这个问题中得到一些解决方案吗?

谢谢。

I have the same problem ,have you solved it? @Kemo-Huang @minho8849

from jmodt.

lx-ynu avatar lx-ynu commented on July 21, 2024

After I assigned an initial value to "val_loss_epoch", the network can be trained, but there is another problem, the "best_model" will not be updated after the first epoch is trained.

from jmodt.

zkp0113 avatar zkp0113 commented on July 21, 2024

@Kemo-Huang
Excuse me,I meet same problems.
No.1 ”UnboundLocalError: local variable 'val_loss_epoch' referenced before assignment“;
For this problem I change some code then the problem fixed,but it comes new problem that same with this.

No.2 “best_model.path” is not update.

对不起,我也遇到同样的问题。
第1条问 “UnboundLocalError:赋值前引用的局部变量‘val_loss_epoch’”;对于这个问题,我更改了一些代码,然后问题得到了解决,但随之而来的是新问题。
第2条 “best_model.path”未更新。

from jmodt.

sazanali avatar sazanali commented on July 21, 2024

add the following line for solution
def train(self, start_it, start_epoch, n_epochs, train_loader, val_loader=None, stop_thres=5):
eval_frequency = self.eval_frequency if self.eval_frequency > 0 else 1
global val_loss_epoch
global prev_train_loss
global prev_val_loss

in the bottom

else:
prev_train_loss = train_loss_epoch
prev_val_loss = val_loss_epoch

            val_loss_epoch =1
            if val_loss_epoch < min_val_loss:
                min_val_loss = val_loss_epoch

from jmodt.

sazanali avatar sazanali commented on July 21, 2024

Any solution for best_model.path???

from jmodt.

Related Issues (15)

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.