Skip to content

Commit c92f073

Browse files
authored
Merge pull request graykode#5 from mturnshek/master
change temperature argument type int -> float
2 parents db34749 + af20b41 commit c92f073

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def text_generator(state_dict):
2323
parser.add_argument('--unconditional', action='store_true', help='If true, unconditional generation.')
2424
parser.add_argument("--batch_size", type=int, default=-1)
2525
parser.add_argument("--length", type=int, default=-1)
26-
parser.add_argument("--temperature", type=int, default=0.7)
26+
parser.add_argument("--temperature", type=float, default=0.7)
2727
parser.add_argument("--top_k", type=int, default=40)
2828
args = parser.parse_args()
2929

@@ -79,4 +79,4 @@ def text_generator(state_dict):
7979
text_generator(state_dict)
8080
else:
8181
print('Please download gpt2-pytorch_model.bin')
82-
sys.exit()
82+
sys.exit()

0 commit comments

Comments
 (0)