You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: qrnn_bp.m
    path of file: ./repos/LightNet/RNN
    
    the code of the file until where you have to start completion: function [ net,res,opts ] = qrnn_bp( net,res,opts )
%QRNN_BP Summary of this function goes here
%   Detailed explanation goes here

    n_frames=opts.parameters.n_frames;    
    n_hidden_nodes=opts.parameters.n_hidden_nodes;

    
function [ net,res,opts ] = qrnn_bp( net,res,opts )
%QRNN_BP Summary of this function goes here
%   Detailed explanation goes here

    n_frames=opts.parameters.n_frames;    
    n_hidden_nodes=opts.parameters.n_hidden_nodes;
    batch_size=opts.parameters.batch_size;
     
    %1: calculate the gradients of the data fitting transform
    opts.dzdy=res.Fit(numel(net{end