Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
proekt
obuch
Commits
50e0b2f7
Commit
50e0b2f7
authored
3 weeks ago
by
Мазур Грета Евгеньевна
Browse files
Options
Download
Patches
Plain Diff
micro zapusk no cross
parent
c064e465
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ipynb_checkpoints/micro_no_cross-checkpoint.py
+2
-2
.ipynb_checkpoints/micro_no_cross-checkpoint.py
micro_no_cross.py
+2
-2
micro_no_cross.py
with
4 additions
and
4 deletions
+4
-4
.ipynb_checkpoints/micro_no_cross-checkpoint.py
+
2
−
2
View file @
50e0b2f7
...
...
@@ -203,8 +203,8 @@ def predict(text):
with
torch
.
no_grad
():
outputs
=
model
(
**
inputs
)
safety_probs
=
torch
.
softmax
(
outputs
[
'safety'
],
dim
=
1
)
attack_probs
=
torch
.
softmax
(
outputs
[
'attack'
],
dim
=
1
)
safety_probs
=
torch
.
softmax
(
outputs
[
'
logits_
safety'
],
dim
=
1
)
attack_probs
=
torch
.
softmax
(
outputs
[
'
logits_
attack'
],
dim
=
1
)
return
{
'safety'
:
{
...
...
This diff is collapsed.
Click to expand it.
micro_no_cross.py
+
2
−
2
View file @
50e0b2f7
...
...
@@ -203,8 +203,8 @@ def predict(text):
with
torch
.
no_grad
():
outputs
=
model
(
**
inputs
)
safety_probs
=
torch
.
softmax
(
outputs
[
'safety'
],
dim
=
1
)
attack_probs
=
torch
.
softmax
(
outputs
[
'attack'
],
dim
=
1
)
safety_probs
=
torch
.
softmax
(
outputs
[
'
logits_
safety'
],
dim
=
1
)
attack_probs
=
torch
.
softmax
(
outputs
[
'
logits_
attack'
],
dim
=
1
)
return
{
'safety'
:
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets