doc: add load to pytorch estimator quickstart. (#6920)
* doc: add load to pytorch estimator quickstart. * fix: fix style. * fix typo * fix wording.
This commit is contained in:
		
							parent
							
								
									664dfbe7ef
								
							
						
					
					
						commit
						de88f1e6b3
					
				
					 1 changed files with 12 additions and 5 deletions
				
			
		| 
						 | 
					@ -127,15 +127,22 @@ for r in result:
 | 
				
			||||||
    print(r, ":", result[r])
 | 
					    print(r, ":", result[r])
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Step 5: Save the Model
 | 
					### Step 5: Save and Load the Model
 | 
				
			||||||
 | 
					 | 
				
			||||||
Save the Estimator states (including model and optimizer) to the provided model path.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Save the Estimator states (including the model and optimizer) to the provided model path.
 | 
				
			||||||
```python
 | 
					```python
 | 
				
			||||||
est.save("mnist_model")
 | 
					est.save("mnist_model")
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# stop orca context when program finishes
 | 
					Save the entire model to the provided model path.
 | 
				
			||||||
stop_orca_context()
 | 
					```python
 | 
				
			||||||
 | 
					est.save("mnist_model", entire=True)
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Load the Estimator states (including the model and optimizer) or the entire model from the provided model path.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```python
 | 
				
			||||||
 | 
					est.load("mnist_model")
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note:** You should call `stop_orca_context()` when your application finishes.
 | 
					**Note:** You should call `stop_orca_context()` when your application finishes.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue