问题描述
我正在使用角度提及库进行自动提示。 我在项目中面临一个问题。
默认情况下,当我们输入“ @”时,角度提及库会提供建议,但是我需要同时使用import tensorflow as tf
from tensorflow.python.keras.saving import saving_utils
from tensorflow.python.keras.layers import deserialize,serialize
def unpack(model,training_config,weights):
restored_model = deserialize(model)
if training_config is not None:
restored_model.compile(**saving_utils.compile_args_from_training_config(
training_config))
restored_model.set_weights(weights)
return restored_model
def make_keras_picklable():
def __reduce__(self):
model_Metadata = saving_utils.model_Metadata(self)
training_config = model_Metadata.get("training_config",None)
model = serialize(self)
weights = self.get_weights()
return unpack,(model,weights)
cls = tf.keras.models.Model
cls.__reduce__ = __reduce__
# Ensures that tf.keras models are pickable
make_keras_picklable()
和#的建议。我的意思是,当用户键入@
时,它应该从array1提供建议,而当使用类型#时,它应该从array2提供建议。请检查以下示例。
@
选中下面的文本框,该文本框在键入array1: ['jayesh','vyas','jay']
triggerChar: "@",array1: ['111','222','333']
triggerChar: "#",
时给出建议,但也应该在键入@
时给出建议。
#
有人可以帮我吗?
预先感谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)