Home / Function/ checkShapeAndDataCapacityConsistency() — pytorch Function Reference

checkShapeAndDataCapacityConsistency() — pytorch Function Reference

Architecture documentation for the checkShapeAndDataCapacityConsistency() function in Tensor.java from the pytorch codebase.

Function java AndroidRuntime JavaAPI calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e["checkShapeAndDataCapacityConsistency()"]
  a3810b96_9142_0fab_7722_abfe805aec76["fromBlobUnsigned()"]
  a3810b96_9142_0fab_7722_abfe805aec76 -->|calls| bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e
  7d987baf_1d44_31d6_f128_18964ed36ba8["fromBlob()"]
  7d987baf_1d44_31d6_f128_18964ed36ba8 -->|calls| bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e
  0904339d_a9fa_c19b_1171_129c4c841cd6["numel()"]
  bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e -->|calls| 0904339d_a9fa_c19b_1171_129c4c841cd6
  a8703cc9_ca82_8058_0c67_94bdd5d5f63f["checkArgument()"]
  bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e -->|calls| a8703cc9_ca82_8058_0c67_94bdd5d5f63f
  style bb0b08c6_0ed9_5ba4_4285_d5f7aee8456e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/main/java/org/pytorch/Tensor.java lines 693–701

  private static void checkShapeAndDataCapacityConsistency(int dataCapacity, long[] shape) {
    final long numel = numel(shape);
    checkArgument(
        numel == dataCapacity,
        "Inconsistent data capacity:%d and shape number elements:%d shape:%s",
        dataCapacity,
        numel,
        Arrays.toString(shape));
  }

Subdomains

Frequently Asked Questions

What does checkShapeAndDataCapacityConsistency() do?
checkShapeAndDataCapacityConsistency() is a function in the pytorch codebase.
What does checkShapeAndDataCapacityConsistency() call?
checkShapeAndDataCapacityConsistency() calls 2 function(s): checkArgument, numel.
What calls checkShapeAndDataCapacityConsistency()?
checkShapeAndDataCapacityConsistency() is called by 2 function(s): fromBlob, fromBlobUnsigned.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free