model/train.py
def reset(hp):
    """
    Initialize the hidden state of the core network
    and the location vector.

    This is called once every time a new minibatch
    `x` is introduced.
    """
    dtype = torch.cuda.FloatTensor

    h_t = torch.zeros(hp['BATCH_SIZE'], hp['HIDDEN_SIZE'])
    h_t = Variable(h_t).type(dtype)

    l_t = torch.Tensor(hp['BATCH_SIZE'], 2).uniform_(-1, 1)
    l_t = Variable(l_t).type(dtype)

    return h_t, l_t

    Initialize the hidden state of the core network
    and the location vector.

    This is called once every time a new minibatch
    `x` is introduced.
    
Initialize the hidden state of the core network
and the location vector.

This is called once every time a new minibatch
`x` is introduced.
Initialize the hidden state of the core network and the location vector . This is called once every time a new minibatch ` x ` is introduced .
def reset(hp):
    dtype = torch.cuda.FloatTensor
    h_t = torch.zeros(hp['BATCH_SIZE'], hp['HIDDEN_SIZE'])
    h_t = Variable(h_t).type(dtype)
    l_t = torch.Tensor(hp['BATCH_SIZE'], 2).uniform_(-1, 1)
    l_t = Variable(l_t).type(dtype)
    return h_t, l_t
def reset ( hp ) : dtype = torch . cuda . FloatTensor h_t = torch . zeros ( hp [ 'BATCH_SIZE' ] , hp [ 'HIDDEN_SIZE' ] ) h_t = Variable ( h_t ) . type ( dtype ) l_t = torch . Tensor ( hp [ 'BATCH_SIZE' ] , 2 ) . uniform_ ( - 1 , 1 ) l_t = Variable ( l_t ) . type ( dtype ) return h_t , l_t
Initialize the hidden state of the core network
and the location vector.
Initialize the hidden state of the core network and the location vector .
"""
    Initialize the hidden state of the core network
    and the location vector.

    This is called once every time a new minibatch
    `x` is introduced.
    """
hp