Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Shape Transformer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gregor Kobsik
Shape Transformer
Commits
9bd90169
Commit
9bd90169
authored
3 years ago
by
Gregor Kobsik
Browse files
Options
Downloads
Patches
Plain Diff
fix bug: error when shape is fully sampled before last layer
parent
824fa3b1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sample/layer_sampler/encoder_only_sampler.py
+3
-0
3 additions, 0 deletions
sample/layer_sampler/encoder_only_sampler.py
sample/layer_sampler/recurrent_sampler.py
+3
-0
3 additions, 0 deletions
sample/layer_sampler/recurrent_sampler.py
with
6 additions
and
0 deletions
sample/layer_sampler/encoder_only_sampler.py
+
3
−
0
View file @
9bd90169
...
...
@@ -77,4 +77,7 @@ class EncoderOnlySampler:
dep
+=
[
next_dep
]
pos
+=
[
next_pos
]
if
torch
.
sum
(
next_val
==
2
)
==
0
:
break
# early-out, no mixed tokens sampled
return
postprocess
(
val
,
target_resolution
,
self
.
spatial_dim
)
This diff is collapsed.
Click to expand it.
sample/layer_sampler/recurrent_sampler.py
+
3
−
0
View file @
9bd90169
...
...
@@ -89,5 +89,8 @@ class RecurrentSampler:
dep
+=
[
next_dep
]
pos
+=
[
next_pos
]
if
torch
.
sum
(
next_val
==
2
)
==
0
:
break
# early-out, no mixed tokens sampled
# transform the sampled octree sequence back into a regular-grid voxel array and return
return
postprocess
(
val
,
target_resolution
,
self
.
spatial_dim
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment