# tf_agents.specs.tensor_spec.from_pbtxt_file

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/specs/tensor_spec.py#L627-L632) |

Loads a spec encoded as a struct_pb2.StructuredValue from a pbtxt file.

    tf_agents.specs.tensor_spec.from_pbtxt_file(
        spec_path
    )