Hi, I’m working on using trajectory view for one of my project. The inference and training of the network requires data from the past, thus at the beginning of an episode, we will get dummy data instead of actual input in order to keep the input dimensions correct.
My question is: What is a reliable way to see how many of the observations are dummy data? What is the pattern being used to create dummy data? Thank you.
usually the dummy data is for the view requirements are created at different points depending on which view requirements you define. For example the initial states are created in your get_initial_state() method of your Policy (here is the function calling this method).
The main function is defined in the policy.py file. Here, the view requirements are iterated one by one and the get_dummy_batch_for_space() method is called. This is also why you pass a space to your ViewRequirement definition. From this space the initial values are created in case of shift < 0. The values created will have a shape equal to (BATCH_SIZE, TIME_SIZE, FEATURE_SIZE), where TIME_SIZE equals includes [shift:0] steps.
Thank you for the detailed reply. I needed this info because I need to mask the dummy observations. I find that the default values used to create dummy values are 0.0, which I can’t use as a criteria since my environment can actually give an observation of all 0’s. I think changing the default filling number in get_dummy_data to NAN would be a solution. Do you know of any other ways that won’t break the interface?
@mannyv ,
Thank you, this looks like a doable approach.
Another possible approach: I noticed that in the SampleBatch object, there is a key called t. What does this field do? Does it tell you the timestep of current batch?