ray.rllib.utils.numpy.fc#
- ray.rllib.utils.numpy.fc(x: numpy.ndarray, weights: numpy.ndarray, biases: numpy.ndarray | None = None, framework: str | None = None) numpy.ndarray[source]#
Calculates FC (dense) layer outputs given weights/biases and input.
- Parameters:
x β The input to the dense layer.
weights β The weights matrix.
biases β The biases vector. All 0s if None.
framework β An optional framework hint (to figure out, e.g. whether to transpose torch weight matrices).
- Returns:
The dense layerβs output.