RavOp
RavOP
Ravop is the Ravenverse op library. Ops are a fundamental unit of Ravenverse. Ravop Library contains the main object data types Tensor
and Scalar
upon which we can perform the various arithmetic and mathematical operations available in the ravop library in a distributed and decentralized manner.
###Ravop in Ravenverse
Ravop is responsible for the creation of ops and retrieving ops from ravcom and ravsock.
Setup and Installation
Create a virtual environment
Activate the virtual environment
Install RavOp
This step will automatically install the dependencies
Set RAVSOCK_SERVER_URL in the ravop/config.py file
Note: Make sure ravsock is up and running
Initializing Tensors , Scalars and Graphs
Tensors
:Raven Tensors are data type objects which are multidimensional arrays
Scalars
:Raven data type object for int
or float
type.
Graph
: For evaluating all the ops after creating it in a computational graph.
These data types can be initialized as follows:
Example
We can use raven ops to operate on these Tensors. Let's consider adding two Tensors . Adding two tensors can be achieved using the R.add() operation
Raven supports Unary and Binary ops :
unary ops
Binary ops
:
##Supported Ops Arithmetic Ops
lin
add
mul
sub
pos
neg
exp
natlog
pow
square
cube
square_root
cube_root
abs
Comparision Opa
greater
greater_equal
less
less_equal
equal
not_equal
Logical Operations
logical_and
logical_or
logical_not
logical_xor
Statistical Ops
mean
average
mode
median
variance
std
percentile
Tensor Ops
random
bincount
where
sign
foreach
one_hot_encoding
matmul
multiply
dot
transpose
sum
sort
split
reshape
concat
min
max
unique
argmax
argmin
expand_dims
inv
gather
reverse
stack
tile
slice
find_indices
shape
Federated Learning
federated_mean
federated_variance
federated_standard_deviation
Last updated
Was this helpful?