Git Product home page Git Product logo

scorer's People

Contributors

tuyunbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

matthewdm0816

scorer's Issues

AttributeError: 'ChangeDetector' object has no attribute 'cross_layer'

Running the training script seems lead to an error.
The command: python train.py --cfg configs/dynamic/transformer.yaml
The error:

Traceback (most recent call last):
  File "train.py", line 223, in <module>
    torch.clamp_(change_detector.cross_layer[-1].self_attention.logit_scale.data, max=np.log(100))
  File "/hd1/mwt/miniconda3/envs/scorer/lib/python3.8/site-packages/torch/nn/modules/module.py", line 947, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ChangeDetector' object has no attribute 'cross_layer'

The related code:

SCORER/train.py

Lines 219 to 226 in 5bd189c

if hasattr(change_detector, 'module'):
torch.clamp_(change_detector.cross_layer.self_attention.module.logit_scale.data, max=np.log(100))
logit_scale = change_detector.cross_layer.self_attention.module.logit_scale.exp().item()
else:
torch.clamp_(change_detector.cross_layer[-1].self_attention.logit_scale.data, max=np.log(100))
logit_scale = change_detector.cross_layer[-1].self_attention.logit_scale.exp().item()
torch.clamp_(generator.contra.logit_scale.data, max=np.log(100))
logit_scale_cycle = generator.contra.logit_scale.exp().item()

In SCORER.py, seems I can't find cross_layer attributes.
And since it seems a this is only for logging, I commented these lines and the trainining seems to continue.

Vocabulary file not found: No such file or directory: './data/transformer_vocab.json'

I'm trying to train the model with the given command python train.py --cfg configs/dynamic/transformer.yaml, but an error occurs. The error message is like: (last few lines)

  File "/hd1/mwt/SCORER/datasets/rcc_dataset_transformer.py", line 39, in __init__
    self.word_to_idx = json.load(open(self.vocab_json, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: './data/transformer_vocab.json'

Seems a configuration error, I see vocab.json in the ./data directory, is that the correct file to use?

The code is not optimizing the generator

Hi, I found in the train.py, the generator is not being optimized, and this leads to non-decreasing cycle loss. Is this a bug or an intended design?

SCORER/train.py

Lines 114 to 115 in 2c12e34

all_params = list(change_detector.parameters()) + list(speaker.parameters())
optimizer = build_optimizer(all_params, cfg)

Trying to reproduce on IER-like dataset

First thanks for this great work, it is very valuable to see your code and be able to run it,

I have reproduced your work on CLEVR-Change. Now I am trying to do it on a smaller dataset and as i see the results on Image Editing Request I think you could have some valuable insights if you are okay with sharing :)

  1. Will you release the code for training on Image Editing Request ? Most of my questions could be answered with that I guess !
  2. What was the training time with your GPU on Image Editing Request ?
  3. What was the hyperparameters (learning rate, batch_size, other thing you can think of and you struggled with) ?

For now, i am training on a dataset of the size of IER. SCORER seems to struggle and I want to be sure I am not doing anything wrong to be able to compare my thing with it fairly.

Again, thanks for this work and for your time

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.