Created
March 21, 2022 19:31
-
-
Save andrewljohnson/dcc5b594b34c559f2b37bd3ccf50f6f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@8e3b54c9c353:/code# python manage.py shell < real_estate/scripts/generate_neural_net.py | |
fetching AnalysisRecords took 0.0015206336975097656 | |
Fetched 47555 records for properties. | |
2183530944 - Hashing AnalysisRecords took 3.006469964981079 | |
annotating years and months took 3.25303053855896 | |
making value map took 36.68412470817566 | |
Using 47550 properties for analysis. | |
4202095867 - data_hash | |
4036931971 - value_map_hash | |
making model took 0.8455119132995605 | |
Epoch 1/10 | |
1486/1486 [==============================] - 8s 4ms/step - loss: 137675.3281 | |
Epoch 2/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 95185.4766 | |
Epoch 3/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 94134.9609 | |
Epoch 4/10 | |
155/1486 [==>...........................] - ETA: 5s - loss: 91612.1641Traceback (most recent call last): | |
File "manage.py", line 22, in <module> | |
main() | |
File "manage.py", line 18, in main | |
execute_from_command_line(sys.argv) | |
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line | |
utility.execute() | |
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv | |
self.execute(*args, **cmd_options) | |
File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute | |
output = self.handle(*args, **options) | |
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/shell.py", line 93, in handle | |
exec(sys.stdin.read(), globals()) | |
File "<string>", line 24, in <module> | |
File "/code/real_estate/scripts/embedded_nn.py", line 145, in train_model_for_records | |
model.fit( | |
File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler | |
raise e.with_traceback(filtered_tb) from None | |
File "/usr/local/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 58, in quick_execute | |
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, | |
tensorflow.python.framework.errors_impl.InvalidArgumentError: In[0] and In[1] has different ndims: [32,1] vs. [0] | |
[[node model/dense/Tensordot/MatMul | |
(defined at /usr/local/lib/python3.8/site-packages/keras/layers/core/dense.py:202) | |
]] [Op:__inference_train_function_7914] | |
Errors may have originated from an input operation. | |
Input Source operations connected to node model/dense/Tensordot/MatMul: | |
In[0] model/dense/Tensordot/Reshape: | |
In[1] model/dense/Tensordot/ReadVariableOp: | |
Operation defined at: (most recent call last) | |
>>> File "manage.py", line 22, in <module> | |
>>> main() | |
>>> | |
>>> File "manage.py", line 18, in main | |
>>> execute_from_command_line(sys.argv) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line | |
>>> utility.execute() | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute | |
>>> self.fetch_command(subcommand).run_from_argv(self.argv) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv | |
>>> self.execute(*args, **cmd_options) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute | |
>>> output = self.handle(*args, **options) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/shell.py", line 93, in handle | |
>>> exec(sys.stdin.read(), globals()) | |
>>> | |
>>> File "<string>", line 24, in <module> | |
>>> | |
>>> File "/code/real_estate/scripts/embedded_nn.py", line 145, in train_model_for_records | |
>>> model.fit( | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler | |
>>> return fn(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/training.py", line 1216, in fit | |
>>> tmp_logs = self.train_function(iterator) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/training.py", line 878, in train_function | |
>>> return step_function(self, iterator) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/training.py", line 867, in step_function | |
>>> outputs = model.distribute_strategy.run(run_step, args=(data,)) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/training.py", line 860, in run_step | |
>>> outputs = model.train_step(data) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/training.py", line 808, in train_step | |
>>> y_pred = self(x, training=True) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler | |
>>> return fn(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/base_layer.py", line 1083, in __call__ | |
>>> outputs = call_fn(inputs, *args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 92, in error_handler | |
>>> return fn(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/functional.py", line 451, in call | |
>>> return self._run_internal_graph( | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/functional.py", line 589, in _run_internal_graph | |
>>> outputs = node.layer(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler | |
>>> return fn(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/engine/base_layer.py", line 1083, in __call__ | |
>>> outputs = call_fn(inputs, *args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 92, in error_handler | |
>>> return fn(*args, **kwargs) | |
>>> | |
>>> File "/usr/local/lib/python3.8/site-packages/keras/layers/core/dense.py", line 202, in call | |
>>> outputs = tf.tensordot(inputs, self.kernel, [[rank - 1], [0]]) | |
>>> | |
root@8e3b54c9c353:/code# python manage.py shell < real_estate/scripts/generate_neural_net.py | |
fetching AnalysisRecords took 0.001474618911743164 | |
Fetched 47555 records for properties. | |
2183530944 - Hashing AnalysisRecords took 3.014437198638916 | |
annotating years and months took 3.240628719329834 | |
making value map took 37.219221353530884 | |
Using 47550 properties for analysis. | |
4202095867 - data_hash | |
4036931971 - value_map_hash | |
making model took 0.8163161277770996 | |
Epoch 1/10 | |
1486/1486 [==============================] - 7s 4ms/step - loss: 137675.3281 | |
Epoch 2/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 95185.4766 | |
Epoch 3/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 94134.9609 | |
Epoch 4/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 93138.0469 | |
Epoch 5/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 91654.6328 | |
Epoch 6/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 90687.3438 | |
Epoch 7/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 89215.7266 | |
Epoch 8/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 87772.4922 | |
Epoch 9/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 86415.5234 | |
Epoch 10/10 | |
1486/1486 [==============================] - 6s 4ms/step - loss: 85049.3984 | |
Actual Predicted APN | |
0 295000.0 380401.0 57011103 | |
1 355000.0 361429.0 57011104 | |
2 291000.0 372725.0 57011105 | |
3 200000.0 385212.0 57011111 | |
4 479000.0 447428.0 57011113 | |
5 165000.0 365007.0 57011114 | |
6 341000.0 320412.0 57010316 | |
7 221000.0 380586.0 04709010 | |
8 135000.0 155140.0 57025102 | |
9 192000.0 173864.0 57025104 | |
10 189000.0 174573.0 57025301 | |
11 250000.0 205575.0 57026212 | |
12 135000.0 184915.0 57026303 | |
13 119000.0 144963.0 57024303 | |
14 442000.0 316309.0 00129208 | |
15 100000.0 252563.0 00130103 | |
16 195000.0 214014.0 00130202 | |
17 304878.0 288784.0 00130203 | |
18 243000.0 278175.0 00130303 | |
19 150000.0 170977.0 57026317 | |
20 245000.0 246139.0 00130306 | |
21 142000.0 204771.0 00130402 | |
22 196000.0 234236.0 00130405 | |
23 173500.0 228591.0 00130406 | |
24 115000.0 203774.0 00130501 | |
2022-03-21 19:31:03.482999: W tensorflow/python/util/util.cc:368] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them. | |
For target property, predicted 294874 vs list 479900 vs previous sale 279000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment