MCPcopy Create free account

hub / github.com/adamsolomou/SC-DNN / functions

Functions46 in github.com/adamsolomou/SC-DNN

↓ 8 callersFunctionlin_gain
Linear gain with saturation. The implementation currently supports only a linear gain of 2, 4 and 8. Parameters ---------- x:
src/inference/function_blocks.py:614
↓ 6 callersFunctionsng
Bipolar stochastic number generator Parameters ---------- x: Floating-point input value no_stoch_samples: Bit-stream length (i
src/inference/function_blocks.py:24
↓ 4 callersFunctionget_value
Estimate the value of a stochastic bit-stream Parameters ---------- x: 1D numpy array holding the input bit-stream Returns
src/inference/function_blocks.py:92
↓ 4 callersFunctioninvert
(x)
src/inference/function_blocks.py:173
↓ 4 callersFunctionmultiply
Stochastic XNOR multiplier Parameters ---------- x: Stochastic bit-stream w: Floating point weight Returns -------
src/inference/function_blocks.py:146
↓ 4 callersFunctionregularizer
(x)
src/training/sc_train_creg.py:11
↓ 3 callersFunctionadd
Scaled addition of two stochastic bit-streams Parameters ---------- x,y: 1D numpy arrays holding bit-streams to be added s_in:
src/inference/function_blocks.py:178
↓ 2 callersFunctionSmax
Stochastic max unit Parameters ---------- a,b: Input bit-streams N: Integer specifying the number of states Returns -
src/inference/function_blocks.py:807
↓ 2 callersFunctionStanh
Stochastic hyperbolic tangent Parameters ---------- x: Input stochastic bit-stream N: Integer specifying the number of states
src/inference/function_blocks.py:568
↓ 2 callersFunctionnext_int_power_of_2
Vectorized form of scalar_next_int_power_of_2
src/inference/scaling_ops.py:10
↓ 2 callersFunctionsc_add
Parameters ---------- x: Input data 2D tensor w: Weight 2D tensor s_in: 1D tensor with scaling factors of the input activations
src/training/sc_train_creg.py:114
↓ 2 callersFunctionsc_add
Parameters ---------- x: Input data 2D tensor w: Weight 2D tensor s_in: 1D tensor with scaling factors of the input activations
src/training/sc_train_l2reg.py:114
↓ 2 callersFunctionsc_matmul
Parameters ---------- x: Input data 2D tensor w: Weight 2D tensor s_in: 1D tensor with scaling factors of the input activations
src/training/sc_train_creg.py:68
↓ 2 callersFunctionsc_matmul
Parameters ---------- x: Input data 2D tensor w: Weight 2D tensor s_in: 1D tensor with scaling factors of the input activations
src/training/sc_train_l2reg.py:68
↓ 1 callersFunctionSmin
Stochastic min unit Parameters ---------- a,b: Input bit-streams N: Integer specifying the number of states Returns -
src/inference/function_blocks.py:843
↓ 1 callersFunctionSrelu
Stochastic approximation of the ReLU Parameters ---------- x: Input stochastic bit-stream N: Integer specifying the number of s
src/inference/function_blocks.py:879
↓ 1 callersFunctiondec_dot
Stochastic inner product with decomposition. The implementation assumes that the input bit-streams have a common scaling parameter. Par
src/inference/function_blocks.py:364
↓ 1 callersFunctiondo_it
()
src/inference/function_blocks.py:527
↓ 1 callersFunctiondot
Scaled inner product in stochastic computing. The implementation assumes that the input bit-streams have a common scaling parameter. Pa
src/inference/function_blocks.py:291
↓ 1 callersFunctionmain
()
src/inference/network_II/sc_inference.py:12
↓ 1 callersFunctionmain
()
src/inference/network_I/sc_inference.py:12
↓ 1 callersFunctionmat_sng
Vectorised form of sng Parameters ---------- x: 2D numpy array of floating-point input values no_stoch_samples: Bit-stream lengt
src/inference/function_blocks.py:68
↓ 1 callersFunctionneural_net
(x)
src/inference/network_II/fp_inference.py:42
↓ 1 callersFunctionneural_net
(x)
src/inference/network_I/fp_inference.py:42
↓ 1 callersFunctionnext_int_power_of_2
Vectorized form of scalar_next_int_power_of_2
src/inference/function_blocks.py:17
↓ 1 callersFunctionpopcount
(x)
src/inference/function_blocks.py:547
↓ 1 callersFunctionv_add_scale
Vectorized form of add_scale() function
src/inference/scaling_ops.py:69
↓ 1 callersFunctionvec_sng
Vectorised form of sng Parameters ---------- x: 1D numpy array of floating-point input values no_stoch_samples: Bit-stream lengt
src/inference/function_blocks.py:46
FunctionSabs
Stochastic approximation of the absolute value function Parameters ---------- x: Stochastic bit-stream N: Integer specifying th
src/inference/function_blocks.py:755
FunctionSexp
Stochastic exponentiation function Note: G should be such that G<<N Parameters ---------- x: Stochastic bit-stream G: Posi
src/inference/function_blocks.py:706
Functionadd_scale
Parameters ---------- s1,s2: Input scaling parameters Returns ------- The output scaling of a two input scaled added
src/inference/scaling_ops.py:57
Functionhelper
(row_idx,queue)
src/inference/function_blocks.py:496
Functionmat_sc_value
Vectorised version of the get_value function Parameters ---------- x: 3D numpy array with stochastic bit-streams
src/inference/function_blocks.py:126
Functionnon_lin_sat
Approximates a non-linear block
src/inference/function_blocks.py:550
Functionrelu
Returns the output scaling of a ReLU
src/inference/scaling_ops.py:114
Functionsc_matmul
Stochastic matrix multiplication of the form X*W. The implementation assumes that the input bit-streams have a common scaling parameter.
src/inference/function_blocks.py:456
Functionsc_matmul_scaling
The function computes the output scalings of a stochastic computing based matrix multiplication of the form X*W, where X is a 3D numpy
src/inference/scaling_ops.py:16
Functionsc_matvec_add
Matrix to vector addition of the form X + b. The vector b is broaccast along the rows of X. The implementation assumes that the inputs have a
src/inference/function_blocks.py:242
Functionsc_matvec_add_scaling
The function computes the output scalings of a stochastic computing based matrix addition of the form X + b, where X is a 3D numpy array
src/inference/scaling_ops.py:75
Functionscalar_next_int_power_of_2
Return the next integer power of 2 of x
src/inference/function_blocks.py:10
Functionscalar_next_int_power_of_2
Return the next integer power of 2
src/inference/scaling_ops.py:4
Functionsquare
(x)
src/inference/function_blocks.py:165
FunctionvSmax
Compute the max value from the list
src/inference/function_blocks.py:834
FunctionvSmin
Compute the min value from the list
src/inference/function_blocks.py:870
Functionvec_Srelu
Vectorised form of Srelu
src/inference/function_blocks.py:895
Functionvec_sc_value
Vectorised version of the get_value function Parameters ---------- x: 2D numpy array with stochastic bit-streams
src/inference/function_blocks.py:108