Giter Club home page Giter Club logo

Comments (6)

 avatar commented on August 21, 2024

I have another problem, when I run the code:

from future import absolute_import
import xlearn as xl

ffm_model = xl.create_ffm()

ffm_model.setTrain('./data/train_ffm.txt')
ffm_model.setValidate('./data/valid_ffm.txt')

param = {'task': 'binary', 'lr': 0.2, 'lambda': 0.002, 'nthread': 8, 'epoch': 10}

ffm_model.fit(param, './ffm_model.out')

ffm_model.setTest('./data/test_ffm.txt')
ffm_model.predict('./ffm_model.out', './ffm_output.txt')

it has raise the error:
Traceback (most recent call last):
File "xlearn.py", line 3, in
import xlearn as xl
File "/home/huangzhanpeng/Download/criteo/kaggle_criteo_ctr_challenge-/xlearn.py", line 5, in
ffm_model = xl.create_ffm()
AttributeError: 'module' object has no attribute 'create_ffm'

but the code can run in jupyter notebook

from xlearn.

aksnzhy avatar aksnzhy commented on August 21, 2024

It's a strange error I have never met before. I will check this soon.

from xlearn.

 avatar commented on August 21, 2024

there is another strange thing that if not delete xlearn.pyc, while create another python script, it still raise the same error

from xlearn.

johnwanggithub avatar johnwanggithub commented on August 21, 2024

@Huangzhanpeng 请问后来 'module' object has no attribute 'create_ffm' 这个问题怎么解决的,我也遇到了同样的问题,谢谢。

from xlearn.

aksnzhy avatar aksnzhy commented on August 21, 2024

@johnwanggithub 你能把 code 放上来吗,我帮你 check 一下。

from xlearn.

 avatar commented on August 21, 2024

@johnwanggithub 我删除了.pyc文件后就可以了

from xlearn.

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.