Towards Green Ai: Cost-Efficient Deep Learning Using Domain Knowledge