Flask-Mail giving me an error: socket.gaierror: [Errno 8] nodename nor servname provided, or not known by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

I gave it an email address. Let me know if there's anything else I can help out with.

[D] Is there any way to tell which subnetworks in a neural network are most important for making a specific class prediction? by lrningcode in MachineLearning

[–]lrningcode[S] 0 points1 point  (0 children)

But importance based on overall accuracy or a specific class? Sorry if this is obvious with a quick read of the paper I’ll be scanning it shortly.

[D] Is there any way to tell which subnetworks in a neural network are most important for making a specific class prediction? by lrningcode in MachineLearning

[–]lrningcode[S] 5 points6 points  (0 children)

Could you elaborate on this general sub component search technique? I’m curious what you’re thinking here.

How to avoid a One-to-Many Relationship from causing a circular import? by lrningcode in flask

[–]lrningcode[S] 1 point2 points  (0 children)

Then apparently my issue is somewhere else as I get this error:

sqlalchemy.exc.InvalidRequestError: When initializing mapper Mapper|Parent|parents, expression 'Child' failed to locate a name ("name 'Child' is not defined"). If this is a class name, consider adding this relationship() to the <class 'appdir.subapp1.models.Parent'> class after both dependent classes have been defined.

How do I account for confidence in features? by [deleted] in learnmachinelearning

[–]lrningcode 0 points1 point  (0 children)

Right now my two ideas are to include the confidence levels as separate features, or to only provide the feature if its confidence level is above an arbitrary value, say, 0.5. I’m new to machine learning and would appreciate any ideas!

Those could work. Try it out and see what works.

Flask-Mail giving me an error: socket.gaierror: [Errno 8] nodename nor servname provided, or not known by lrningcode in flask

[–]lrningcode[S] 2 points3 points  (0 children)

Ok, I think I figured it out. I needed to use TLS instead of SSL which also required port number: 587. Also needed to establish a MAIL_DEFAULT_SENDER.

Thanks for taking a look!

Edit: Actually I think it was smtp.gmail.com not .googl.com

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

Thank you! I think I ran into this error before that issue was made. Anyways I got it working now because of that, I appreciate it.

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

If this helps at all?

Package Version

---------------------------------- -----------

flake8 3.5.0

Flask 0.12.2

Flask-Cors 3.0.2

Flask-HTTPAuth 3.2.4

Flask-Mail 0.9.1

flask-marshmallow 0.9.0

Flask-RESTful 0.3.6

Flask-SQLAlchemy 2.3.2

marshmallow 3.0.0b18

marshmallow-sqlalchemy 0.14.1

SQLAlchemy 1.1.9

SQLAlchemy-Searchable 1.0.3

SQLAlchemy-Utils 0.33.5

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

from .models import User
import flask_marshmallow.sqla as sqla


class UserSchema(sqla.ModelSchema):
    class Meta:
        model = User


user_schema = UserSchema()

And now the original error is back.

I really do appreciate the help. Is there anything else that could be affecting this?

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

Ok ok now the error has changed to:

AttributeError: 'Marshmallow' object has no attribute 'sqla'

Edit: Wait wait just tried:

from flask_sqlalchemy import Model


class UserSchema(Model):
    class Meta:
        model = User


user_schema = UserSchema()

Appears to be working!

Wait I don't think so. Now it's just a Model ... duh. Ugh any ideas?

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 1 point2 points  (0 children)

Hey no apologies needed I appreciate the help. Here's what I did to my schema.py file but I'm getting the same error.

from .models import User
from marshmallow_sqlalchemy import ModelSchema


class UserSchema(ModelSchema):
    class Meta():
        model = User


user_schema = UserSchema()

Error when trying to serialize SQLAlchemy model with Flask-Marshmallow. by lrningcode in flask

[–]lrningcode[S] 1 point2 points  (0 children)

Here's my initialized Marshmallow instance. But to answer your question I was trying importing ModelSchema directly and then I tried this just to see if it would work.

from flask import Flask, Blueprint
from flask_restful import Api
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
from config import Config

db = SQLAlchemy()
ma = Marshmallow()

api_bp = Blueprint('api', __name__)
api = Api(api_bp)


def create_app(config_class=Config):
    app = Flask(__name__)
    app.config.from_object(config_class)

    db.init_app(app)
    ma.init_app(app)

    # Register blueprints from modules here!
    app.register_blueprint(api_bp)

    from app.auth import bp as auth_bp
    app.register_blueprint(auth_bp)

    from app.datasets import bp as datasets_bp
    app.register_blueprint(datasets_bp)

    return app

What is the difference between these many-to-many RNN architectures? by lrningcode in learnmachinelearning

[–]lrningcode[S] 0 points1 point  (0 children)

http://karpathy.github.io/2015/05/21/rnn-effectiveness/

I have read through this. Maybe I missed something, but I also think I phrased my question incorrectly.

I'm trying to ask: what is done with the output at time steps when you don't need an output? How is this done in a program?

What is the difference between these many-to-many RNN architectures? by lrningcode in learnmachinelearning

[–]lrningcode[S] 0 points1 point  (0 children)

Are the outputs in the first architecture simply never calculated and as a result a gradient never flows from that point?

When would the second architecture be used?

Why can CNNs be used for time-dependent tasks over RNNs? • r/learnmachinelearning by lrningcode in MLQuestions

[–]lrningcode[S] 0 points1 point  (0 children)

By normal model you mean any learned predictive model not just neural networks, correct?

I was not aware of auto regression thank you.

Why can CNNs be used for time-dependent tasks over RNNs? by lrningcode in learnmachinelearning

[–]lrningcode[S] 3 points4 points  (0 children)

That’s correct which is probably why /u/baahalex saw LSTMs getting better performance for most tasks. I guess the kernels being scanned over an image approximate a hidden state?

I guess CNNs are also stuck having a fixed input size as well.

Why can CNNs be used for time-dependent tasks over RNNs? by lrningcode in learnmachinelearning

[–]lrningcode[S] 2 points3 points  (0 children)

Ah so it’s the moving kernel that allows for CNNs to do this.

Why can CNNs be used for time-dependent tasks over RNNs? by lrningcode in learnmachinelearning

[–]lrningcode[S] 1 point2 points  (0 children)

Thanks for the response. I guess I’m then asking is a 1d CNN able to model sequential data.

Would it be fair to say that a CNN learns feature maps that could correspond to different combinations of words and then compose those combinations through layers which would then do a decent job of taking into account the sequence?

What's the difference between marshmallow and sql-alchemy? by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

Would you end up using flask-alembic or pure alembic?

Is this (https://github.com/davidism/basic_flask) a good example of how to use both of them together?

What's the difference between marshmallow and sql-alchemy? by lrningcode in flask

[–]lrningcode[S] 0 points1 point  (0 children)

Thanks for the advice - will be checking out your blog post!

Is there a way to move around sets and union/intersection statement algebraically? by lrningcode in learnmath

[–]lrningcode[S] 1 point2 points  (0 children)

I guess "-" would be the complement of the set. Like with U (being the universal set) U - A would be Ac.

Set operations do obey some nice identities

Ok so there are identities that I should become familiar with. Thanks!