Hi guys. Currently I have completed the codes for TensorL3D so that it can be used by DataPredict Neural.
Unlike your usual DataPredict library that uses 2D tensors (or Matrix), DataPredict Neural is required to handle 3D tensors so that it can process images, texts and videos.
Currently, I want you guys to try out the two API designs (Object and Table) of the TensorL3D library and tell me which one you prefer (combination of both in terms of speed and ease of use).
You can access them here: GitHub - AqwamCreates/TensorL3D
Here are the code samples if you want to use them in Roblox Studio.
Object Version (Easy To Use Version)
local a = TensorL3D.create({3, 3, 3}, 2)
local b = TensorL3D.create({3, 3, 3}, 20)
print(b)
local c = a + b
print(c)
a = -a
a[1][2][1] = 10
print(a)
local Bool = a:isGreaterThan(b)
Bool:print()
a:print()
c = b:transpose(1, 3)
c:print()
d = b:tensorProduct(a)
print(d)
e = b:innerProduct(a)
print(e)
print(b:sum(1))
Table Version (Speed Performant Version)
local a = TensorL3D:create({3, 3, 3}, 2)
local b = TensorL3D:create({3, 3, 3}, 20)
TensorL3D:print(b)
local c = TensorL3D:add(a, b)
TensorL3D:print(c)
a[1][2][1] = 10
local Bool = TensorL3D:isGreaterThan(a, b)
TensorL3D:print(Bool)
c = TensorL3D:transpose(b, 1, 3)
TensorL3D:print(c)
d = TensorL3D:tensorProduct(b, a)
TensorL3D:print(d)
e = TensorL3D:innerProduct(b, a)
TensorL3D:print(e)
TensorL3D:print(TensorL3D:sum(b, 1))
Now which one you prefer?
- Object Version
- Table Version
0 voters