Comments (5)
I tried to replicate the error, but couldn't. By default the training data should be of size 45000, which is why the tensor size is 45000. Have you tried mnist? If so can you run python train.py --dataset cifar10?
from ganomaly.
@samet-akcay Hi, I tried to run python train.py --dataset cifar10 as you mentioned. However, it raise the same problem as follows:
Training model Ganomaly.
0%| | 0/781 [00:00<?, ?it/s]Traceback (most recent call last):
File "train.py", line 47, in
main()
File "train.py", line 44, in main
model.train()
File "/media/yangbiao/disk1/ganomaly-master/lib/model.py", line 307, in train
self.train_epoch()
File "/media/yangbiao/disk1/ganomaly-master/lib/model.py", line 272, in train_epoch
for data in tqdm(self.dataloader['train'], leave=False, total=len(self.dataloader['train'])):
File "/usr/local/lib/python3.5/dist-packages/tqdm/_tqdm.py", line 719, in iter
for obj in iterable:
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 281, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 301, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 55, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 55, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.5/dist-packages/torchvision/datasets/cifar.py", line 83, in getitem
img, target = self.train_data[index], self.train_labels[index]
IndexError: index 48784 is out of bounds for axis 0 with size 45000
PS: The index number (all numbers are larger than 45000) changes every time when I run "run python train.py --dataset cifar10". I guess whether the problem is caused by the version issue of the third-part libraries, such as torchvision and tqdm? 3Q
from ganomaly.
Maybe. I've used torchvision 0.1.9 and tqdm 4.15.0. Do you get any error when you run mnist?
from ganomaly.
@samet-akcay Yes, I got the same errors when I run mnist. I will check the versions of torchvision and tqdm.
from ganomaly.
@samet-akcay Hi, I'm glad to tell you that I can enjoy your code when I use torchvision 0.1.9 and tqdm 4.15.0. So, I think you can update your readme file to avoid such errors. 3Q!
from ganomaly.
Related Issues (20)
- how can i balance the model HOT 7
- how can i see the result of test?? HOT 1
- How to distinguish a mnist_pic is normal or anomaly? HOT 17
- Sudden increase of err_d HOT 1
- Changes for Windows10
- Some qutestions about testing
- can it display where is the anomaly when inference? HOT 1
- what is the difference between fixed_fakes_*.png and fakes.png
- Is the testing function missing self.netg.eval? HOT 5
- AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' HOT 4
- What's the performance of the model in terms of custom dataset?
- Can this code be used on sequence data? HOT 1
- How to use ganomaly neural network for single-channel data training
- Program stucks when the input image size is 224x224 HOT 2
- Experiment(To replicate the results in the paper for MNIST and CIFAR10 datasets)
- Testing
- Possible mode collapse HOT 1
- Test problem HOT 2
- Missing net.eval() in the testing code HOT 1
- ROC is changed every time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ganomaly.