uclanlp / visualbert

Code for the paper "VisualBERT: A Simple and Performant Baseline for Vision and Language"
528 stars 104 forks source link

allennlp 0.8.0 . #20

Closed alice-cool closed 3 years ago

alice-cool commented 3 years ago

Thanks for your open code

alice-cool commented 3 years ago

what is the version of python? pytorch?

alice-cool commented 3 years ago
from allennlp.training.trainer import move_optimizer_to_cuda

ImportError: cannot import name 'move_optimizer_to_cuda'

alice-cool commented 3 years ago

what is the version of allennlp。 I install the version 1.2.0,but it doesn't know the allennlp.training.trainer import move_optimizer_to_cuda. ?

alice-cool commented 3 years ago

from allennlp.training import util as training_util Ok I found the new document training_util and We can write " from allennlp.training import util as training_util and in the code we write training_util.move_optimizer_to_cuda

alice-cool commented 3 years ago

from allennlp.data.batch import Batch

alice-cool commented 3 years ago

Thanks for your open code

from allennlp.training.trainer import move_optimizer_to_cuda

ImportError: cannot import name 'move_optimizer_to_cuda'

bigbrother001 commented 2 years ago

Good job! Thank you very much for the experence, I replace "from allennlp.training.trainer import move_optimizer_to_cuda" with "from allennlp.training.util import move_optimizer_to_cuda" and then it run.