Toggle navigation sidebar
Toggle in-page Table of Contents
Ray 3.0.0.dev0
Welcome to Ray!
Ray
Overview
Getting Started
Installation
Use Cases
Example Gallery
Ecosystem
Ray Core
Ray Data
Ray Train
Ray Tune
Ray Serve
Ray RLlib
Getting Started with RLlib
Key Concepts
Environments
Algorithms
User Guides
Examples
Ray RLlib API
Algorithms
Environments
Policy API
Model APIs
ray.rllib.models.modelv2.ModelV2
ray.rllib.models.torch.torch_modelv2.TorchModelV2
ray.rllib.models.tf.tf_modelv2.TFModelV2
ray.rllib.models.modelv2.ModelV2.forward
ray.rllib.models.modelv2.ModelV2.value_function
ray.rllib.models.modelv2.ModelV2.last_output
ray.rllib.models.modelv2.ModelV2.get_initial_state
ray.rllib.models.modelv2.ModelV2.is_time_major
ray.rllib.models.modelv2.ModelV2.variables
ray.rllib.models.modelv2.ModelV2.trainable_variables
ray.rllib.models.modelv2.ModelV2.custom_loss
ray.rllib.models.modelv2.ModelV2.metrics
Catalog API
RLModule API
Learner API
Sampling the Environment or offline data
Replay Buffer API
RLlib Utilities
External Application API
More Libraries
Ray Clusters
Monitoring and Debugging
References
Developer Guides
repository
open issue
suggest edit
.rst
.pdf
ray.rllib.models.torch.torch_modelv2.TorchModelV2.context
ray.rllib.models.torch.torch_modelv2.TorchModelV2.context
#
TorchModelV2.
context
(
)
→
contextlib.AbstractContextManager
#
Returns a contextmanager for the current forward pass.