seb
MModular
•Created by seb on 10/23/2023 in #questions
Populating values of tensor
Currently working on creating a one-hot encoding input tensor by initializing the tensor with zeros, and then setting individual cells of the 2D tensor to 1. However, trying to set the value with
tensor[i][j] = 1
is setting whole rows of the tensor at a time; how can I do this?2 replies
MModular
•Created by seb on 10/22/2023 in #questions
List of memory-only structs
I am trying to create a struct for a neural network layer with memory-only list of neurons:
But I'm struggling to compose these into a list of any sort, whether with a heap array, vector, or variadic list, getting this error:
candidate not viable: method argument #1 cannot bind generic !mlirtype to memory-only type 'Neuron'
. Is there a way to compose structs in this way?8 replies