質問編集履歴

1

エラー全文を追加

2023/02/28 11:47

投稿

Muuuuki
Muuuuki

スコア26

test CHANGED
File without changes
test CHANGED
@@ -9,8 +9,8 @@
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
11
  ```
12
- InvalidArgumentError Traceback (most recent call last)
12
+ InvalidArgumentError Traceback (most recent call last)
13
- <ipython-input-2-d602f76c71bf> in <module>
13
+ <ipython-input-2-bb8e73d2cf55> in <module>
14
14
  119 )
15
15
  120 # 学習モデルにデータを与えて学習させる
16
16
  --> 121 model.fit(
@@ -26,6 +26,93 @@
26
26
  54 except core._NotOkStatusException as e:
27
27
 
28
28
  InvalidArgumentError: Graph execution error:
29
+
30
+ 2 root error(s) found.
31
+ (0) INVALID_ARGUMENT: ValueError: Input contains infinity or a value too large for dtype('float64').
32
+ Traceback (most recent call last):
33
+
34
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/ops/script_ops.py", line 271, in __call__
35
+ ret = func(*args)
36
+
37
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
38
+ return func(*args, **kwargs)
39
+
40
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1039, in generator_py_func
41
+ values = next(generator_state.get_iterator(iterator_id))
42
+
43
+ File "/usr/local/lib/python3.8/dist-packages/keras/engine/data_adapter.py", line 901, in wrapped_generator
44
+ for data in generator_fn():
45
+
46
+ File "<ipython-input-2-bb8e73d2cf55>", line 36, in generator
47
+ data = StandardScaler().fit_transform(data.reshape(-1, 1)).reshape(data.shape)
48
+
49
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 852, in fit_transform
50
+ return self.fit(X, **fit_params).transform(X)
51
+
52
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/preprocessing/_data.py", line 806, in fit
53
+ return self.partial_fit(X, y, sample_weight)
54
+
55
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/preprocessing/_data.py", line 841, in partial_fit
56
+ X = self._validate_data(
57
+
58
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 566, in _validate_data
59
+ X = check_array(X, **check_params)
60
+
61
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/utils/validation.py", line 800, in check_array
62
+ _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan")
63
+
64
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/utils/validation.py", line 114, in _assert_all_finite
65
+ raise ValueError(
66
+
67
+ ValueError: Input contains infinity or a value too large for dtype('float64').
68
+
69
+
70
+ [[{{node PyFunc}}]]
71
+ [[IteratorGetNext]]
72
+ [[IteratorGetNext/_8]]
73
+ (1) INVALID_ARGUMENT: ValueError: Input contains infinity or a value too large for dtype('float64').
74
+ Traceback (most recent call last):
75
+
76
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/ops/script_ops.py", line 271, in __call__
77
+ ret = func(*args)
78
+
79
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
80
+ return func(*args, **kwargs)
81
+
82
+ File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1039, in generator_py_func
83
+ values = next(generator_state.get_iterator(iterator_id))
84
+
85
+ File "/usr/local/lib/python3.8/dist-packages/keras/engine/data_adapter.py", line 901, in wrapped_generator
86
+ for data in generator_fn():
87
+
88
+ File "<ipython-input-2-bb8e73d2cf55>", line 36, in generator
89
+ data = StandardScaler().fit_transform(data.reshape(-1, 1)).reshape(data.shape)
90
+
91
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 852, in fit_transform
92
+ return self.fit(X, **fit_params).transform(X)
93
+
94
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/preprocessing/_data.py", line 806, in fit
95
+ return self.partial_fit(X, y, sample_weight)
96
+
97
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/preprocessing/_data.py", line 841, in partial_fit
98
+ X = self._validate_data(
99
+
100
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 566, in _validate_data
101
+ X = check_array(X, **check_params)
102
+
103
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/utils/validation.py", line 800, in check_array
104
+ _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan")
105
+
106
+ File "/usr/local/lib/python3.8/dist-packages/sklearn/utils/validation.py", line 114, in _assert_all_finite
107
+ raise ValueError(
108
+
109
+ ValueError: Input contains infinity or a value too large for dtype('float64').
110
+
111
+
112
+ [[{{node PyFunc}}]]
113
+ [[IteratorGetNext]]
114
+ 0 successful operations.
115
+ 0 derived errors ignored. [Op:__inference_train_function_7490]
29
116
  ```
30
117
 
31
118