You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a model saved from python, it looks like it cannot find the constructor for Tensorflow.Keras.Layers.ZeroPadding2D owing to the fact that the single constructor that does exist has an additional optional parameter.
Reproduction Steps
Train and save a model in python: model.save('chart_type_classifier.model', save_format='tf')
Load the model in TensoFlow.Keras in c# .net
System.MissingMethodException
HResult=0x80131513
Message=Constructor on type 'Tensorflow.Keras.Layers.ZeroPadding2D' not found.
Source=System.Private.CoreLib
StackTrace:
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
Description
When loading a model saved from python, it looks like it cannot find the constructor for
Tensorflow.Keras.Layers.ZeroPadding2D
owing to the fact that the single constructor that does exist has an additional optional parameter.Reproduction Steps
Train and save a model in python:
model.save('chart_type_classifier.model', save_format='tf')
Load the model in TensoFlow.Keras in c# .net
Code where it blows up:
object obj2 = Assembly.Load("Tensorflow.Keras").CreateInstance("Tensorflow.Keras.Layers." + class_name, ignoreCase: true, BindingFlags.Default, null, new object[1] { obj }, null, null);
Note single argument.
Constructor that should be used but cannot be found owing to additional optional parameter:
Known Workarounds
No response
Configuration and Other Information
No response
The text was updated successfully, but these errors were encountered: