mirror of
https://github.com/deepseek-ai/DeepSeek-Coder.git
synced 2025-02-23 06:09:07 -05:00
Update README.md
This commit is contained in:
parent
33c230697b
commit
e1cc9ae6d9
@ -203,7 +203,7 @@ def load_data():
|
|||||||
|
|
||||||
def evaluate_predictions(y_test, y_pred):
|
def evaluate_predictions(y_test, y_pred):
|
||||||
return accuracy_score(y_test, y_pred)
|
return accuracy_score(y_test, y_pred)
|
||||||
#model.py
|
# model.py
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
import torch.optim as optim
|
import torch.optim as optim
|
||||||
@ -242,7 +242,7 @@ class IrisClassifier(nn.Module):
|
|||||||
outputs = self(X_test)
|
outputs = self(X_test)
|
||||||
_, predicted = outputs.max(1)
|
_, predicted = outputs.max(1)
|
||||||
return predicted.numpy()
|
return predicted.numpy()
|
||||||
#main.py
|
# main.py
|
||||||
from utils import load_data, evaluate_predictions
|
from utils import load_data, evaluate_predictions
|
||||||
from model import IrisClassifier as Classifier
|
from model import IrisClassifier as Classifier
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ print(tokenizer.decode(outputs[0]))
|
|||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
In the following scenario, the DeepSeek-Coder 6.7B model effectively calls a class **IrisClassifier** and its member function from the `model.py` file, and also utilizes functions from the `utils.py` file, to correctly complete the **main** function in`main.py` file for model training and evaluation.
|
In the following scenario, the DeepSeek-Coder-6.7B model effectively calls a class **IrisClassifier** and its member function from the `model.py` file, and also utilizes functions from the `utils.py` file, to correctly complete the **main** function in `main.py` file for model training and evaluation.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user