cVladu opened a new issue, #11827: URL: https://github.com/apache/tvm/issues/11827
I built a simple RNN network in PyTorch and tried to convert it using `relay.frontend.from_pytorch` interface ### Expected behavior The network is converted ### Actual behavior NotImplementedError: The following operators are not implemented: ['aten::rnn_tanh'] is raised ### Environment Operating system: Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic TVM version: 0.9.dev0 Steps to build the TVM were followed from: https://tvm.apache.org/docs/install/from_source.html -- no change to config.cmake file ### Steps to reproduce ``` def test_RNN_torch(num_layers: int, bidirectional: bool, use_bias: bool, hidden_size: int, input_size: int, seq_len: int, batch_first: bool, batch_size: int): r''' Args: num_layers (int): num_layers to be passed to torch.nn.RNN bidirectional (bool): whether to build bidirectional RNN or not use_bias (bool): whether to use bias or not hidden_size (int): hidden_size of RNN cells input_size (int): Input features seq_len (int): Timesteps in input data batch_first (bool): Whether batch dimension is first or second dimension in input tensor batch_size (int): Batch size of input. If 0, unbatched input will be fed to network ''' if batch_first: input_shape = (batch_size, seq_len, input_size) else: input_shape = (seq_len, batch_size, input_size) pytorch_net = torch.nn.Sequential( torch.nn.RNN(input_size, hidden_size, batch_first=batch_first, num_layers=num_layers, bidirectional=bidirectional, bias=use_bias) ) scripted_model = torch.jit.trace(pytorch_net.eval(), torch.randn(input_shape)) mod, params = relay.frontend.from_pytorch(scripted_model, [('input', input_shape)]) mod = relay.transform.InferType()(mod) print(mod.astext()) if __name__ == "__main__": test_transform_LSTM_3D_to_4D_09(1, False, True, 5, 5, 15, True, 32) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
