GithubHelp home page GithubHelp logo

erechtheus / geolocation Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 13.0 129 KB

Geolocation prediction for a given Tweet

License: GNU General Public License v3.0

Python 99.11% Dockerfile 0.89%
geolocation geolocation-prediction neural-network pretrained-models tweets

geolocation's People

Contributors

dependabot[bot] avatar erechtheus avatar ianroberts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

geolocation's Issues

Error when loading the model

Hi,

when I tried to run the predictText.py script, I get this exception:

Traceback (most recent call last): File "/home/virostatiq/PycharmProjects/keras-geolocation/predictText.py", line 38, in <module> textBranch = load_model('models/textBranchNorm.h5') File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model model = model_from_config(model_config, custom_objects=custom_objects) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config return deserialize(config, custom_objects=custom_objects) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize printable_module_name='layer') File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object list(custom_objects.items()))) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/sequential.py", line 301, in from_config model.add(layer) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/sequential.py", line 165, in add layer(x) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 431, in __call__ self.build(unpack_singleton(input_shapes)) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/layers/embeddings.py", line 109, in build dtype=self.dtype) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 252, in add_weight constraint=constraint) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 402, in variable v = tf.Variable(value, dtype=tf.as_dtype(dtype), name=name) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 213, in __call__ return cls._variable_v1_call(*args, **kwargs) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 176, in _variable_v1_call aggregation=aggregation) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 155, in <lambda> previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 2495, in default_variable_creator expected_shape=expected_shape, import_scope=import_scope) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 217, in __call__ return super(VariableMetaclass, cls).__call__(*args, **kwargs) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 1395, in __init__ constraint=constraint) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 1515, in _init_from_args initial_value, name="initial_value", dtype=dtype) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1039, in convert_to_tensor return convert_to_tensor_v2(value, dtype, preferred_dtype, name) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1097, in convert_to_tensor_v2 as_ref=False) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1175, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/virostatiq/PycharmProjects/keras-geolocation/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 977, in _TensorTensorConversionFunction (dtype.name, t.dtype.name, str(t))) ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_3/random_uniform:0", shape=(100000, 100), dtype=float32)'

The installed dependencies match the requirements.txt exactly, but I also tried with TF 0.12.0 and TF 2.0, and with different Keras versions.

Can you help?

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.