erechtheus / geolocation Goto Github PK
View Code? Open in Web Editor NEWGeolocation prediction for a given Tweet
License: GNU General Public License v3.0
Geolocation prediction for a given Tweet
License: GNU General Public License v3.0
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?
Hi, I am trying to use your pertained models to apply the geolocation identification for some of my twitter data, however, I cannot find the pretrained models anywhere.
Thanks in advance.
Can you explain please what is a875 in pred label paris-a875-fr with score=0.275 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.