Hey all. I’m dealing with an issue where the observation space going into the forward pass of my model contains an image as well as standard 1D vectors. This means the unflattened dictionary has a 2D observation, as well as a whole bunch of 1D observations.
My goal is to pass 2D observation into one part of my model, and the remaining 1D observations into a separate part of my model, which means I then need to take those unflattened 1D obs dictionaries and flatten them out. Is there a more efficient way of doing this flattening process than looping over all of the observations one by one, accessing their values, and appending them to a tensor? Thanks in advance!
EDIT: I’m using PyTorch for my custom model.