-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
When using an LSTNet summary network in combination with the PyTorch backend, automatic model building fails when calling approximator.fit() with the following RuntimeError:
RuntimeError: Unable to automatically build the model. Please build it yourself before calling fit/evaluate/predict. A model is 'built' when its variables have been created and its self.built attribute is True. Usually, calling the model on a batch of data is the right way to build it. Exception encountered: 'Exception encountered when calling ContinuousApproximator.call().
Model ContinuousApproximator does not have a call() method implemented.
Arguments received by ContinuousApproximator.call(): • args=({'inference_variables': 'torch.Tensor(shape=torch.Size([64, 3]), dtype=float32)', 'summary_variables': 'torch.Tensor(shape=torch.Size([64, 13, 2]), dtype=float32)', 'inference_conditions': 'torch.Tensor(shape=torch.Size([64, 1]), dtype=float32)'},) • kwargs=<class 'inspect._empty'>'This error does not occur when one of the components is changed (e.g., either using TensorFlow as the keras backend or using another summary network such as DeepSet).
The error can be reproduced in the Linear_Regression.ipynb example by using the torch backend and replacing the DeepSet summary network with an LSTNet summary network.