huntzhan / pytorch-fast-elmo

A Fast ELMo Implementation. (NOT MAINTAIN ANYMORE)
MIT License
38 stars 9 forks source link

Wait For Pytorch 1.1 #9

Open huntzhan opened 5 years ago

VisualJoyce commented 3 years ago

I am using torch=1.7.1, I found a change of API in torch. I need to change the following code to finish the compile.

--- a/extension/elmo_character_encoder.cc
+++ b/extension/elmo_character_encoder.cc
@@ -75,7 +75,7 @@ ElmoCharacterEncoderImpl::ElmoCharacterEncoderImpl(
             out_channels,
             kernel_size)
         // Explicitly set bias.
-        .with_bias(true);
+        .bias(true);

     // Build.
     auto conv = torch::nn::Conv1d(conv_options);