Code Monkey home page Code Monkey logo

spikingformer's People

Contributors

yult0821 avatar zhouchenlin2096 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spikingformer's Issues

data下载

请问百度网盘的提取码能提供一下吗

AssertionError: CuPy is not installed!

ssh://[email protected]:23735/opt/conda/envs/py37/bin/python -u /home/u21b961009/jupyterlab/Spikingformer-master/imagenet/train.py
INFO:train:Training with a single process on 1 GPUs.
Training with a single process on 1 GPUs.
Traceback (most recent call last):
File "/home/u21b961009/jupyterlab/Spikingformer-master/imagenet/train.py", line 824, in
main()
File "/home/u21b961009/jupyterlab/Spikingformer-master/imagenet/train.py", line 376, in main
drop_block_rate=None,
File "/home/u21b961009/.local/lib/python3.7/site-packages/timm/models/factory.py", line 71, in create_model
model = create_fn(pretrained=pretrained, pretrained_cfg=pretrained_cfg, **kwargs)
File "/home/u21b961009/jupyterlab/Spikingformer-master/imagenet/model.py", line 256, in Spikingformer
**kwargs
File "/home/u21b961009/jupyterlab/Spikingformer-master/imagenet/model.py", line 197, in init
embed_dims=embed_dims)
File "/home/u21b961009/jupyterlab/Spikingformer-master/imagenet/model.py", line 132, in init
self.proj1_lif = MultiStepLIFNode(tau=2.0, detach_reset=True, backend='cupy')
File "/home/u21b961009/.local/lib/python3.7/site-packages/spikingjelly/clock_driven/neuron.py", line 823, in init
check_backend(backend)
File "/home/u21b961009/.local/lib/python3.7/site-packages/spikingjelly/clock_driven/neuron.py", line 30, in check_backend
assert cupy is not None, 'CuPy is not installed! You can install it from "https://github.com/cupy/cupy".'
AssertionError: CuPy is not installed! You can install it from "https://github.com/cupy/cupy".

进程已结束,退出代码1

这个问题该怎么解决?重装了好多次cupy都不想,按照pip install cupy-cuda11x 也不管用

FileNotFoundError

INFO:train:Training with a single process on 1 GPUs.
Training with a single process on 1 GPUs.
Creating model
number of params: 29705768
INFO:train:Model vitsnn created, param count:29705768
Model vitsnn created, param count:29705768
INFO:timm.data.config:Data processing configuration for current model + dataset:
Data processing configuration for current model + dataset:
INFO:timm.data.config: input_size: (3, 224, 224)
input_size: (3, 224, 224)
INFO:timm.data.config: interpolation: bicubic
interpolation: bicubic
INFO:timm.data.config: mean: (0.485, 0.456, 0.406)
mean: (0.485, 0.456, 0.406)
INFO:timm.data.config: std: (0.229, 0.224, 0.225)
std: (0.229, 0.224, 0.225)
INFO:timm.data.config: crop_pct: 1.0
crop_pct: 1.0
INFO:train:Using native Torch AMP. Training in mixed precision.
Using native Torch AMP. Training in mixed precision.
ERROR:timm.models.helpers:No checkpoint found at '/media/data/spike-transformer-network/spikingformer_github/imagenet/output/train/Spikingformer_models/checkpoint-284.pth.tar'
ERROR: No checkpoint found at '/media/data/spike-transformer-network/spikingformer_github/imagenet/output/train/Spikingformer_models/checkpoint-284.pth.tar'
Traceback (most recent call last):
File "D:\code\Spikingformer-master\imagenet\test.py", line 639, in
main()
File "D:\code\Spikingformer-master\imagenet\test.py", line 437, in main
resume_epoch = resume_checkpoint(
File "D:\anaconda\envs\g1\lib\site-packages\timm\models\helpers.py", line 113, in resume_checkpoint
raise FileNotFoundError()
FileNotFoundError
请问这个我该怎么解决?

分布式训练问题

/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launch.py:181: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torchrun.
Note that --use-env is set by default in torchrun.
If your script expects --local-rank argument to be set, please
change it to read from os.environ['LOCAL_RANK'] instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions

warnings.warn(
WARNING:torch.distributed.run:


Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.


Traceback (most recent call last):
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 952, in
main()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 338, in main
args, args_text = _parse_args()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 323, in _parse_args
with open(args_config.config, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cifar10.yml'
Traceback (most recent call last):
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 952, in
main()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 338, in main
args, args_text = _parse_args()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 323, in _parse_args
with open(args_config.config, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cifar10.yml'
Traceback (most recent call last):
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 952, in
main()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 338, in main
args, args_text = _parse_args()
File "/home/liuchang/SNN/Spikingformer-master/cifar10/train.py", line 323, in _parse_args
with open(args_config.config, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'cifar10.yml'
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 319362) of binary: /home/liuchang/.conda/envs/Lizhuo3.9/bin/python
Traceback (most recent call last):
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launch.py", line 196, in
main()
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launch.py", line 192, in main
launch(args)
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launch.py", line 177, in launch
run(args)
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/run.py", line 785, in run
elastic_launch(
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 134, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/liuchang/.conda/envs/Lizhuo3.9/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 250, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

/home/liuchang/SNN/Spikingformer-master/cifar10/train.py FAILED

Failures:
[1]:
time : 2023-11-08_16:20:18
host : gpu-PowerEdge-T640
rank : 1 (local_rank: 1)
exitcode : 1 (pid: 319364)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[2]:
time : 2023-11-08_16:20:18
host : gpu-PowerEdge-T640
rank : 2 (local_rank: 2)
exitcode : 1 (pid: 319365)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

Root Cause (first observed failure):
[0]:
time : 2023-11-08_16:20:18
host : gpu-PowerEdge-T640
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 319362)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

请问这个怎么解决

About performance degradation in cifar10

@zhouchenlin2096
I only modified the path of the source code dataset you provided, but left the rest intact. I trained and tested the accuracy of the dataset cifar10. The default structure should be Spikingformer-4-384, I trained 400 epochs, and the highest accuracy was 95.17% in 310 epochs. 0.44% lower than reported in your paper (95.61%), Spikingformer-384-400E accuracy is 95.69%, 0.12% lower than reported in your paper (95.81%). It seems that these indicators are not very different, but for this task, such a small difference in accuracy can not be ignored, please help me to point out the possible reasons. In addition, the backend we use is CuPY and no changes have been made to the backend, torch version 2.1.0 and CUDA version 12.0, because CUDA version is higher and it restricts the use of the lower version of torch required in the source code.

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.