We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model = build_transformer_model( config_path=config_path, checkpoint_path=checkpoint_path, return_keras_model=False )
output = GlobalPointer(len(categories), 64)(model.output) model = keras.models.Model(model.input, output) model.summary()
model.compile( loss=global_pointer_crossentropy, optimizer=Adam(learning_rate), metrics=[global_pointer_f1_score] )
evaluator = Evaluator() train_generator = data_generator(train_data, batch_size) model.fit( train_generator.forfit(), steps_per_epoch=len(train_generator), epochs=epochs, callbacks=[evaluator] ) export_path = 'model' version = "1" model.save(export_path + version, save_format="tf")
AttributeError: 'Dropout' object has no attribute '_saved_model_inputs_spec'
The text was updated successfully, but these errors were encountered:
_saved_model_inputs_spec
这种大概率是包的版本问题可以升级一下包的版本
Sorry, something went wrong.
No branches or pull requests
加载预训练模型
model = build_transformer_model(
config_path=config_path,
checkpoint_path=checkpoint_path,
return_keras_model=False
)
output = GlobalPointer(len(categories), 64)(model.output)
model = keras.models.Model(model.input, output)
model.summary()
model.compile(
loss=global_pointer_crossentropy,
optimizer=Adam(learning_rate),
metrics=[global_pointer_f1_score]
)
evaluator = Evaluator()
train_generator = data_generator(train_data, batch_size)
model.fit(
train_generator.forfit(),
steps_per_epoch=len(train_generator),
epochs=epochs,
callbacks=[evaluator]
)
export_path = 'model'
version = "1"
model.save(export_path + version, save_format="tf")
AttributeError: 'Dropout' object has no attribute '_saved_model_inputs_spec'
The text was updated successfully, but these errors were encountered: