Git Product home page Git Product logo

ihmehimmeli's Introduction

Ihmehimmeli

This repository contains code for project Ihmehimmeli. The model is described in the paper:

I.M. Comsa, K. Potempa, L. Versari, T. Fischbacher, A. Gesmundo, J. Alakuijala (2019). “Temporal coding in spiking neural networks with alpha synaptic function”, arXiv:1907.13223, July 2019.

The objective of Ihmehimmeli is to build recurrent architectures for state-based spiking neural networks that encode information in the timing of individual neuron spikes. Spike-based temporal coding allows a natural and energy-efficient solution for the encoding and processing of real-world analog signals. This approach can potentially evolve into native interfaces between artficial and biological neural networks. Similar to the way that biological brains have evolved to use temporal coding for the rapid processing of sensory information, we expect that equivalent develpments in spiking networks will be a key future step in the advancement of general artificial intelligence.

Build instructions

Compiling this project requires CMake and a C++11 compliant compiler. It was tested with CMake 3.12.1 and g++ 7.3.0, though it will likely work with other versions and compilers.

git clone https://github.com/google/ihmehimmeli
cd ihmehimmeli
git clone https://github.com/abseil/abseil-cpp.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j 12

Train a spiking network on MNIST

Download the MNIST dataset

./download_mnist.sh

Train a spiking network on MNIST.

cd build
tempcoding/tempcoding_main -problem=mnist -n_train=54000 -n_validation=6000 -n_test=10000  -batch_size=32 -clip_derivative=539.69973904211679 -decay_rate=0.18176949150701854 -fire_threshold=1.1673205005788956 -learning_rate=0.0010186407877494507 -learning_rate_pulses=0.09537534860701444 -n_hidden=340 -n_pulses=10 -nonpulse_weight_mean_multiplier=-0.2754188425913906 -penalty_no_spike=48.374830659132556 -pulse_weight_mean_multiplier=7.8391245503824578 -update_all_datapoints=true -use_adam=true -n_epochs=100 -mnist_data_path=../data/mnist

Test a spiking network on MNIST

Two networks reported in the paper are available under tempcoding/networks/: a slow_network that achieves the best accuracy but is slow, and a fast_network that is less accurate but makes decisions very fast.

cd build
tempcoding/tempcoding_main -model_to_test=tempcoding/networks/slow_network -problem=mnist -n_test=10000 -n_train=60000 -n_validation=0 -decay_rate=0.181769 -mnist_data_path=../data/mnist

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

ihmehimmeli's People

Contributors

dckstr avatar iulia-m-comsa 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ihmehimmeli's Issues

Issues with g++ version causing compile errors

Hi,
I have gone through your paper and I am really excited to do some of my own experiments over your work and I have faced issue when I tried to make the repo. I found that using this in the CMakelists file solves c++ compile issues caused by version issues. Hope this is helpful.

if(NOT "${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD 17)
endif()

error with "make -j 12"

Hi All,

Is anyone else getting the error "make: *** No targets specified and no makefile found. Stop." when they run the command "make -j 12"?

Has anyone found or can you offer some help with this error.

Thanks!

error when run "make -j 12"

CMake 3.12.1
g++ 5.4.0

When I run the command below, the error occurs:

hyz@hyz-Lenovo:~/Documents/ihmehimmeli/build$ make -j 12
Scanning dependencies of target absl_spinlock_wait
Scanning dependencies of target absl_exponential_biased
Scanning dependencies of target absl_dynamic_annotations
Scanning dependencies of target absl_log_severity
Scanning dependencies of target absl_strings_internal
Scanning dependencies of target data_parallel
Scanning dependencies of target absl_time_zone
Scanning dependencies of target absl_leak_check_disable
Scanning dependencies of target absl_int128
Scanning dependencies of target lambertw
Scanning dependencies of target absl_leak_check
[ 2%] Building CXX object tempcoding/CMakeFiles/data_parallel.dir/data_parallel.cc.o
[ 2%] Building CXX object abseil-cpp/absl/base/CMakeFiles/absl_dynamic_annotations.dir/dynamic_annotations.cc.o
[ 1%] Building CXX object abseil-cpp/absl/base/CMakeFiles/absl_log_severity.dir/log_severity.cc.o
Scanning dependencies of target absl_civil_time
[ 3%] Building CXX object abseil-cpp/absl/base/CMakeFiles/absl_exponential_biased.dir/internal/exponential_biased.cc.o
[ 3%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_fixed.cc.o
[ 3%] Building CXX object abseil-cpp/absl/base/CMakeFiles/absl_spinlock_wait.dir/internal/spinlock_wait.cc.o
[ 4%] Building CXX object abseil-cpp/absl/strings/CMakeFiles/absl_strings_internal.dir/internal/ostringstream.cc.o
[ 5%] Building CXX object abseil-cpp/absl/debugging/CMakeFiles/absl_leak_check_disable.dir/leak_check_disable.cc.o
[ 6%] Building CXX object abseil-cpp/absl/debugging/CMakeFiles/absl_leak_check.dir/leak_check.cc.o
[ 7%] Building CXX object tempcoding/CMakeFiles/lambertw.dir/lambertw.cc.o
[ 7%] Building CXX object abseil-cpp/absl/numeric/CMakeFiles/absl_int128.dir/int128.cc.o
[ 8%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_civil_time.dir/internal/cctz/src/civil_time_detail.cc.o
In file included from /usr/include/c++/5/atomic:38:0,
from /home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:29,
from /home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:15:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support
^
[ 8%] Linking CXX static library libabsl_absl_leak_check_disable.a
[ 8%] Linking CXX static library libabsl_absl_leak_check.a
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc: In function ‘double {anonymous}::LambertW0InitialGuess(double)’:
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:26:3: error: ‘constexpr’ was not declared in this scope
constexpr double kNearBranchCutoff = -0.3235;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:27:13: error: expected ‘;’ before ‘double’
constexpr double kE = 2.718281828459045;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:30:11: error: ‘kNearBranchCutoff’ was not declared in this scope
if (x < kNearBranchCutoff) return -1.0 + std::sqrt(2.0 * (1 + kE * x));
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:30:65: error: ‘kE’ was not declared in this scope
if (x < kNearBranchCutoff) return -1.0 + std::sqrt(2.0 * (1 + kE * x));
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:33:11: error: ‘kNearBranchCutoff’ was not declared in this scope
if (x > kNearBranchCutoff && x < -kNearBranchCutoff) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc: In function ‘bool ihmehimmeli::LambertW0(double, double*)’:
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:64:3: error: ‘constexpr’ was not declared in this scope
constexpr double kReciprocalE = 0.36787944117;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:65:13: error: expected ‘;’ before ‘double’
constexpr double kDesiredAbsoluteDifference = 1e-3;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:66:13: error: expected ‘;’ before ‘int’
constexpr int kNumMaxIters = 10;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:68:13: error: ‘kReciprocalE’ was not declared in this scope
if (x <= -kReciprocalE) return false;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:73:13: error: ‘kReciprocalE’ was not declared in this scope
if (x == -kReciprocalE) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:83:23: error: ‘kNumMaxIters’ was not declared in this scope
for (int i = 0; i < kNumMaxIters; i++) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/lambertw.cc:90:25: error: ‘kDesiredAbsoluteDifference’ was not declared in this scope
if (std::abs(z_n) < kDesiredAbsoluteDifference) {
^
tempcoding/CMakeFiles/lambertw.dir/build.make:62: recipe for target 'tempcoding/CMakeFiles/lambertw.dir/lambertw.cc.o' failed
make[2]: *** [tempcoding/CMakeFiles/lambertw.dir/lambertw.cc.o] Error 1
CMakeFiles/Makefile2:197: recipe for target 'tempcoding/CMakeFiles/lambertw.dir/all' failed
make[1]: *** [tempcoding/CMakeFiles/lambertw.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 9%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_format.cc.o
[ 10%] Linking CXX static library libabsl_absl_dynamic_annotations.a
[ 10%] Built target absl_leak_check_disable
[ 10%] Built target absl_leak_check
[ 10%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_if.cc.o
In file included from /home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:15:0:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:84:10: error: ‘constexpr’ does not name a type
static constexpr int kMaxThreads = 256;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:84:10: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:92:35: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
ThreadPool(const ThreadPool&) = delete;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:93:46: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
ThreadPool& operator&(const ThreadPool&) = delete;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:175:9: error: expected nested-name-specifier before ‘WorkerCommand’
using WorkerCommand = uint64_t;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:178:10: error: ‘constexpr’ does not name a type
static constexpr WorkerCommand kWorkerWait = ~0ULL;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:178:10: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:179:10: error: ‘constexpr’ does not name a type
static constexpr WorkerCommand kWorkerOnce = ~1ULL;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:179:10: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:180:10: error: ‘constexpr’ does not name a type
static constexpr WorkerCommand kWorkerExit = ~2ULL;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:180:10: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:202:27: error: ‘WorkerCommand’ does not name a type
void StartWorkers(const WorkerCommand worker_command) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:212:48: error: ‘WorkerCommand’ does not name a type
static void RunRange(ThreadPool* self, const WorkerCommand command,
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:252:9: error: expected nested-name-specifier before ‘TypeErasedFunc’
using TypeErasedFunc = void ()(const void, int, int);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:257:15: error: ‘thread’ is not a member of ‘std’
std::vectorstd::thread threads_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:257:15: error: ‘thread’ is not a member of ‘std’
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:257:26: error: template argument 1 is invalid
std::vectorstd::thread threads_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:257:26: error: template argument 2 is invalid
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:262:8: error: ‘atomic’ in namespace ‘std’ does not name a template type
std::atomic depth_{0}; // detects if Run is re-entered (not supported).
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:264:8: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex mutex_; // guards both cv and their variables.
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:265:8: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable workers_ready_cv_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:266:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
size_t workers_ready_ = 0;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:267:8: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable worker_start_cv_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:268:3: error: ‘WorkerCommand’ does not name a type
WorkerCommand worker_start_command_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:271:3: error: ‘TypeErasedFunc’ does not name a type
TypeErasedFunc func_;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:275:11: error: expected identifier before numeric constant
alignas(64) std::atomic num_reserved_{0};
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:275:11: error: expected ‘,’ or ‘...’ before numeric constant
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:275:13: error: ISO C++ forbids declaration of ‘alignas’ with no type [-fpermissive]
alignas(64) std::atomic num_reserved_{0};
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:275:13: error: expected ‘;’ at end of member declaration
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:275:20: error: ‘atomic’ in namespace ‘std’ does not name a template type
alignas(64) std::atomic num_reserved_{0};
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:90:43: error: ‘std::thread’ has not been declared
const int num_worker_threads = std::thread::hardware_concurrency());
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In member function ‘void ihmehimmeli::ThreadPool::Run(int, int, const Func&, const char*)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:130:9: error: ‘depth_’ was not declared in this scope
if (depth_.fetch_add(1, std::memory_order_acq_rel) != 0) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:130:29: error: ‘memory_order_acq_rel’ is not a member of ‘std’
if (depth_.fetch_add(1, std::memory_order_acq_rel) != 0) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:134:11: error: ‘WorkerCommand’ does not name a type
const WorkerCommand worker_command = (WorkerCommand(end) << 32) + begin;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:136:25: error: ‘worker_command’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerWait);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:136:43: error: ‘kWorkerWait’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerWait);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:137:25: error: ‘worker_command’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerOnce);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:137:43: error: ‘kWorkerOnce’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerOnce);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:138:25: error: ‘worker_command’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerExit);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:138:43: error: ‘kWorkerExit’ was not declared in this scope
DATA_PARALLEL_CHECK(worker_command != kWorkerExit);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:140:5: error: ‘func_’ was not declared in this scope
func_ = &CallClosure;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:142:5: error: ‘num_reserved_’ was not declared in this scope
num_reserved_.store(0, std::memory_order_relaxed);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:142:28: error: ‘memory_order_relaxed’ is not a member of ‘std’
num_reserved_.store(0, std::memory_order_relaxed);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:144:18: error: ‘worker_command’ was not declared in this scope
StartWorkers(worker_command);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:147:9: error: ‘depth_’ was not declared in this scope
if (depth_.fetch_add(-1, std::memory_order_acq_rel) != 1) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:147:30: error: ‘memory_order_acq_rel’ is not a member of ‘std’
if (depth_.fetch_add(-1, std::memory_order_acq_rel) != 1) {
^
[ 10%] Built target absl_dynamic_annotations
[ 11%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_impl.cc.o
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In member function ‘void ihmehimmeli::ThreadPool::RunOnEachThread(const Func&)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:163:5: error: ‘func_’ was not declared in this scope
func_ = reinterpret_cast(&CallClosure);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:163:30: error: ‘TypeErasedFunc’ does not name a type
func_ = reinterpret_cast(&CallClosure);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:165:18: error: ‘kWorkerOnce’ was not declared in this scope
StartWorkers(kWorkerOnce);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In member function ‘void ihmehimmeli::ThreadPool::WorkersReadyBarrier()’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:190:5: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lockstd::mutex lock(mutex_);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:190:22: error: ‘mutex’ is not a member of ‘std’
std::unique_lockstd::mutex lock(mutex_);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:190:39: error: ‘mutex_’ was not declared in this scope
std::unique_lockstd::mutex lock(mutex_);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:190:45: error: ‘lock’ was not declared in this scope
std::unique_lockstd::mutex lock(mutex_);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:192:39: error: request for member ‘size’ in ‘((ihmehimmeli::ThreadPool*)this)->ihmehimmeli::ThreadPool::threads_’, which is of non-class type ‘int’
while (workers_ready_ != threads_.size()) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:193:7: error: ‘workers_ready_cv_’ was not declared in this scope
workers_ready_cv_.wait(lock);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:198:5: error: ‘worker_start_command_’ was not declared in this scope
worker_start_command_ = kWorkerWait;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:198:29: error: ‘kWorkerWait’ was not declared in this scope
worker_start_command_ = kWorkerWait;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In member function ‘void ihmehimmeli::ThreadPool::StartWorkers(int)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:203:5: error: ‘mutex_’ was not declared in this scope
mutex_.lock();
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:204:5: error: ‘worker_start_command_’ was not declared in this scope
worker_start_command_ = worker_command;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:207:5: error: ‘worker_start_cv_’ was not declared in this scope
worker_start_cv_.notify_all();
^
[ 12%] Linking CXX static library libabsl_absl_spinlock_wait.a
[ 12%] Linking CXX static library libabsl_absl_exponential_biased.a
[ 13%] Building CXX object abseil-cpp/absl/strings/CMakeFiles/absl_strings_internal.dir/internal/utf8.cc.o
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In static member function ‘static void ihmehimmeli::ThreadPool::RunRange(ihmehimmeli::ThreadPool*, int, int)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:215:32: warning: right shift count >= width of type [-Wshift-count-overflow]
const int end = command >> 32;
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:233:17: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘num_reserved_’
self->num_reserved_.load(std::memory_order_relaxed);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:233:36: error: ‘memory_order_relaxed’ is not a member of ‘std’
self->num_reserved_.load(std::memory_order_relaxed);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:237:42: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘num_reserved_’
const int my_begin = begin + self->num_reserved_.fetch_add(
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:238:49: error: ‘memory_order_relaxed’ is not a member of ‘std’
my_size, std::memory_order_relaxed);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:245:15: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘func_’
self->func_(self->arg_, task, thread);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In function ‘size_t ihmehimmeli::NumWorkerThreads(ihmehimmeli::ThreadPool*)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:283:18: error: ‘nullptr’ was not declared in this scope
return pool == nullptr ? 0 : pool->NumWorkerThreads();
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In function ‘size_t ihmehimmeli::NumThreads(ihmehimmeli::ThreadPool*)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:287:18: error: ‘nullptr’ was not declared in this scope
return pool == nullptr ? 1 : pool->NumThreads();
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In function ‘void ihmehimmeli::RunOnPool(ihmehimmeli::ThreadPool*, int, int, const Func&, const char*)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:293:15: error: ‘nullptr’ was not declared in this scope
if (pool == nullptr) {
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h: In function ‘void ihmehimmeli::RunOnEachThread(ihmehimmeli::ThreadPool*, const Func&)’:
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:305:15: error: ‘nullptr’ was not declared in this scope
if (pool == nullptr) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc: In static member function ‘static void ihmehimmeli::ThreadPool::ThreadFunc(ihmehimmeli::ThreadPool*, int)’:
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:22:5: error: ‘unique_lock’ is not a member of ‘std’
std::unique_lockstd::mutex lock(self->mutex_);
^
[ 13%] Built target absl_exponential_biased
[ 13%] Built target absl_spinlock_wait
[ 14%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_info.cc.o
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:22:22: error: ‘mutex’ is not a member of ‘std’
std::unique_lockstd::mutex lock(self->mutex_);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:22:45: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘mutex_’
std::unique_lockstd::mutex lock(self->mutex_);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:22:51: error: ‘lock’ was not declared in this scope
std::unique_lockstd::mutex lock(self->mutex_);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:25:13: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘workers_ready_cv_’
self->workers_ready_cv_.notify_one();
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:29:11: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘worker_start_cv_’
self->worker_start_cv_.wait(lock);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:30:11: error: ‘WorkerCommand’ does not name a type
const WorkerCommand command = self->worker_start_command_;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:31:13: error: ‘command’ was not declared in this scope
switch (command) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:32:12: error: ‘kWorkerWait’ was not declared in this scope
case kWorkerWait: // spurious wakeup:
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:34:12: error: ‘kWorkerOnce’ was not declared in this scope
case kWorkerOnce:
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:36:15: error: ‘class ihmehimmeli::ThreadPool’ has no member named ‘func_’
self->func_(self->arg_, thread, thread);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:38:12: error: ‘kWorkerExit’ was not declared in this scope
case kWorkerExit:
^
In file included from /home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:15:0:
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc: In constructor ‘ihmehimmeli::ThreadPool::ThreadPool(int)’:
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:52:45: error: ‘kMaxThreads’ was not declared in this scope
DATA_PARALLEL_CHECK(num_worker_threads <= kMaxThreads);
^
/home/hyz/Documents/ihmehimmeli/./tempcoding/data_parallel.h:36:12: note: in definition of macro ‘DATA_PARALLEL_CHECK’
while (!(condition)) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:53:12: error: request for member ‘reserve’ in ‘((ihmehimmeli::ThreadPool*)this)->ihmehimmeli::ThreadPool::threads_’, which is of non-class type ‘int’
threads_.reserve(num_worker_threads);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:59:3: error: ‘worker_start_command_’ was not declared in this scope
worker_start_command_ = kWorkerWait;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:59:27: error: ‘kWorkerWait’ was not declared in this scope
worker_start_command_ = kWorkerWait;
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:62:14: error: request for member ‘emplace_back’ in ‘((ihmehimmeli::ThreadPool*)this)->ihmehimmeli::ThreadPool::threads_’, which is of non-class type ‘int’
threads_.emplace_back(ThreadFunc, this, i);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc: In destructor ‘ihmehimmeli::ThreadPool::~ThreadPool()’:
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:72:18: error: ‘kWorkerExit’ was not declared in this scope
StartWorkers(kWorkerExit);
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:75:8: error: ‘thread’ is not a member of ‘std’
for (std::thread& thread : threads_) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:75:28: error: found ‘:’ in nested-name-specifier, expected ‘::’
for (std::thread& thread : threads_) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:75:21: error: ‘thread’ has not been declared
for (std::thread& thread : threads_) {
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:79:1: error: expected primary-expression before ‘}’ token
}
^
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:79:1: error: expected ‘;’ before ‘}’ token
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:79:1: error: expected primary-expression before ‘}’ token
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:79:1: error: expected ‘)’ before ‘}’ token
/home/hyz/Documents/ihmehimmeli/tempcoding/data_parallel.cc:79:1: error: expected primary-expression before ‘}’ token
[ 14%] Linking CXX static library libabsl_absl_log_severity.a
tempcoding/CMakeFiles/data_parallel.dir/build.make:62: recipe for target 'tempcoding/CMakeFiles/data_parallel.dir/data_parallel.cc.o' failed
make[2]: *** [tempcoding/CMakeFiles/data_parallel.dir/data_parallel.cc.o] Error 1
CMakeFiles/Makefile2:451: recipe for target 'tempcoding/CMakeFiles/data_parallel.dir/all' failed
make[1]: *** [tempcoding/CMakeFiles/data_parallel.dir/all] Error 2
[ 14%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_libc.cc.o
[ 14%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_posix.cc.o
[ 15%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/time_zone_lookup.cc.o
[ 15%] Built target absl_log_severity
[ 16%] Building CXX object abseil-cpp/absl/time/CMakeFiles/absl_time_zone.dir/internal/cctz/src/zone_info_source.cc.o
[ 16%] Linking CXX static library libabsl_absl_strings_internal.a
[ 16%] Built target absl_strings_internal
[ 17%] Linking CXX static library libabsl_absl_int128.a
[ 17%] Built target absl_int128
[ 17%] Linking CXX static library libabsl_absl_civil_time.a
[ 17%] Built target absl_civil_time
[ 17%] Linking CXX static library libabsl_absl_time_zone.a
[ 17%] Built target absl_time_zone
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

cc:240: Error computing Lambert W

Hello,

I was wondering if anyone can offer insight on a training issue that I have been running into. I have tried to train a couple of times with the published commands and I keep getting an "aborted" message about halfway through the training:

" failed at ihmehimmeli/tempcoding/tempcoder.cc:240: Error computing Lambert W on: -0.367879"
Aborted (core dumped)

I've tried about 3 or 4 times so far and the same error occurs at different run/epochs. Can anyone offer any suggestions?

As seen in the attached screenshot.

Screenshot 2020-11-20 150737

Running data sets

Hello Again,

I was wondering if any insight could be provided regarding the steps in "feeding" other data sets into the proposed SNN? I got the MNIST set to work perfectly on the code (thank you for all the past help) and got the same results as the published paper -- now was hoping to expand to other data sets.

If any insight can be provided on how to do so, it would be most beneficial.

Thanks as always for any help and insight,
--Andrew

Error while Testing the network

Hello Again,
Sorry for the number of questions. Would you be able to provide any insight to an error that I am getting when running the testing command:

Error:

"andy@andy-HP-G72-Notebook-PC:/media/andy/TOSHIBA EXT/ihmehimmeli/build$ tempcoding/tempcoding_main -model_to_test=tempcoding/networks/fast_network -problem=mnist -n_test=10000 -n_train=60000 -n_validation=0 -decay_rate=0.181769 -mnist_data_path=../data/mnist
W2020-11-28T11:40:32.120522282-05:00 /media/andy/TOSHIBA EXT/ihmehimmeli/tempcoding/spiking_problem.cc:413] Ignoring n_inputs flag for MNIST problem. Using 784 inputs.

IHM_CHECK(file.Open(path, mode)) failed at /media/andy/TOSHIBA EXT/ihmehimmeli/tempcoding/file_passthrough_external.cc:97
Aborted (core dumped)
"

image

Thanking you as always for any insight that you can provide,
Andrew

Error with Tempcoding_main

'tempcoding_main' is not recognized as an internal or external command,
operable program or batch file.

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.