What is the fcnLossLayer in the generatePolicyFunction network and how can I implement it myself?
I wish to use my trained SAC agent in Matlab only as a policy function. For this, I tried the generatePolicyFunction option. The code and the network works as intended, but I’m having a hard time figuring out the last layer of the network. It says it’s a fcnLossLayer, although I have no idea what does it mean or how does it work. It’s description is very vauge:
>> policy.Layers(11, 1)
ans =
FcnLossLayer with properties:
LossFcn: []
IsNetworkStateful: 0
Name: ‘RepresentationLoss’
ResponseNames: {}
Description: ”
Type: "GenericLossLayer"
This is the only information I get from the DAGNetwork object and it makes no sense to me. Also I couldn’t find any relevant information in the documentation, or in the referenced articles, or anywhere on the internet. I found it’s type is rl.layer.FcnLossLayer, but searching for this I still got nothing. This seams to me like a focalLossLayer, but even if it is, I don’t know its parameters.
This is important to me because I want to use this policy in a previous Matlab version (R2020a), and it doesn’t seem to support this layer, so I want to try and implement it as a custom layer. Thank you for your help in advance!I wish to use my trained SAC agent in Matlab only as a policy function. For this, I tried the generatePolicyFunction option. The code and the network works as intended, but I’m having a hard time figuring out the last layer of the network. It says it’s a fcnLossLayer, although I have no idea what does it mean or how does it work. It’s description is very vauge:
>> policy.Layers(11, 1)
ans =
FcnLossLayer with properties:
LossFcn: []
IsNetworkStateful: 0
Name: ‘RepresentationLoss’
ResponseNames: {}
Description: ”
Type: "GenericLossLayer"
This is the only information I get from the DAGNetwork object and it makes no sense to me. Also I couldn’t find any relevant information in the documentation, or in the referenced articles, or anywhere on the internet. I found it’s type is rl.layer.FcnLossLayer, but searching for this I still got nothing. This seams to me like a focalLossLayer, but even if it is, I don’t know its parameters.
This is important to me because I want to use this policy in a previous Matlab version (R2020a), and it doesn’t seem to support this layer, so I want to try and implement it as a custom layer. Thank you for your help in advance! I wish to use my trained SAC agent in Matlab only as a policy function. For this, I tried the generatePolicyFunction option. The code and the network works as intended, but I’m having a hard time figuring out the last layer of the network. It says it’s a fcnLossLayer, although I have no idea what does it mean or how does it work. It’s description is very vauge:
>> policy.Layers(11, 1)
ans =
FcnLossLayer with properties:
LossFcn: []
IsNetworkStateful: 0
Name: ‘RepresentationLoss’
ResponseNames: {}
Description: ”
Type: "GenericLossLayer"
This is the only information I get from the DAGNetwork object and it makes no sense to me. Also I couldn’t find any relevant information in the documentation, or in the referenced articles, or anywhere on the internet. I found it’s type is rl.layer.FcnLossLayer, but searching for this I still got nothing. This seams to me like a focalLossLayer, but even if it is, I don’t know its parameters.
This is important to me because I want to use this policy in a previous Matlab version (R2020a), and it doesn’t seem to support this layer, so I want to try and implement it as a custom layer. Thank you for your help in advance! rlsacagent, generatepolicyfunction, fcnlosslayer, matlab, neural network, rl.layer.fcnlosslayer MATLAB Answers — New Questions