Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
VAR_pytorch
Commits
846290bf
Commit
846290bf
authored
Nov 12, 2024
by
suily
Browse files
Update test.py
parent
67f3d069
Pipeline
#1903
canceled with stages
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test.py
test.py
+2
-2
No files found.
test.py
View file @
846290bf
...
@@ -9,7 +9,7 @@ setattr(torch.nn.Linear, 'reset_parameters', lambda self: None) # 禁用默
...
@@ -9,7 +9,7 @@ setattr(torch.nn.Linear, 'reset_parameters', lambda self: None) # 禁用默
setattr
(
torch
.
nn
.
LayerNorm
,
'reset_parameters'
,
lambda
self
:
None
)
# 禁用默认参数init以获得更快的速度
setattr
(
torch
.
nn
.
LayerNorm
,
'reset_parameters'
,
lambda
self
:
None
)
# 禁用默认参数init以获得更快的速度
from
models
import
VQVAE
,
build_vae_var
from
models
import
VQVAE
,
build_vae_var
os
.
environ
[
"
CUDA
_VISIBLE_DEVICES"
]
=
"2"
os
.
environ
[
"
HIP
_VISIBLE_DEVICES"
]
=
"2"
print
(
torch
.
cuda
.
get_device_name
(
0
))
print
(
torch
.
cuda
.
get_device_name
(
0
))
MODEL_DEPTH
=
16
# TODO:更改此处,指定模型
MODEL_DEPTH
=
16
# TODO:更改此处,指定模型
assert
MODEL_DEPTH
in
{
16
,
20
,
24
,
30
}
assert
MODEL_DEPTH
in
{
16
,
20
,
24
,
30
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment