Giter Site home page Giter Site logo

coviddialog's People

Contributors

ramtinhoss avatar

Stargazers

 avatar

Watchers

 avatar  avatar

coviddialog's Issues

111

为什么在运行transformers模型中train.py会出现以下错误:数据没有问题啊,之前还能运行
Cell In [5], line 83, in train_model(epochs, num_gradients_accumulation, batch_size, gpu_id, lr, load_dir)
81 train_data = train_data[:100]
82 # print (train_knowledge.size())
---> 83 train_dataset = TensorDataset(*train_data)
84 train_dataloader = DataLoader(dataset=tensor_dataset, shuffle=True, batch_size=batch_size)
86 val_data = torch.load("data/validate_data.pth")

File /usr/local/lib/python3.8/site-packages/torch/utils/data/dataset.py:167, in TensorDataset.init(self, *tensors)
166 def init(self, *tensors: Tensor) -> None:
--> 167 assert all(tensors[0].size(0) == tensor.size(0) for tensor in tensors), "Size mismatch between tensors"
168 self.tensors = tensors

File /usr/local/lib/python3.8/site-packages/torch/utils/data/dataset.py:167, in (.0)
166 def init(self, *tensors: Tensor) -> None:
--> 167 assert all(tensors[0].size(0) == tensor.size(0) for tensor in tensors), "Size mismatch between tensors"
168 self.tensors = tensors

AttributeError: 'list' object has no attribute 'size'

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.