Git Product home page Git Product logo

Comments (6)

isaacgerg avatar isaacgerg commented on May 29, 2024

I was able to fix this issue (so far) by having free_gpu() simply return without doing K.clear_session().

from deepswarm.

Pattio avatar Pattio commented on May 29, 2024

Hmm that's interesting I just ran the test with newest version in Google Colab and it works without any errors. Could you please provide following details:

  1. Operating system
  2. TensorFlow version
  3. Training sample code

from deepswarm.

isaacgerg avatar isaacgerg commented on May 29, 2024
  1. Windows 7 x64
  2. 1.13.1
dataset = Dataset(training_examples=x_train, training_labels=y_train, testing_examples=x_train, testing_labels=y_train)
backend = TFKerasBackend(dataset=dataset, optimizer=tf.keras.optimizers.Adam(1e-4))
deepswarm = DeepSwarm(backend=backend)
topology = deepswarm.find_topology()
trained_topology = deepswarm.train_topology(topology, 50)

the yaml

DeepSwarm:
    save_folder:
    metrics: accuracy
    max_depth: 15
    reuse_patience: 1

    aco:
        pheromone:
            start: 0.1
            decay: 0.1
            evaporation: 0.1
            verbose: False
        greediness: 0.5
        ant_count: 16

    backend:
        epochs: 15
        batch_size: 16
        patience: 5
        loss: binary_crossentropy
        verbose: True

    spatial_nodes: [InputNode, Conv2DNode, DropoutSpatialNode, BatchNormalizationNode, Pool2DNode]
    flat_nodes: [FlattenNode, DenseNode, DropoutFlatNode, BatchNormalizationFlatNode]

Nodes:

    InputNode:
        type: Input
        attributes: 
            shape: [!!python/tuple [256, 256, 1]]
        transitions:
            Conv2DNode: 1.0

    Conv2DNode:
        type: Conv2D
        attributes:
            filter_count: [32, 64, 128]
            kernel_size: [1, 3, 5]
            activation: [ReLU]
        transitions:
            Conv2DNode: 0.8
            Pool2DNode: 1.2
            FlattenNode: 1.0
            DropoutSpatialNode: 1.1
            BatchNormalizationNode: 1.2
    
    DropoutSpatialNode:
        type: Dropout
        attributes:
            rate: [0.1, 0.3]
        transitions:
            Conv2DNode: 1.1
            Pool2DNode: 1.0
            FlattenNode: 1.0
            BatchNormalizationNode: 1.1

    BatchNormalizationNode:
        type: BatchNormalization
        attributes: {}
        transitions:
            Conv2DNode: 1.1
            Pool2DNode: 1.1
            DropoutSpatialNode: 1.0
            FlattenNode: 1.0

    Pool2DNode:
        type: Pool2D
        attributes:
            pool_type: [max, average]
            pool_size: [2]
            stride: [2, 3]
        transitions:
            Conv2DNode: 1.1
            FlattenNode: 1.0
            BatchNormalizationNode: 1.1

    FlattenNode:
        type: Flatten
        attributes: {}
        transitions:
            DenseNode: 1.0
            OutputNode: 0.8
            BatchNormalizationFlatNode: 0.9

    DenseNode:
        type: Dense
        attributes:
            output_size: [64, 128]
            activation: [ReLU, Sigmoid]
        transitions:
            DenseNode: 0.8
            DropoutFlatNode: 1.2
            BatchNormalizationFlatNode: 1.2
            OutputNode: 1.0

    DropoutFlatNode:
        type: Dropout
        attributes:
            rate: [0.1, 0.3]
        transitions:
            DenseNode: 1.0
            BatchNormalizationFlatNode: 1.0
            OutputNode: 0.9

    BatchNormalizationFlatNode:
        type: BatchNormalization
        attributes: {}
        transitions:
            DenseNode: 1.1
            DropoutFlatNode: 1.1
            OutputNode: 0.9

    OutputNode:
        type: Output
        attributes:
            output_size: [1]
            activation: [Sigmoid]
        transitions: {}

from deepswarm.

Pattio avatar Pattio commented on May 29, 2024

Thank you, I located the issue and will update you once it has been fixed.

from deepswarm.

isaacgerg avatar isaacgerg commented on May 29, 2024

Sure. Also, if you update all your open(WindowPath) calls to open(str(WindowPath)) you should be python 3.5 compatible. open() and Pathlib are only seamless in 3.6.

from deepswarm.

Pattio avatar Pattio commented on May 29, 2024

Issue is now fixed in version 0.0.7. Regarding the Python version, thank you for the suggestion, but when developing the library decision was made to aim for Python 3.6, without any backward compatibility (as this allows easier development). At the moment I don't really see any problem with using 3.6 as the default version.

from deepswarm.

Related Issues (10)

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.