Git Product home page Git Product logo

Comments (3)

BobCN2017 avatar BobCN2017 commented on July 20, 2024 1

def train_dialogue(domain_file="mobile_domain2.yml",
model_path="models\dialogue",
training_data_file="data/mobile_story.md"):

featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
agent = Agent(domain_file, policies=[MemoizationPolicy(max_history=5), KerasPolicy(featurizer)])

agent.train(
    training_data_file,
    epochs=200,
    batch_size=16,
    augmentation_factor=50,
    validation_split=0.2
)

agent.persist(model_path)
return agent

我参考另一个项目,把这里改成上面那样,训练通过了。建议你试试

from _rasa_chatbot.

Emmonss avatar Emmonss commented on July 20, 2024

我将train-dialogue函数改成这样了,但是还是会出以下的错误:
Exception: Passing a file name to agent.train(...) is not supported anymore. Rather load the data with data = agent.load_data(file_name) and pass it to agent.train(data).
然后我按照文档改了一下代码
def train_dialogue(domain_file="mobile_domain.yml",
model_path="models/dialogue",
training_data_file="data/mobile_story.md"):
featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
agent = Agent(domain_file, policies=[MemoizationPolicy(max_history=5), KerasPolicy(featurizer)])
data = agent.load_data(training_data_file)
#agent.train(data)
agent.train(
data,
epochs=200,
batch_size=16,
augmentation_factor=50,
validation_split=0.2
)
agent.persist(model_path)
return agent
还是会报错:
Exception: Can not access action 'action_search_consume', as that name is not a registered action for this domain. Available actions are:
请问怎么解决啊,谢谢!

from _rasa_chatbot.

zqhZY avatar zqhZY commented on July 20, 2024

代码已更新,从新clone试试

from _rasa_chatbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.