@@ -163,7 +163,7 @@ public ByteBuffer getBuffer() {
163
163
* @throws IllegalStateException if the underlying data is corrupted
164
164
*/
165
165
public int getFlatSize () {
166
- assertShapeIsCorect ();
166
+ assertShapeIsCorrect ();
167
167
return flatSize ;
168
168
}
169
169
@@ -174,7 +174,7 @@ public int getFlatSize() {
174
174
*/
175
175
@ NonNull
176
176
public int [] getShape () {
177
- assertShapeIsCorect ();
177
+ assertShapeIsCorrect ();
178
178
return Arrays .copyOf (shape , shape .length );
179
179
}
180
180
@@ -199,7 +199,7 @@ public int[] getShape() {
199
199
* For example, a TensorBuffer with shape {2, 3} that represents the following array,
200
200
* [[0.0f, 1.0f, 2.0f], [3.0f, 4.0f, 5.0f]].
201
201
*
202
- * The fourth element (whose value is 3.0f) in the TensorBuffer can be retrived by:
202
+ * The fourth element (whose value is 3.0f) in the TensorBuffer can be retrieved by:
203
203
* float v = tensorBuffer.getFloatValue(3);
204
204
* </pre>
205
205
*
@@ -226,7 +226,7 @@ public int[] getShape() {
226
226
* For example, a TensorBuffer with shape {2, 3} that represents the following array,
227
227
* [[0.0f, 1.0f, 2.0f], [3.0f, 4.0f, 5.0f]].
228
228
*
229
- * The fourth element (whose value is 3.0f) in the TensorBuffer can be retrived by:
229
+ * The fourth element (whose value is 3.0f) in the TensorBuffer can be retrieved by:
230
230
* int v = tensorBuffer.getIntValue(3);
231
231
* Note that v is converted from 3.0f to 3 as a result of type conversion.
232
232
* </pre>
@@ -459,7 +459,7 @@ private void allocateMemory(@NonNull int[] shape) {
459
459
* Verifies if the shape of the {@link TensorBuffer} matched the size of the underlying {@link
460
460
* ByteBuffer}.
461
461
*/
462
- private void assertShapeIsCorect () {
462
+ private void assertShapeIsCorrect () {
463
463
int flatSize = computeFlatSize (shape );
464
464
checkState (
465
465
(buffer .limit () == getTypeSize () * flatSize ),
0 commit comments