julianlee310514065 / aicup_audio_2023 Goto Github PK
View Code? Open in Web Editor NEWAICUP 多模態病理嗓音分類競賽 2023
License: MIT License
AICUP 多模態病理嗓音分類競賽 2023
License: MIT License
TypeError Traceback (most recent call last)
Cell In[12], line 15
12 losses = 0.
14 # training dataset
---> 15 for batch, (mfcc_img, medicals, label, img_path) in enumerate(train_dl):
16 model.train()
18 inputs, medicals, labels = mfcc_img.float().to(device), medicals.float().to(device), label.to(device)
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/dataloader.py:681, in _BaseDataLoaderIter.next(self)
678 if self._sampler_iter is None:
679 # TODO(pytorch/pytorch#76750)
680 self._reset() # type: ignore[call-arg]
--> 681 data = self._next_data()
682 self._num_yielded += 1
683 if self._dataset_kind == _DatasetKind.Iterable and
684 self._IterableDataset_len_called is not None and
685 self._num_yielded > self._IterableDataset_len_called:
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/dataloader.py:721, in _SingleProcessDataLoaderIter._next_data(self)
719 def _next_data(self):
720 index = self._next_index() # may raise StopIteration
--> 721 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
722 if self._pin_memory:
723 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device)
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py:52, in _MapDatasetFetcher.fetch(self, possibly_batched_index)
50 else:
51 data = self.dataset[possibly_batched_index]
---> 52 return self.collate_fn(data)
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py:175, in default_collate(batch)
172 transposed = list(zip(*batch)) # It may be accessed twice, so we use a list.
174 if isinstance(elem, tuple):
--> 175 return [default_collate(samples) for samples in transposed] # Backwards compatibility.
176 else:
177 try:
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py:175, in (.0)
172 transposed = list(zip(*batch)) # It may be accessed twice, so we use a list.
174 if isinstance(elem, tuple):
--> 175 return [default_collate(samples) for samples in transposed] # Backwards compatibility.
176 else:
177 try:
File ~/anaconda3/envs/ai_cup_noise/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py:147, in default_collate(batch)
144 if elem_type.name == 'ndarray' or elem_type.name == 'memmap':
145 # array of string classes and object
146 if np_str_obj_array_pattern.search(elem.dtype.str) is not None:
--> 147 raise TypeError(default_collate_err_msg_format.format(elem.dtype))
149 return default_collate([torch.as_tensor(b) for b in batch])
150 elif elem.shape == (): # scalars
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found object
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.