pulsatrix
Loading...
Searching...
No Matches
dqn_target.hpp
Go to the documentation of this file.
1
5#pragma once
6
10
11namespace pulsatrix {
12
41[[nodiscard]] Tensor ComputeDQNTarget(const Tensor& next_q_target, const Tensor& rewards, const Tensor& dones,
42 float gamma, DeviceBackend* backend);
43
74[[nodiscard]] Tensor ComputeDoubleDQNTarget(const Tensor& next_q_online, const Tensor& next_q_target,
75 const Tensor& rewards, const Tensor& dones, float gamma,
76 DeviceBackend* backend);
77
102void SyncTargetNetwork(Module& source, Module& destination);
103
104} // namespace pulsatrix
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:219
Base class for every layer type (LinearModule, Conv2DModule, activations, ...).
Definition module.hpp:58
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Abstract interface isolating vendor-specific memory/compute operations from Tensor/ComputationGraph.
Abstract base every layer subclasses – NVI forward(), pure-virtual LRP contract.
Definition acquisition_functions.hpp:16
void SyncTargetNetwork(Module &source, Module &destination)
Hard target-network update: copies every parameter value of source into destination,...
Tensor ComputeDQNTarget(const Tensor &next_q_target, const Tensor &rewards, const Tensor &dones, float gamma, DeviceBackend *backend)
Vanilla DQN Bellman target (Mnih et al. 2015): targets[b,0] = rewards[b,0] + gamma * (1 - dones[b,...
Tensor ComputeDoubleDQNTarget(const Tensor &next_q_online, const Tensor &next_q_target, const Tensor &rewards, const Tensor &dones, float gamma, DeviceBackend *backend)
Double DQN Bellman target (van Hasselt et al. 2016, arXiv:1509.06461): a* = argmax_a next_q_online[b,...
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).