Horje
Declare data in spatial Code Example
Declare data in spatial
val data1D        = Array.tabulate(64){i => i * 3} // Create 1D array with 64 elements, each element being index * 3
val data1D_longer = Array.tabulate(1024){i => i} // Create 1D array with 1024 elements
val data2D        = (0::64, 0::64){(i,j) => i*100 + j} // Create 64x64 2D, where each element is row * 100 + col
val data5D        = (0::2, 0::2, 0::2, 0::2, 0::16){(i,j,k,l,m) => random[Int](5)} // Create 5D tensor, the highest dimension tensor currently supported in Spatial, with each element a random Int between 0 and 5




Whatever

Related
Assign keys to an object with the same name Code Example Assign keys to an object with the same name Code Example
Automata Code Example Automata Code Example
a majuscule avec accent Code Example a majuscule avec accent Code Example
cypress abort test Code Example cypress abort test Code Example
add resouse with buildconfig android Code Example add resouse with buildconfig android Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11