Error in function 'fwd_prop_enc' :attempt to call global 'forward' (a nil value)

In Machine Translation Dataset I have successfully pre-trained and trained my model in Lua. Now I move to predict my model.

But I get the error in a Lua file in the function encoder_clones:forward(encoder_input) Error: attempt to call global 'forward' (a nil value)

This is that specific function :

function fwd_prop_enc(source, source_l, batch_l, train)
local rnn_state_enc = reset_state(init_fwd_enc, batch_l, 0)
--print(rnn_state_enc)
local context = context_proto[{{1, batch_l}, {1, source_l}}]
for t = 1, source_l do
if train then
  encoder_clones[t]:training()
else
  encoder_clones[t]:evaluate()
end
local encoder_input = {source[t], unpack(rnn_state_enc[t-1])}
local out = encoder_clones:forward(encoder_input)
print("yes")
rnn_state_enc[t] = out
context[{{},t}]:copy(out[#out]) -- copy final layer for t'th timestep    (for entire batch)
 end
  return rnn_state_enc, context
end

This is how it is called in the main function

local rnn_state_enc, context = fwd_prop_enc(source, source_l, 1, false) -- train=false