MCPcopy Create free account
hub / github.com/TeleHuman/PBHC / _calculate_input_dim

Method _calculate_input_dim

humanoidverse/agents/modules/modules.py:15–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 self._build_network_layer(self.module_config_dict.layer_config)
14
15 def _calculate_input_dim(self):
16 # calculate input dimension based on the input specifications
17 input_dim = 0
18 for each_input in self.module_config_dict['input_dim']:
19 if each_input in self.obs_dim_dict:
20 # atomic observation type
21 input_dim += self.obs_dim_dict[each_input]
22 elif isinstance(each_input, (int, float)):
23 # direct numeric input
24 input_dim += each_input
25 else:
26 current_function_name = inspect.currentframe().f_code.co_name
27 raise ValueError(f"{current_function_name} - Unknown input type: {each_input}")
28
29 self.input_dim = input_dim
30
31 def _calculate_output_dim(self):
32 output_dim = 0

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected