Skip to content

Commit d0abc4b

Browse files
committed
resolve data dep size when adding data to SampleBlockMeta
1 parent 0cc0539 commit d0abc4b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bioimageio/core/sample.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,13 @@ def get_member_halo(m: MemberId, round: Callable[[float], int]):
251251

252252
def with_data(self, data: PerMember[Tensor], *, stat: Stat) -> SampleBlock:
253253
return SampleBlock(
254-
sample_shape=self.sample_shape,
254+
sample_shape={
255+
m: {
256+
a: data[m].tagged_shape[a] if s == -1 else s
257+
for a, s in member_shape.items()
258+
}
259+
for m, member_shape in self.sample_shape.items()
260+
},
255261
sample_id=self.sample_id,
256262
blocks={
257263
m: Block.from_meta(b, data=data[m]) for m, b in self.blocks.items()

0 commit comments

Comments
 (0)