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

some questions come out when I want to modify some files #68

Open
JackeyWang777 opened this issue May 8, 2018 · 1 comment
Open

some questions come out when I want to modify some files #68

JackeyWang777 opened this issue May 8, 2018 · 1 comment

Comments

@JackeyWang777
Copy link

JackeyWang777 commented May 8, 2018

I want to modify the file'/examples/triplet loss' and add some parameters into the trainer.
I have modified the file 'reid/trainers'

criterion1 = nn.CrossEntropyLoss().cuda()
criterion2 = TripletLoss(margin=args.margin).cuda()
trainer = Trainer(model,criterion1,criterion2,factor1,factor2)

class BaseTrainer(object):

def __init__(self, model,criterion,criterion2,factor1,factor2):
        super(BaseTrainer, self).__init__()
        self.model = model
        self.criterion = criterion#Triplet loss
        self.criterion2 = criterion2#softmax loss
        self.factor1 = factor1
        self.factor2 = factor2

But expection error come out:
TypeError: init() takes exactly 3 arguments (6 given)
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <function _remove at 0x7ff757f877d0> ignored

Then I find that the file of path below is not modified ,when i run my file.The 'trainers.py' of that path has no changed.
open-reid/build/bdist.linux-x86_64/egg/reid/trainers.py(14)init()

@leobxpan
Copy link

leobxpan commented May 9, 2018

You should re-install the library through python setup.py install to let the changes take effect.

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

2 participants