power_cogs.utils package — power_cogs 0.1.0 documentation

# power_cogs.utils package

## Submodules

## power_cogs.utils.logging module

class `power_cogs.utils.logging.` `TensorboardLogger`(tensorboard_log_path: str = './tensorboard_logs')

  Bases: `object`

  `log_scalar`(data, name='', step=0) → None
  `log_text`(data, name='', step=0, description='') → None
  `setup_tensorboard`(tensorboard_run_path: str)

`power_cogs.utils.logging.` `doublewrap`(f)

  from https://stackoverflow.com/questions/653368/how-to-create-a-python-decorator-that-can-be-used-either-with-or-without-paramet answer by @bj0 a decorator decorator, allowing the decorator to be used as: @decorator(with, arguments, and=kwargs) or @decorator

`power_cogs.utils.logging.` `safe`(f)

  wrap function with try / catch Args:

  > f ([type]): function to wrap

`power_cogs.utils.logging.` `tensorboard`(cls)

## power_cogs.utils.torch_utils module

`power_cogs.utils.torch_utils.` `create_linear_layer`(input_dims: int, output_dims: int, bias: bool = True, activation=None)

`power_cogs.utils.torch_utils.` `create_linear_network`(input_dims: int, hidden_dims: List[int], output_dims: int, output_activation=None)

## power_cogs.utils.utils module

`power_cogs.utils.utils.` `makedirs`(path)

## Module contents