Giter Club home page Giter Club logo

dogs-vs-cats's Introduction

Hi there ๐Ÿ‘‹

I'm Dat. I work in the intersection between humans and machines.

  • ๐Ÿ‘จโ€๐Ÿ’ป I've been doing open-source for ages. Here are some of my projects that I contributed to:
    • imagededup - ๐Ÿ˜Ž Finding duplicate images made easy!
    • image-super-resolution - ๐Ÿ”Ž Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
    • jupyter2slides - Cloud Native Presentation Slides with Jupyter Notebook + Reveal.js
  • ๐Ÿ“ซ Feel free to reach me at [email protected] for work-related inquiries

dogs-vs-cats's People

Contributors

datitran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dogs-vs-cats's Issues

Runtime errors on the first run

I'm trying to do this for quite some time now, but couldn't get this to work.

File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 212, in as_tensor_variable
    raise AsTensorError("Cannot convert %s to TensorType" % str_x, type(x))
theano.tensor.var.AsTensorError: ('Cannot convert Tensor("pool1/3x3_s2/MaxPool:0", shape=(?, 1, 56, 63), dtype=float32) to TensorType', <class 'tensorflow.python.framework.ops.Tensor'>)

I haven't used tensorflow for so long. Is this issue related to version changes on tensorflow?
Here is the detailed output.

$ python3 dogs_vs_cats_training.py
Using TensorFlow backend.
2017-04-16 16:18:15,717 - __main__ - INFO - Create train and test dataset.
2017-04-16 16:18:16,545 - __main__ - INFO - Shape for X_train: (165, 3, 224, 224) Shape for y_train: (165,)
2017-04-16 16:18:16,545 - __main__ - INFO - Create the model.
/home/teekaram/Desktop/BEATS/tmp/Dogs-vs-Cats/models/google_net.py:15: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(64, (7, 7), kernel_regularizer=<keras.reg..., padding="same", activation="relu", strides=(2, 2), name="conv1/7x7_s2")`
  W_regularizer=l2(0.0002))(input)
/home/teekaram/Desktop/BEATS/tmp/Dogs-vs-Cats/models/google_net.py:21: UserWarning: Update your `MaxPooling2D` call to the Keras 2 API: `MaxPooling2D(pool_size=(3, 3), strides=(2, 2), padding="valid", name="pool1/3x3_s2")`
  pool1_3x3_s2 = MaxPooling2D(pool_size=(3, 3), strides=(2, 2), border_mode='valid', name='pool1/3x3_s2')(
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/type.py", line 270, in dtype_specs
    }[self.dtype]
KeyError: 'object'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 250, in constant_or_value
    TensorType(dtype=x_.dtype, broadcastable=bcastable),
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/type.py", line 51, in __init__
    self.dtype_specs()  # error checking is done there
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/type.py", line 273, in dtype_specs
    % (self.__class__.__name__, self.dtype))
TypeError: Unsupported dtype for TensorType: object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 206, in as_tensor_variable
    return constant(x, name=name, ndim=ndim)
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 264, in constant
    dtype=dtype)
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 259, in constant_or_value
    raise TypeError("Could not convert %s to TensorType" % x, type(x))
TypeError: ('Could not convert Tensor("pool1/3x3_s2/MaxPool:0", shape=(?, 1, 56, 63), dtype=float32) to TensorType', <class 'tensorflow.python.framework.ops.Tensor'>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "dogs_vs_cats_training.py", line 88, in <module>
    model = modified_googlenet(WIDTH, HEIGHT)
  File "/home/teekaram/Desktop/BEATS/tmp/Dogs-vs-Cats/models/google_net.py", line 24, in modified_googlenet
    pool1_norm1 = LRN(name='pool1/norm1')(pool1_3x3_s2)
  File "/usr/local/lib/python3.4/dist-packages/keras/engine/topology.py", line 578, in __call__
    output = self.call(inputs, **kwargs)
  File "/home/teekaram/Desktop/BEATS/tmp/Dogs-vs-Cats/googlenet_custom_layers.py", line 16, in call
    input_sqr = T.sqr(x)  # square the input
  File "/usr/local/lib/python3.4/dist-packages/theano/gof/op.py", line 615, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/elemwise.py", line 576, in make_node
    inputs = list(map(as_tensor_variable, inputs))
  File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line 212, in as_tensor_variable
    raise AsTensorError("Cannot convert %s to TensorType" % str_x, type(x))
theano.tensor.var.AsTensorError: ('Cannot convert Tensor("pool1/3x3_s2/MaxPool:0", shape=(?, 1, 56, 63), dtype=float32) to TensorType', <class 'tensorflow.python.framework.ops.Tensor'>)

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.