Code Monkey home page Code Monkey logo

keras-project-template's Issues

TypeError: super() argument 1 must be type, not classobj in

Hi @Ahmkel, this repo is really great! thanks for putting the time to implement this.
When I run the code follow the way in README, I have this issue...

Traceback (most recent call last):
  File "main.py", line 36, in <module>
    main()
  File "main.py", line 23, in main
    data_loader = SimpleMnistDataLoader(config)
  File "/home/scr/Documents/Keras-Project/data_loader/simple_mnist_data_loader.py", line 7, in __init__
    super(SimpleMnistDataLoader, self).__init__(config)

My python version is 2.7.12

Auto added attribute in config instance when hasattr is called

Issue

When hasattr() function is called on a DotMap instance (config in this case) regarding a non existing attribute, it is automatically created.

E.g. Let's say 'config' is a DotMap instance which does not have 'testAttr' as an attribute. It will be created after a hasattr() function call.

Solution

Convert DotMap instance to dict and then call hasattr, self.config.toDict().

or

replace hasattr() function with attr in self.config

I will open a pull request with my proposed solution tomorrow. ๐Ÿ˜ƒ

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.