braincog package
Subpackages
- braincog.base package
- braincog.datasets package
- Subpackages
- Submodules
- braincog.datasets.CUB2002011 module
- braincog.datasets.StanfordDogs module
- braincog.datasets.TinyImageNet module
- braincog.datasets.cut_mix module
- braincog.datasets.datasets module
MNISTData
build_dataset()
build_transform()
get_CUB2002011_data()
get_FGVCAircraft_data()
get_Flowers102_data()
get_NCALTECH101_data()
get_NCARS_data()
get_StanfordCars_data()
get_StanfordDogs_data()
get_TinyImageNet_data()
get_cifar100_data()
get_cifar10_data()
get_dvsc10_data()
get_dvsg_data()
get_esimnet_data()
get_fashion_data()
get_imnet_data()
get_mnist_data()
get_nomni_data()
unpack_mix_param()
- braincog.datasets.gen_input_signal module
- braincog.datasets.rand_aug module
- braincog.datasets.utils module
- Module contents
- braincog.model_zoo package
- Submodules
- braincog.model_zoo.backeinet module
- braincog.model_zoo.base_module module
BaseConvModule
BaseLinearModule
BaseModule
BaseModule.forward()
BaseModule.get_attr()
BaseModule.get_fire_rate()
BaseModule.get_fp()
BaseModule.get_mem()
BaseModule.get_spike_info()
BaseModule.get_threshold()
BaseModule.get_tot_spike()
BaseModule.reset()
BaseModule.set_attr()
BaseModule.set_requires_fp()
BaseModule.set_requires_mem()
BaseModule.training
- braincog.model_zoo.bdmsnn module
- braincog.model_zoo.convnet module
- braincog.model_zoo.glsnn module
- braincog.model_zoo.linearNet module
- braincog.model_zoo.nonlinearNet module
- braincog.model_zoo.qsnn module
- braincog.model_zoo.resnet module
- braincog.model_zoo.resnet19_snn module
- braincog.model_zoo.rsnn module
- braincog.model_zoo.sew_resnet module
- braincog.model_zoo.vgg_snn module
- Module contents
Submodules
braincog.utils module
- braincog.utils.accuracy(output, target, topk=(1,))
Compute the top1 and top5 accuracy
- braincog.utils.adjust_surrogate_coeff(epoch, tot_epochs)
- braincog.utils.calc_aurc(confidences, labels)
- braincog.utils.mse(x, y)
- braincog.utils.rand_ortho(shape, irange)
- braincog.utils.random_gradient(model: Module, sigma: float)
为梯度添加噪声 :param model: 模型 :param sigma: 噪声方差 :return:
- braincog.utils.save_feature_map(x, dir='')
- braincog.utils.save_spike_info(fname, epoch, batch_idx, step, avg, var, spike, avg_per_step)
对spike-info格式进行调整, 便于保存 :param fname: 输出文件名 :param epoch: epoch :param batch_idx: batch index :param step: 仿真步长 :param avg: 平均脉冲发放率 :param var: 脉冲发放率的方差 :param spike: :param avg_per_step: :return:
- braincog.utils.setup_seed(seed)
为CPU,GPU,所有GPU,numpy,python设置随机数种子,并禁止hash随机化 :param seed: seed value :return: