Same here. I think VS2017 do not support the alias of the std::function by this way. So, you can just replace:
    using RNNFunctionSignature = std::tuple<Tensor, Tensor>(
        /*input=*/const Tensor&,
        /*state=*/const Tensor&,
        /*params=*/TensorList,
        /*has_biases=*/bool,
        /*layers=*/int64_t,
        /*dropout=*/double,
        /*train=*/bool,
        /*bidirectional=*/bool,
        /*batch_first=*/bool);

by
    typedef std::function<std::tuple<Tensor, Tensor>(
        /*input=*/const Tensor&,
        /*state=*/const Tensor&,
        /*params=*/TensorList,
        /*has_biases=*/bool,
        /*layers=*/int64_t,
        /*dropout=*/double,
        /*train=*/bool,
        /*bidirectional=*/bool,
        /*batch_first=*/bool)> RNNFunctionSignature;

or in a more modern way
    using RNNFunctionSignature = 
    std::function<std::tuple<Tensor, Tensor>(
        /*input=*/const Tensor&,
        /*state=*/const Tensor&,
        /*params=*/TensorList,
        /*has_biases=*/bool,
        /*layers=*/int64_t,
        /*dropout=*/double,
        /*train=*/bool,
        /*bidirectional=*/bool,
        /*batch_first=*/bool)>;

both works with vs2017 (using at least C++11 for the “using” way)