GithubHelp home page GithubHelp logo

matthoffman / degas Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 7.0 6.86 MB

DGA-generated domain detection using deep learning models

License: MIT License

Python 100.00%
deep-learning dga dga-detection dga-domains

degas's People

Contributors

matthoffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

degas's Issues

run in docker by tensorFlow serving got errors

Hi there,
Thx for your degas project, I'm new bee with tensorflow, could you pls. help me about run degas in docker with tensorflow serving. Any reply is a big help.
When I run it in docker using:

docker run -p 8501:8501
--mount type=bind,source=/Users/myUserName/PycharmProjects/degas/models/degas,target=/models/degas
-e MODEL_NAME=degas -t tensorflow/serving:1.12.0

It works fine in my docker. Then I call RESTful API by post :

{
 "instances": [
   "www.google.com","234kd3ds9fkj3.com"
 ]
}

to :
http://localhost:8501/v1/models/degas:predict
I got the error response:

{
    "error": "Failed to process element: 0 of \'instances\' list. Error: Invalid argument: JSON Value: \"www.google.com\" Type: String is not of expected type: int32"
}

and even I POST this in request, got error response too:

{
 "inputs": [
   "www.google.com","234kd3ds9fkj3.com"
 ]
}

Edit:
I did a google more, then I change my input to:

{
    "inputs":[
        {
            "input_image": [0.2]
        }
    ]
}

And I got ERROR message as below:

{
    "error": "JSON Value: {\n    \"input_image\": [\n        0.2\n    ]\n} Type: Object is not of expected type: int32"
}

Edit:
I did a google more, then I change my input to:

{
    "inputs":[
        {
            "input_image": [1,2]
        }
    ]
}


And I got ERROR message as below:


{
    "error": "JSON Value: {\n    \"input_image\": [\n        1,\n        2\n    ]\n} Type: Object is not of expected type: int32"
}

Cloud you please point me out where is wrong with my operate?
THANKS A LOT.

/**************************************************************************/

EDIT:

Already OK now.

  1. specify tensorflow and other tensorflow packages to 1.11.0 (eg. tensorflow serving etc.)
  2. post json( predict for "www.google.com", "a2x43v89es01.com", "www.twitter.com" ):
{
 "instances": [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,12,21,29,29,21,26,19,12
,17,29,27]
,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,15,2,38,4,3,36,8,9,19,33,0,1,12
,17,29,27]
,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,12,34,37,23,34,34,19,32,12
,17,29,27]]
}
  1. response of tensorflow serving will be:
{
    "predictions": [
        [
            4.54876e-11
        ],
        [
            0.723077
        ],
        [
            2.9277e-18
        ]
    ]
}

/**************************************************************************/

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.